author | zautrix <zautrix> | 2005-01-17 19:49:42 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-17 19:49:42 (UTC) |
commit | 522486966ecf041a6e49913b6e420d58d4284837 (patch) (side-by-side diff) | |
tree | d15da3e6ef9ec4638eba4aaf9f14ef0c5eaecd04 /kaddressbook | |
parent | 32479683283fc9f20d369ac9671ba0f8a33d3381 (diff) | |
download | kdepimpi-522486966ecf041a6e49913b6e420d58d4284837.zip kdepimpi-522486966ecf041a6e49913b6e420d58d4284837.tar.gz kdepimpi-522486966ecf041a6e49913b6e420d58d4284837.tar.bz2 |
const fixes
-rw-r--r-- | kaddressbook/kabcore.cpp | 33 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 2 |
2 files changed, 28 insertions, 7 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index d393660..42e147f 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -1376,4 +1376,4 @@ void KABCore::save() "not using it. " ); - message(i18n("Saving ... please wait! ")); - qApp->processEvents(); + message(i18n("Saving ... please wait! "), false); + //qApp->processEvents(); #ifndef KAB_EMBEDDED @@ -2299,2 +2299,3 @@ void KABCore::manageCategories( ) int count = 0; + int cc = 0; message( i18n("Please wait, processing categories...")); @@ -2304,2 +2305,5 @@ void KABCore::manageCategories( ) for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { + ++cc; + if ( cc %10 == 0) + message(i18n("Processing contact #%1").arg(cc)); QStringList catIncList = (*it).categories(); @@ -2324,2 +2328,5 @@ void KABCore::manageCategories( ) for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { + ++cc; + if ( cc %10 == 0) + message(i18n("Processing contact #%1").arg(cc)); QStringList catIncList = (*it).categories(); @@ -2376,3 +2383,5 @@ void KABCore::setFormattedName() if ( (*it).tagged() ) { - message(i18n("Changing contact #%1").arg( ++count ) ); + ++count; + if ( count %10 == 0 ) + message(i18n("Changing contact #%1").arg( count ) ); qApp->processEvents(); @@ -2394,2 +2403,3 @@ void KABCore::setFormattedName() message(i18n("Refreshing view...") ); + qApp->processEvents(); mViewManager->refreshView( "" ); @@ -3191,2 +3201,3 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource) bool syncOK = false; + message(i18n("Loading DTM address data..."), false); if ( abLocal.load() ) { @@ -3194,3 +3205,5 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource) mGlobalSyncMode = SYNC_MODE_EXTERNAL; + message(i18n("Sync preprocessing..."),false); abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); + message(i18n("Synchronizing..."),false); syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); @@ -3199,3 +3212,5 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource) abLocal.removeSyncAddressees( false ); + message(i18n("Saving DTM address data..."),false); abLocal.saveAB(); + message(i18n("Sync postprocessing..."),false); abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); @@ -3207,4 +3222,6 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource) abLocal.removeResources(); - if ( syncOK ) + if ( syncOK ) { mViewManager->refreshView(); + message(i18n("DTM syncing finished.")); + } disableBR( false ); @@ -3213,6 +3230,10 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource) } -void KABCore::message( QString m ) +void KABCore::message( QString m, bool startTimer) { topLevelWidget()->setCaption( m ); - mMessageTimer->start( 20000, true ); + qApp->processEvents(); + if ( startTimer ) + mMessageTimer->start( 15000, true ); + else + mMessageTimer->stop(); } diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index ecfe6e9..786549a 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h @@ -502,3 +502,3 @@ class KABCore : public QWidget, public KSyncInterface bool syncPhone(); - void message( QString m ); + void message( QString m , bool startTimer = true); |