-rw-r--r-- | kabc/plugins/dir/resourcedir.cpp | 17 | ||||
-rw-r--r-- | kabc/plugins/dir/resourcedir.h | 3 | ||||
-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 20 | ||||
-rw-r--r-- | kabc/plugins/file/resourcefile.h | 3 | ||||
-rw-r--r-- | microkde/kresources/configpage.cpp | 12 |
5 files changed, 34 insertions, 21 deletions
diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp index 7d96cb7..e58e4f7 100644 --- a/kabc/plugins/dir/resourcedir.cpp +++ b/kabc/plugins/dir/resourcedir.cpp @@ -58,2 +58,3 @@ $Id$ +#define NO_DIRWATCH #include "resourcedir.h" @@ -115,3 +116,3 @@ ResourceDir::ResourceDir( const KConfig *config, bool syncable ) */ - +#ifndef NO_DIRWATCH connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( pathChanged() ) ); @@ -119,3 +120,3 @@ ResourceDir::ResourceDir( const KConfig *config, bool syncable ) connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( pathChanged() ) ); - +#endif setPath( path ); @@ -210,5 +211,5 @@ bool ResourceDir::save( Ticket *ticket ) bool ok = true; - +#ifndef NO_DIRWATCH mDirWatch.stopScan(); - +#endif for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) { @@ -230,4 +231,5 @@ bool ResourceDir::save( Ticket *ticket ) } +#ifndef NO_DIRWATCH mDirWatch.startScan(); - +#endif delete ticket; @@ -303,2 +305,3 @@ void ResourceDir::setPath( const QString &path ) { +#ifndef NO_DIRWATCH mDirWatch.stopScan(); @@ -310,3 +313,5 @@ void ResourceDir::setPath( const QString &path ) mDirWatch.startScan(); - +#else + mPath = path; +#endif //US simulate KDirWatch event diff --git a/kabc/plugins/dir/resourcedir.h b/kabc/plugins/dir/resourcedir.h index c2aedad..77cd18c 100644 --- a/kabc/plugins/dir/resourcedir.h +++ b/kabc/plugins/dir/resourcedir.h @@ -106,4 +106,5 @@ private: +#ifndef NO_DIRWATCH KDirWatch mDirWatch; - +#endif QString mPath; diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index 17263ae..b8c32d5 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp @@ -51,3 +51,3 @@ $Id$ #include "stdaddressbook.h" - +#define NO_DIRWATCH #include "resourcefile.h" @@ -57,2 +57,4 @@ $Id$ + + using namespace KABC; @@ -117,3 +119,3 @@ void ResourceFile::init( const QString &fileName, const QString &formatName ) - +#ifndef NO_DIRWATCH connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( fileChanged() ) ); @@ -121,3 +123,3 @@ void ResourceFile::init( const QString &fileName, const QString &formatName ) connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) ); - +#endif setFileName( fileName ); @@ -229,4 +231,5 @@ bool ResourceFile::save( Ticket *ticket ) //US ToDo: write backupfile +#ifndef NO_DIRWATCH mDirWatch.stopScan(); - +#endif QFile info; @@ -246,5 +249,5 @@ bool ResourceFile::save( Ticket *ticket ) addressBook()->error( i18n( "Unable to save file '%1'." ).arg( mFileName ) ); - +#ifndef NO_DIRWATCH mDirWatch.startScan(); - +#endif delete ticket; @@ -328,5 +331,5 @@ void ResourceFile::setFileName( const QString &fileName ) { +#ifndef NO_DIRWATCH mDirWatch.stopScan(); mDirWatch.removeFile( mFileName ); - mFileName = fileName; @@ -336,2 +339,5 @@ void ResourceFile::setFileName( const QString &fileName ) mDirWatch.startScan(); +#else + mFileName = fileName; +#endif diff --git a/kabc/plugins/file/resourcefile.h b/kabc/plugins/file/resourcefile.h index 0a3027c..8339340 100644 --- a/kabc/plugins/file/resourcefile.h +++ b/kabc/plugins/file/resourcefile.h @@ -155,4 +155,5 @@ private: QString mLockUniqueName; - +#ifndef NO_DIRWATCH KDirWatch mDirWatch; +#endif }; diff --git a/microkde/kresources/configpage.cpp b/microkde/kresources/configpage.cpp index 1a3a22c..02c5fb1 100644 --- a/microkde/kresources/configpage.cpp +++ b/microkde/kresources/configpage.cpp @@ -102,4 +102,4 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name ) groupBox->setColumnLayout(0, Qt::Vertical ); - groupBox->layout()->setSpacing( 6 ); - groupBox->layout()->setMargin( 11 ); + groupBox->layout()->setSpacing( 3 ); + groupBox->layout()->setMargin( 5 ); QGridLayout *groupBoxLayout = new QGridLayout( groupBox->layout(), 4, 2 ); @@ -120,9 +120,9 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name ) - mAddButton = new QPushButton( i18n( "&Add..." ), this ); + mAddButton = new QPushButton( i18n( "&Add..." ), groupBox ); groupBoxLayout->addWidget( mAddButton, 2, 0 ); - mRemoveButton = new QPushButton( i18n( "&Remove" ), this ); + mRemoveButton = new QPushButton( i18n( "&Remove" ), groupBox ); groupBoxLayout->addWidget( mRemoveButton, 2, 1 ); - mEditButton = new QPushButton( i18n( "&Edit..." ), this ); + mEditButton = new QPushButton( i18n( "&Edit..." ), groupBox ); groupBoxLayout->addWidget( mEditButton, 3, 0 ); - mStandardButton = new QPushButton( i18n( "&Use as Standard" ), this ); + mStandardButton = new QPushButton( i18n( "&Use as Standard" ), groupBox ); groupBoxLayout->addWidget( mStandardButton, 3, 1 ); |