From 59f727076930aada485db6531d4084f2bfe0b928 Mon Sep 17 00:00:00 2001 From: ulf69 Date: Thu, 15 Jul 2004 05:06:06 +0000 Subject: ask for readwrite resources if the user wants them to reload in the case of an external change. --- (limited to 'kabc/plugins/file') diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index 9f9b00f..1d3acec 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp @@ -42,6 +42,7 @@ $Id$ #include //US #include #include +#include #include "formatfactory.h" @@ -372,8 +373,13 @@ void ResourceFile::fileChanged() // we are fully constructed if (!addressBook()) return; - load(); - addressBook()->emitAddressBookChanged(); + + + QString text( i18n( "File resource '%1'
has been changed by third party.
Do you want to reload?").arg( mFileName ) ); + if ( readOnly() || KMessageBox::questionYesNo( 0, text ) == KMessageBox::Yes ) { + load(); + addressBook()->emitAddressBookChanged(); + } } void ResourceFile::removeAddressee( const Addressee &addr ) -- cgit v0.9.0.2