author | zautrix <zautrix> | 2005-01-17 19:49:42 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-17 19:49:42 (UTC) |
commit | 522486966ecf041a6e49913b6e420d58d4284837 (patch) (unidiff) | |
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 | |||
@@ -1375,6 +1375,6 @@ void KABCore::save() | |||
1375 | "address book. Please check that some \nother application is " | 1375 | "address book. Please check that some \nother application is " |
1376 | "not using it. " ); | 1376 | "not using it. " ); |
1377 | message(i18n("Saving ... please wait! ")); | 1377 | message(i18n("Saving ... please wait! "), false); |
1378 | qApp->processEvents(); | 1378 | //qApp->processEvents(); |
1379 | #ifndef KAB_EMBEDDED | 1379 | #ifndef KAB_EMBEDDED |
1380 | KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook ); | 1380 | KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook ); |
@@ -2298,4 +2298,5 @@ void KABCore::manageCategories( ) | |||
2298 | } | 2298 | } |
2299 | int count = 0; | 2299 | int count = 0; |
2300 | int cc = 0; | ||
2300 | message( i18n("Please wait, processing categories...")); | 2301 | message( i18n("Please wait, processing categories...")); |
2301 | if ( cp->addCat() ) { | 2302 | if ( cp->addCat() ) { |
@@ -2303,4 +2304,7 @@ void KABCore::manageCategories( ) | |||
2303 | QStringList catList = KABPrefs::instance()->mCustomCategories; | 2304 | QStringList catList = KABPrefs::instance()->mCustomCategories; |
2304 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2305 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2306 | ++cc; | ||
2307 | if ( cc %10 == 0) | ||
2308 | message(i18n("Processing contact #%1").arg(cc)); | ||
2305 | QStringList catIncList = (*it).categories(); | 2309 | QStringList catIncList = (*it).categories(); |
2306 | int i; | 2310 | int i; |
@@ -2323,4 +2327,7 @@ void KABCore::manageCategories( ) | |||
2323 | KABC::AddressBook::Iterator it; | 2327 | KABC::AddressBook::Iterator it; |
2324 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2328 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2329 | ++cc; | ||
2330 | if ( cc %10 == 0) | ||
2331 | message(i18n("Processing contact #%1").arg(cc)); | ||
2325 | QStringList catIncList = (*it).categories(); | 2332 | QStringList catIncList = (*it).categories(); |
2326 | int i; | 2333 | int i; |
@@ -2375,5 +2382,7 @@ void KABCore::setFormattedName() | |||
2375 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2382 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2376 | if ( (*it).tagged() ) { | 2383 | if ( (*it).tagged() ) { |
2377 | message(i18n("Changing contact #%1").arg( ++count ) ); | 2384 | ++count; |
2385 | if ( count %10 == 0 ) | ||
2386 | message(i18n("Changing contact #%1").arg( count ) ); | ||
2378 | qApp->processEvents(); | 2387 | qApp->processEvents(); |
2379 | QString fName; | 2388 | QString fName; |
@@ -2393,4 +2402,5 @@ void KABCore::setFormattedName() | |||
2393 | } | 2402 | } |
2394 | message(i18n("Refreshing view...") ); | 2403 | message(i18n("Refreshing view...") ); |
2404 | qApp->processEvents(); | ||
2395 | mViewManager->refreshView( "" ); | 2405 | mViewManager->refreshView( "" ); |
2396 | Addressee add; | 2406 | Addressee add; |
@@ -3190,13 +3200,18 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource) | |||
3190 | AddressBook abLocal( resource,"syncContact"); | 3200 | AddressBook abLocal( resource,"syncContact"); |
3191 | bool syncOK = false; | 3201 | bool syncOK = false; |
3202 | message(i18n("Loading DTM address data..."), false); | ||
3192 | if ( abLocal.load() ) { | 3203 | if ( abLocal.load() ) { |
3193 | qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); | 3204 | qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); |
3194 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 3205 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
3206 | message(i18n("Sync preprocessing..."),false); | ||
3195 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); | 3207 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); |
3208 | message(i18n("Synchronizing..."),false); | ||
3196 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); | 3209 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); |
3197 | if ( syncOK ) { | 3210 | if ( syncOK ) { |
3198 | if ( syncManager->mWriteBackFile ) { | 3211 | if ( syncManager->mWriteBackFile ) { |
3199 | abLocal.removeSyncAddressees( false ); | 3212 | abLocal.removeSyncAddressees( false ); |
3213 | message(i18n("Saving DTM address data..."),false); | ||
3200 | abLocal.saveAB(); | 3214 | abLocal.saveAB(); |
3215 | message(i18n("Sync postprocessing..."),false); | ||
3201 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); | 3216 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); |
3202 | } | 3217 | } |
@@ -3206,14 +3221,20 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource) | |||
3206 | } | 3221 | } |
3207 | abLocal.removeResources(); | 3222 | abLocal.removeResources(); |
3208 | if ( syncOK ) | 3223 | if ( syncOK ) { |
3209 | mViewManager->refreshView(); | 3224 | mViewManager->refreshView(); |
3225 | message(i18n("DTM syncing finished.")); | ||
3226 | } | ||
3210 | disableBR( false ); | 3227 | disableBR( false ); |
3211 | return syncOK; | 3228 | return syncOK; |
3212 | 3229 | ||
3213 | } | 3230 | } |
3214 | void KABCore::message( QString m ) | 3231 | void KABCore::message( QString m, bool startTimer) |
3215 | { | 3232 | { |
3216 | topLevelWidget()->setCaption( m ); | 3233 | topLevelWidget()->setCaption( m ); |
3217 | mMessageTimer->start( 20000, true ); | 3234 | qApp->processEvents(); |
3235 | if ( startTimer ) | ||
3236 | mMessageTimer->start( 15000, true ); | ||
3237 | else | ||
3238 | mMessageTimer->stop(); | ||
3218 | } | 3239 | } |
3219 | bool KABCore::syncPhone() | 3240 | bool KABCore::syncPhone() |
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index ecfe6e9..786549a 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h | |||
@@ -501,5 +501,5 @@ class KABCore : public QWidget, public KSyncInterface | |||
501 | virtual void removeSyncInfo( QString syncProfile); | 501 | virtual void removeSyncInfo( QString syncProfile); |
502 | bool syncPhone(); | 502 | bool syncPhone(); |
503 | void message( QString m ); | 503 | void message( QString m , bool startTimer = true); |
504 | 504 | ||
505 | // LR ******************************* | 505 | // LR ******************************* |