[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Managing KURL's
From: Aurélien_Gâteau <aurelien.gateau () mail ! dotcom ! fr>
Date: 2002-07-27 23:39:43
[Download RAW message or body]
Jean Pierre Charalambos wrote:
> Hi all,
>
> A KURL object declared in a doc object (doc-view model) is changing its state
> in a way I still do not undersand. The whole thing is as follows:
> - I have declared the object: KURL *doc_url;
> - It has been initialized in the doc object constructor:
> doc_url.setFileName(i18n("Untitled"));
> - I have not been aware of any change made to doc_url. However, when the doc
> is asked to save modified files with something like:
> if (doc_url.fileName() == i18n("Untitled"))
> instead of pointing to the original value it seems to be pointed to some
> temporary file in /temp/kde-pierre. I believed it has to be with KConfig but
> I just missed the point (no clue in its API for me).
>
> Hints are very welcome. Regards,
>
> Jean Pierre
Might be a dumb suggestion but why don't you leave the doc_url
uninitialized if your document has not been saved ? You could then
replace your :
if (doc_url.fileName() == i18n("Untitled"))
with :
if (doc_url.isEmpty())
I guess the i18n("Untitled") refers to some text to show in the view.
The view should check if doc_url is empty and display i18n("Untitled")
instead of doc_url.fileName() in this case.
Regards,
Aurélien
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic