Bug 77373 - Add to Address Book fails under certain circumstances
Summary: Add to Address Book fails under certain circumstances
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kab3
Classification: Miscellaneous
Component: general (show other bugs)
Version: 3.2.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-12 11:51 UTC by Wolfgang Thiess
Modified: 2009-08-05 16:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Thiess 2004-03-12 11:51:59 UTC
Version:           1.6.1 (using KDE 3.2.1, Gentoo)
Compiler:          gcc version 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)
OS:          Linux (i686) release 2.6.3-gentoo-r1

Open kaddressbook
Click File:"New Contact..."
Click Cancel
(It's important for reproducing the error to open and close the New Contact dialog.)
Keep kaddressbook open
Open kmail
Rightclick an email address of just any mail in the preview window - select "Add to Address Book".

The result is a message box saying: "Can't save to addressbook".

This does not occur, if the New Contact dialog has not been opened within the sequence.

Maybe this is a flaw in kaddressbook, but it should be changed in some way. The error message is just confusing.
Comment 1 Ingo Klöcker 2004-03-12 17:47:05 UTC
That's a bug in KAddressBook. Obviously it doesn't release the lock if the New Contact dialog is cancelled. I also noticed that two lock files are created.
Comment 2 Ron Onstenk 2004-04-15 20:47:30 UTC
Do I have to delete those lock file to be able to add to addressbook?
If yes, where are those files and what name?
Now kmail and addressbook are useless.
Comment 3 Ron Onstenk 2004-04-15 20:48:21 UTC
Do I have to delete those lock file to be able to add to addressbook?
If yes, where are those files and what name?
Now kmail and addressbook are useless.
Comment 4 Damir Perisa 2004-06-13 13:29:31 UTC
confirm - and it also happens when using normally kontact and want to edit a contact - no response from app

also if in kontact i want to add a contact to addressbook, it comes "Can't save to addressbook" 

very anoying bug - makes kontact useless, as no edit possibility for contacts
Comment 5 Tobias Koenig 2004-06-19 13:05:42 UTC
CVS commit by tokoe: 

Unlock the standard resource as well. That fixes #77373

CCMAIL:77373-done@bugs.kde.org


  M +8 -0      kablock.cpp   1.5
  M +5 -2      kablock.h   1.2


--- kdepim/kaddressbook/kablock.cpp  #1.4:1.5
@@ -28,4 +28,9 @@
 #include "kablock.h"
 
+// sorry for this hack, but i need AddressBook::standardResource()
+#define protected public
+#include <kabc/addressbook.h>
+#include <kabc/resource.h>
+
 KABLock *KABLock::mSelf = 0;
 
@@ -71,4 +76,7 @@ bool KABLock::lock( KABC::Resource *reso
 bool KABLock::unlock( KABC::Resource *resource )
 {
+  if ( resource == 0 )
+    resource = mAddressBook->standardResource();
+
   if ( mLocks.find( resource ) == mLocks.end() ) { // hmm, not good...
     return false;

--- kdepim/kaddressbook/kablock.h  #1.1:1.2
@@ -25,6 +25,9 @@
 #define KABLOCK_H
 
-#include <kabc/addressbook.h>
-#include <kabc/resource.h>
+namespace KABC {
+class AddressBook;
+class Resource;
+class Ticket;
+}
 
 typedef struct {


Comment 6 Tobias Koenig 2009-08-05 16:06:40 UTC
The development of the old KAddressBook will be discontinued for KDE 4.4.
Since the new application has the same name, but a completly new code base we close all bug reports against the old version and ask the submitters to resend there reports against the new product.