Diffstat (limited to 'kabc/plugins/dir/resourcedir.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kabc/plugins/dir/resourcedir.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp index 7825c6f..52863d5 100644 --- a/kabc/plugins/dir/resourcedir.cpp +++ b/kabc/plugins/dir/resourcedir.cpp | |||
@@ -41,24 +41,23 @@ $Id$ | |||
41 | #include <kdebug.h> | 41 | #include <kdebug.h> |
42 | //US #include <kgenericfactory.h> | 42 | //US #include <kgenericfactory.h> |
43 | #include <kglobal.h> | 43 | #include <kglobal.h> |
44 | #include <klocale.h> | 44 | #include <klocale.h> |
45 | #include <kstandarddirs.h> | 45 | #include <kstandarddirs.h> |
46 | #include <kurlrequester.h> | 46 | #include <kurlrequester.h> |
47 | #include <kmessagebox.h> | ||
47 | 48 | ||
48 | #include "addressbook.h" | 49 | #include "addressbook.h" |
49 | 50 | ||
50 | #include "formatfactory.h" | 51 | #include "formatfactory.h" |
51 | 52 | ||
52 | #include "resourcedirconfig.h" | 53 | #include "resourcedirconfig.h" |
53 | #include "stdaddressbook.h" | 54 | #include "stdaddressbook.h" |
54 | 55 | ||
55 | //US | 56 | //US |
56 | #include <qdir.h> | 57 | #include <qdir.h> |
57 | //US #include "../../formats/vcardformatplugin2.h" | ||
58 | //US #include "../../formats/binaryformat.h" | ||
59 | 58 | ||
60 | #include "resourcedir.h" | 59 | #include "resourcedir.h" |
61 | 60 | ||
62 | using namespace KABC; | 61 | using namespace KABC; |
63 | 62 | ||
64 | extern "C" | 63 | extern "C" |
@@ -342,14 +341,17 @@ QString ResourceDir::format() const | |||
342 | 341 | ||
343 | void ResourceDir::pathChanged() | 342 | void ResourceDir::pathChanged() |
344 | { | 343 | { |
345 | if ( !addressBook() ) | 344 | if ( !addressBook() ) |
346 | return; | 345 | return; |
347 | 346 | ||
348 | load(); | 347 | QString text( i18n( "Dir resource '%1'<br> has been changed by third party.<br>Do you want to reload?").arg( mPath ) ); |
349 | addressBook()->emitAddressBookChanged(); | 348 | if ( readOnly() || KMessageBox::questionYesNo( 0, text ) == KMessageBox::Yes ) { |
349 | load(); | ||
350 | addressBook()->emitAddressBookChanged(); | ||
351 | } | ||
350 | } | 352 | } |
351 | 353 | ||
352 | void ResourceDir::removeAddressee( const Addressee& addr ) | 354 | void ResourceDir::removeAddressee( const Addressee& addr ) |
353 | { | 355 | { |
354 | QFile::remove( mPath + "/" + addr.uid() ); | 356 | QFile::remove( mPath + "/" + addr.uid() ); |
355 | } | 357 | } |