summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2005-01-17 19:49:42 (UTC)
committer zautrix <zautrix>2005-01-17 19:49:42 (UTC)
commit522486966ecf041a6e49913b6e420d58d4284837 (patch) (side-by-side diff)
treed15da3e6ef9ec4638eba4aaf9f14ef0c5eaecd04 /kaddressbook
parent32479683283fc9f20d369ac9671ba0f8a33d3381 (diff)
downloadkdepimpi-522486966ecf041a6e49913b6e420d58d4284837.zip
kdepimpi-522486966ecf041a6e49913b6e420d58d4284837.tar.gz
kdepimpi-522486966ecf041a6e49913b6e420d58d4284837.tar.bz2
const fixes
Diffstat (limited to 'kaddressbook') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp33
-rw-r--r--kaddressbook/kabcore.h2
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()
"address book. Please check that some \nother application is "
"not using it. " );
- message(i18n("Saving ... please wait! "));
- qApp->processEvents();
+ message(i18n("Saving ... please wait! "), false);
+ //qApp->processEvents();
#ifndef KAB_EMBEDDED
KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook );
@@ -2298,4 +2298,5 @@ void KABCore::manageCategories( )
}
int count = 0;
+ int cc = 0;
message( i18n("Please wait, processing categories..."));
if ( cp->addCat() ) {
@@ -2303,4 +2304,7 @@ void KABCore::manageCategories( )
QStringList catList = KABPrefs::instance()->mCustomCategories;
for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
+ ++cc;
+ if ( cc %10 == 0)
+ message(i18n("Processing contact #%1").arg(cc));
QStringList catIncList = (*it).categories();
int i;
@@ -2323,4 +2327,7 @@ void KABCore::manageCategories( )
KABC::AddressBook::Iterator it;
for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
+ ++cc;
+ if ( cc %10 == 0)
+ message(i18n("Processing contact #%1").arg(cc));
QStringList catIncList = (*it).categories();
int i;
@@ -2375,5 +2382,7 @@ void KABCore::setFormattedName()
for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
if ( (*it).tagged() ) {
- message(i18n("Changing contact #%1").arg( ++count ) );
+ ++count;
+ if ( count %10 == 0 )
+ message(i18n("Changing contact #%1").arg( count ) );
qApp->processEvents();
QString fName;
@@ -2393,4 +2402,5 @@ void KABCore::setFormattedName()
}
message(i18n("Refreshing view...") );
+ qApp->processEvents();
mViewManager->refreshView( "" );
Addressee add;
@@ -3190,13 +3200,18 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource)
AddressBook abLocal( resource,"syncContact");
bool syncOK = false;
+ message(i18n("Loading DTM address data..."), false);
if ( abLocal.load() ) {
qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1());
mGlobalSyncMode = SYNC_MODE_EXTERNAL;
+ message(i18n("Sync preprocessing..."),false);
abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false );
+ message(i18n("Synchronizing..."),false);
syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
if ( syncOK ) {
if ( syncManager->mWriteBackFile ) {
abLocal.removeSyncAddressees( false );
+ message(i18n("Saving DTM address data..."),false);
abLocal.saveAB();
+ message(i18n("Sync postprocessing..."),false);
abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true );
}
@@ -3206,14 +3221,20 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource)
}
abLocal.removeResources();
- if ( syncOK )
+ if ( syncOK ) {
mViewManager->refreshView();
+ message(i18n("DTM syncing finished."));
+ }
disableBR( false );
return syncOK;
}
-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();
}
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
virtual void removeSyncInfo( QString syncProfile);
bool syncPhone();
- void message( QString m );
+ void message( QString m , bool startTimer = true);
// LR *******************************