summaryrefslogtreecommitdiffabout
Side-by-side diff
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
@@ -961,7 +961,7 @@ bool AddressBook::containsExternalUid( const QString& uid )
return false;
}
-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 ) {
if ( uid == (*it).getID( profile ) )
diff --git a/kabc/addressbook.h b/kabc/addressbook.h
index 2351add..18c03b5 100644
--- a/kabc/addressbook.h
+++ b/kabc/addressbook.h
@@ -305,5 +305,5 @@ class AddressBook : public QObject
void removeSyncAddressees( bool removeDeleted = false );
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
@@ -590,5 +590,5 @@ int Addressee::tempSyncStat() const
}
-QString Addressee::getID( const QString & prof)
+const QString Addressee::getID( const QString & prof) const
{
return KIdManager::getId ( mData->mExternalId, prof );
@@ -603,5 +603,5 @@ void Addressee::setCsum( const QString & prof , const QString & id )
}
-QString Addressee::getCsum( const QString & prof)
+const QString Addressee::getCsum( const QString & prof) const
{
return KIdManager::getCsum ( mData->mExternalId, prof );
@@ -614,5 +614,5 @@ void Addressee::setIDStr( const QString & s )
}
-QString Addressee::IDStr() const
+const QString Addressee::IDStr() const
{
return mData->mExternalId;
@@ -627,5 +627,5 @@ void Addressee::setExternalUID( const QString &id )
}
-QString Addressee::externalUID() const
+const QString Addressee::externalUID() const
{
return mData->externalUID;
@@ -654,5 +654,5 @@ void Addressee::setUid( const QString &id )
}
-QString Addressee::uid() const
+const QString Addressee::uid() const
{
if ( mData->uid.isEmpty() )
diff --git a/kabc/addressee.h b/kabc/addressee.h
index 08d2f56..8051fec 100644
--- a/kabc/addressee.h
+++ b/kabc/addressee.h
@@ -101,9 +101,9 @@ class Addressee
int tempSyncStat() const;
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 &);
void computeCsum(const QString &dev);
@@ -114,5 +114,5 @@ class Addressee
bool isEmpty() const;
void setExternalUID( const QString &id );
- QString externalUID() const;
+ const QString externalUID() const;
void setOriginalExternalUID( const QString &id );
QString originalExternalUID() const;
@@ -132,5 +132,5 @@ class Addressee
Return unique identifier.
*/
- QString uid() const;
+ const QString uid() const;
/**
Return translated label for uid field.
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 *******************************
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 6c1f444..f488a07 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -995,9 +995,9 @@ void KSyncManager::showProgressBar(int percentage, QString caption, int total)
bar->setCaption (caption);
bar->setTotalSteps ( total ) ;
-
bar->show();
}
-
+ bar->raise();
bar->setProgress( percentage );
+ qApp->processEvents();
}
@@ -1005,4 +1005,5 @@ 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
@@ -186,5 +186,5 @@ void KSyncPrefsDialog::setupSyncAlgTab()
mFilterInCal = new QComboBox( fibo2 );
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
@@ -7,5 +7,5 @@ KIdManager::KIdManager()
// :profilename;12;id_withLen12;123456:
// 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 )
{
int startProf;
@@ -26,5 +26,5 @@ QString KIdManager::setId (const QString& idString,const QString& prof,const QSt
return newIDString;
}
-QString KIdManager::getId (const QString& idString,const QString& prof )
+const QString KIdManager::getId (const QString& idString,const QString& prof )
{
int startProf;
@@ -45,5 +45,5 @@ 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 )
{
int startProf;
@@ -65,5 +65,5 @@ 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 )
{
int startProf;
@@ -84,5 +84,5 @@ QString KIdManager::setCsum (const QString& idString,const QString& prof,const Q
return newIDString;
}
-QString KIdManager::getCsum (const QString& idString,const QString& prof )
+const QString KIdManager::getCsum (const QString& idString,const QString& prof )
{
int startProf;
diff --git a/microkde/kidmanager.h b/microkde/kidmanager.h
index 00580a0..9786c9f 100644
--- a/microkde/kidmanager.h
+++ b/microkde/kidmanager.h
@@ -10,9 +10,9 @@ Q_OBJECT
public:
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) ;
private: