[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Saving a KCompletion object?
From:       Erik Sigra <sigra () home ! se>
Date:       2001-09-07 19:55:46
[Download RAW message or body]

fredagen den 7 september 2001 21:34 skrev Kevin Krammer:
> On Friday,  7. September 2001 20:40 (GMT +0200), Erik Sigra wrote:
> > Hello!
> > I have been looking at the KCompletion object today. However I did not
> > find out how to save the completions in the config file for the next
> > time. Am I missing someting?
>
> Hmm, KCompletion docs:
> QStringList  items ()
>
>  Returns a list of all items inserted into KCompletion. This is useful if
> you need to save the state of a KCompletion object and restore it later.
>
> see also setItem()

OK. So guess I could write something like:

kapp->config()->writeEntry("FooHistory", foo->historyItems());

Now the big question is: I use widgets with completion in a dialog box which 
I have inherited from KDialogBase and then put some widget pointer data 
members in it. Should I create a destructor for my dialog class and put the 
write call in it?

I guess the dialog would be destructed cleanly by some Qt magic if I don't 
create a destructor. But if I do create a constructor with just the write 
call in it, would I break anything? Should I also make the destructor call 
delete on the data members?


(I'm still a bit confused about the difference between history and 
completion, but I might find out after some more experimentation and reading.)
 
>> 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