summaryrefslogtreecommitdiffabout
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
parent32479683283fc9f20d369ac9671ba0f8a33d3381 (diff)
downloadkdepimpi-522486966ecf041a6e49913b6e420d58d4284837.zip
kdepimpi-522486966ecf041a6e49913b6e420d58d4284837.tar.gz
kdepimpi-522486966ecf041a6e49913b6e420d58d4284837.tar.bz2
const fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp4
-rw-r--r--kabc/addressbook.h2
-rw-r--r--kabc/addressee.cpp10
-rw-r--r--kabc/addressee.h10
-rw-r--r--kaddressbook/kabcore.cpp33
-rw-r--r--kaddressbook/kabcore.h2
-rw-r--r--libkdepim/ksyncmanager.cpp5
-rw-r--r--libkdepim/ksyncprefsdialog.cpp2
-rw-r--r--microkde/kidmanager.cpp10
-rw-r--r--microkde/kidmanager.h10
10 files changed, 55 insertions, 33 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 4de7da2..9e61261 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -962,5 +962,5 @@ bool AddressBook::containsExternalUid( const QString& uid )
}
-Addressee AddressBook::findByExternUid( const QString& uid , const QString& profile )
+const Addressee AddressBook::findByExternUid( const QString& uid , const QString& profile ) const
{
- Iterator it;
+ ConstIterator it;
for ( it = begin(); it != end(); ++it ) {
diff --git a/kabc/addressbook.h b/kabc/addressbook.h
index 2351add..18c03b5 100644
--- a/kabc/addressbook.h
+++ b/kabc/addressbook.h
@@ -306,3 +306,3 @@ class AddressBook : public QObject
void mergeAB( AddressBook *aBook, const QString& profile, bool isSubset );
- Addressee findByExternUid( const QString& uid , const QString& profile );
+ const Addressee findByExternUid( const QString& uid , const QString& profile ) const;
bool containsExternalUid( const QString& uid );
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index d60cd6b..3b238f5 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -591,3 +591,3 @@ int Addressee::tempSyncStat() const
-QString Addressee::getID( const QString & prof)
+const QString Addressee::getID( const QString & prof) const
{
@@ -604,3 +604,3 @@ void Addressee::setCsum( const QString & prof , const QString & id )
-QString Addressee::getCsum( const QString & prof)
+const QString Addressee::getCsum( const QString & prof) const
{
@@ -615,3 +615,3 @@ void Addressee::setIDStr( const QString & s )
-QString Addressee::IDStr() const
+const QString Addressee::IDStr() const
{
@@ -628,3 +628,3 @@ void Addressee::setExternalUID( const QString &id )
-QString Addressee::externalUID() const
+const QString Addressee::externalUID() const
{
@@ -655,3 +655,3 @@ void Addressee::setUid( const QString &id )
-QString Addressee::uid() const
+const QString Addressee::uid() const
{
diff --git a/kabc/addressee.h b/kabc/addressee.h
index 08d2f56..8051fec 100644
--- a/kabc/addressee.h
+++ b/kabc/addressee.h
@@ -102,7 +102,7 @@ class Addressee
void setIDStr( const QString & );
- QString IDStr() const;
+ const QString IDStr() const;
void setID( const QString &, const QString & );
- QString getID( const QString & );
+ const QString getID( const QString & ) const;
void setCsum( const QString &, const QString & );
- QString getCsum( const QString & );
+ const QString getCsum( const QString & ) const ;
void removeID(const QString &);
@@ -115,3 +115,3 @@ class Addressee
void setExternalUID( const QString &id );
- QString externalUID() const;
+ const QString externalUID() const;
void setOriginalExternalUID( const QString &id );
@@ -133,3 +133,3 @@ class Addressee
*/
- QString uid() const;
+ const QString uid() const;
/**
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);
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 6c1f444..f488a07 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -996,7 +996,7 @@ void KSyncManager::showProgressBar(int percentage, QString caption, int total)
bar->setTotalSteps ( total ) ;
-
bar->show();
}
-
+ bar->raise();
bar->setProgress( percentage );
+ qApp->processEvents();
}
@@ -1006,2 +1006,3 @@ void KSyncManager::hideProgressBar()
bar->hide();
+ qApp->processEvents();
}
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 2101bbb..3db58ec 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -187,3 +187,3 @@ void KSyncPrefsDialog::setupSyncAlgTab()
fibo2 = new QVBox ( gb5 );
- new QLabel ( i18n("Incoming adressbook filter:"), fibo2 );
+ new QLabel ( i18n("Incoming addressbook filter:"), fibo2 );
mFilterInAB = new QComboBox( fibo2 );
diff --git a/microkde/kidmanager.cpp b/microkde/kidmanager.cpp
index e687e5d..d712771 100644
--- a/microkde/kidmanager.cpp
+++ b/microkde/kidmanager.cpp
@@ -8,3 +8,3 @@ KIdManager::KIdManager()
// 123456 is the csum
-QString KIdManager::setId (const QString& idString,const QString& prof,const QString& idvalue )
+const QString KIdManager::setId (const QString& idString,const QString& prof,const QString& idvalue )
{
@@ -27,3 +27,3 @@ QString KIdManager::setId (const QString& idString,const QString& prof,const QSt
}
-QString KIdManager::getId (const QString& idString,const QString& prof )
+const QString KIdManager::getId (const QString& idString,const QString& prof )
{
@@ -46,3 +46,3 @@ QString KIdManager::getId (const QString& idString,const QString& prof )
-QString KIdManager::removeId (const QString& idString,const QString& prof )
+const QString KIdManager::removeId (const QString& idString,const QString& prof )
{
@@ -66,3 +66,3 @@ QString KIdManager::removeId (const QString& idString,const QString& prof )
-QString KIdManager::setCsum (const QString& idString,const QString& prof,const QString& idCsum )
+const QString KIdManager::setCsum (const QString& idString,const QString& prof,const QString& idCsum )
{
@@ -85,3 +85,3 @@ QString KIdManager::setCsum (const QString& idString,const QString& prof,const Q
}
-QString KIdManager::getCsum (const QString& idString,const QString& prof )
+const QString KIdManager::getCsum (const QString& idString,const QString& prof )
{
diff --git a/microkde/kidmanager.h b/microkde/kidmanager.h
index 00580a0..9786c9f 100644
--- a/microkde/kidmanager.h
+++ b/microkde/kidmanager.h
@@ -11,7 +11,7 @@ Q_OBJECT
KIdManager( );
- static QString setId (const QString& idString,const QString& id,const QString& idvalue ) ;
- static QString getId (const QString& idString,const QString& id ) ;
- static QString removeId (const QString& idString,const QString& id ) ;
- static QString setCsum (const QString& idString,const QString& id,const QString& idvalue ) ;
- static QString getCsum (const QString& idString,const QString& id ) ;
+ static const QString setId (const QString& idString,const QString& id,const QString& idvalue ) ;
+ static const QString getId (const QString& idString,const QString& id ) ;
+ static const QString removeId (const QString& idString,const QString& id ) ;
+ static const QString setCsum (const QString& idString,const QString& id,const QString& idvalue ) ;
+ static const QString getCsum (const QString& idString,const QString& id ) ;
static bool getNumbers (const QString& idString,const QString& id, int &startProf, int &startIDnum, int &startIDnumlen,int &startID, int& lenID, int &startCsum, int &lenCsum, int & endall) ;