[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: StdAddressBook & AddressesDialog issues
From: Szombathelyi "György" <gyurco () freemail ! hu>
Date: 2004-03-21 19:34:47
Message-ID: 200403212034.47742.gyurco () freemail ! hu
[Download RAW message or body]
____________________________________________________________________
Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
Hello!
I investigated two issues with kabc/StdAddressBook and kdepim/AddressesDialog
1. When StdAddressBook destroyed (e.g. with close()), it re-creates itself,
and reload the whole addressbook via the resources. The problem is that
KStaticDeleter first sets the global variable to 0, than calls the
destructor, so ~StdAddressBook() sees the mSelf variable as zero. I attached
a patch, which calls save() only in close(), not in the destructor. Or
KStaticDeleter should be modified, so it should call the destructor first,
than set the global variable to '0'. Which is preferred?
2. AddressesDialog loads the addressbok in the synchronous way, so with a
fairly large addressbook, clicking on the To/CC/BCC buttons in KMail composer
hangs the UI for a considerable time. I attached a patch which makes the
loading asynchronous, so the dialog box pops up immediately. May I commit?
Bye,
György
["kabc.diff" (text/x-diff)]
? kabc.diff
Index: stdaddressbook.cpp
===================================================================
RCS file: /home/kde/kdelibs/kabc/stdaddressbook.cpp,v
retrieving revision 1.59
diff -u -p -u -r1.59 stdaddressbook.cpp
--- stdaddressbook.cpp 24 Oct 2003 09:19:06 -0000 1.59
+++ stdaddressbook.cpp 21 Mar 2004 19:22:22 -0000
@@ -92,8 +92,6 @@ StdAddressBook::StdAddressBook( bool asyStdAddressBook::~StdAddressBook(){
- if ( mAutomaticSave )
- save();}void StdAddressBook::init( bool asynchronous )
@@ -168,6 +166,8 @@ bool StdAddressBook::save()void StdAddressBook::close(){
+ if ( mAutomaticSave )
+ save();addressBookDeleter.destructObject();}
["kdepim.diff" (text/x-diff)]
? kdepim.diff
Index: addressesdialog.cpp
===================================================================
RCS file: /home/kde/kdepim/libkdepim/addressesdialog.cpp,v
retrieving revision 1.23
diff -u -p -u -r1.23 addressesdialog.cpp
--- addressesdialog.cpp 5 Feb 2004 21:37:03 -0000 1.23
+++ addressesdialog.cpp 21 Mar 2004 19:29:05 -0000
@@ -191,6 +191,7 @@ AddressesDialog::AddressesDialog( QWidged = new \
AddressesDialogPrivate;d->ui = new AddressPickerUI( page ); + \
KABC::StdAddressBook::self( true );updateAvailableAddressees();initConnections();} @@ \
-379,13 +380,13 @@ AddressesDialog::updateAvailableAddressethis, \
SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));d->personal->setVisible( \
false );d->groupDict.insert( personalGroup, d->personal );
-
- KABC::AddressBook *addressBook = KABC::StdAddressBook::self();
+
+ KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true );for( \
KABC::AddressBook::Iterator it = addressBook->begin();it != addressBook->end(); ++it \
) {addAddresseeToAvailable( *it, d->personal );}
-
+ d->recent = 0;updateRecentAddresses();
>> 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