summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp9
-rw-r--r--kabc/addressee.cpp8
-rw-r--r--kabc/secrecy.h2
-rw-r--r--kabc/vcard/VCardv.cpp2
-rw-r--r--kaddressbook/filter.cpp2
-rw-r--r--kaddressbook/filter.h2
-rw-r--r--kaddressbook/filtereditdialog.cpp1
-rw-r--r--kaddressbook/kabcore.cpp16
-rw-r--r--kaddressbook/kaddressbookmain.cpp2
-rw-r--r--kaddressbook/viewmanager.cpp3
10 files changed, 30 insertions, 17 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 8487ff3..4de7da2 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -922,2 +922,3 @@ void AddressBook::postExternSync( AddressBook* aBook , const QString& csd, bool
AddressBook::Iterator it;
+ int foundEmpty = 0;
for ( it = begin(); it != end(); ++it ) {
@@ -929,3 +930,5 @@ void AddressBook::postExternSync( AddressBook* aBook , const QString& csd, bool
if ( ad.isEmpty() ) {
- qDebug("postExternSync:ERROR addressee is empty: %s ", (*it).uid().latin1());
+ ++foundEmpty;
+ //qDebug("postExternSync:addressee is empty: %s ", (*it).uid().latin1());
+ //qDebug("-- formatted name %s ",(*it).formattedName().latin1() );
} else {
@@ -944,2 +947,6 @@ void AddressBook::postExternSync( AddressBook* aBook , const QString& csd, bool
}
+ if ( foundEmpty ) {
+ qDebug("postExternSync:%d empty addressees found:\n probably filtered out by incoming sync filter.",foundEmpty );
+ }
+
}
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index 568dfc4..d60cd6b 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -257,3 +257,3 @@ void Addressee::computeCsum(const QString &dev)
t.sort();
- for ( iii = 0; iii < t.count(); ++iii)
+ for ( iii = 0; iii < t.count(); ++iii)
if ( t[iii].left( 25 ) != "KADDRESSBOOK-X-ExternalID" ) {
@@ -262,4 +262,4 @@ void Addressee::computeCsum(const QString &dev)
if ( find < t[iii].length())
- l.append( t[iii] );
-
+ l.append( t[iii] );
+
}
@@ -274,2 +274,3 @@ void Addressee::computeCsum(const QString &dev)
uint cs = getCsum4List(l);
+
#if 0
@@ -279,2 +280,3 @@ void Addressee::computeCsum(const QString &dev)
#endif
+
setCsum( dev, QString::number (cs ));
diff --git a/kabc/secrecy.h b/kabc/secrecy.h
index 8f2f736..b2ff565 100644
--- a/kabc/secrecy.h
+++ b/kabc/secrecy.h
@@ -61,3 +61,3 @@ public:
*/
- Secrecy( int type = Invalid );
+ Secrecy( int type = Public );
diff --git a/kabc/vcard/VCardv.cpp b/kabc/vcard/VCardv.cpp
index 1166aac..bad2ef1 100644
--- a/kabc/vcard/VCardv.cpp
+++ b/kabc/vcard/VCardv.cpp
@@ -174,3 +174,3 @@ VCard::_parse()
while ( it!= l.end() && (*it).at(0) == ' ' && (*it).length()!= 1) {
- cur += (*it) ;
+ cur += (*it).mid(1) ;
++it;
diff --git a/kaddressbook/filter.cpp b/kaddressbook/filter.cpp
index 9cb4c2d..7a869fa 100644
--- a/kaddressbook/filter.cpp
+++ b/kaddressbook/filter.cpp
@@ -151,3 +151,3 @@ void Filter::restore( KConfig *config )
mMatchRule = (MatchRule)config->readNumEntry( "MatchRule", Matching );
- mCriteria = config->readNumEntry( "Criteria", (ShowPublic | ShowPrivate| ShowConfidential) );
+ mCriteria = config->readNumEntry( "Criteria", (ShowPublic | ShowPrivate| ShowConfidential ) );
}
diff --git a/kaddressbook/filter.h b/kaddressbook/filter.h
index 26870d7..93f1352 100644
--- a/kaddressbook/filter.h
+++ b/kaddressbook/filter.h
@@ -41,3 +41,3 @@ class Filter
public:
- enum { ShowPublic = 1, ShowPrivate = 2, ShowConfidential = 4};
+ enum { ShowPublic = 1, ShowPrivate = 2, ShowConfidential = 4 };
void setCriteria(int c) { mCriteria = c ;}
diff --git a/kaddressbook/filtereditdialog.cpp b/kaddressbook/filtereditdialog.cpp
index 987f234..1194406 100644
--- a/kaddressbook/filtereditdialog.cpp
+++ b/kaddressbook/filtereditdialog.cpp
@@ -98,3 +98,2 @@ void FilterEditDialog::setFilter( const Filter &filter )
mConfidential->setChecked(c & Filter::ShowConfidential);
-
}
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index e61f65f..aa04631 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -265,3 +265,3 @@ class KAex2phonePrefs : public QDialog
lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) );
- lab->setAlignment (AlignHCenter );
+ lab->setAlignment (AlignHCenter);
QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
@@ -567,2 +567,4 @@ void KABCore::saveSettings()
KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem();
+ KABPrefs::instance()->writeConfig();
+ qDebug("KABPrefs::instance()->writeConfig() ");
}
@@ -2687,2 +2689,3 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i
locCh = ( localMod > mLastAddressbookSync );
+ //qDebug("cahnged rem %d loc %d",remCh, locCh );
if ( !remCh && ! locCh ) {
@@ -2764,4 +2767,5 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i
return 1;
- if ( lastSync > localMod )
+ if ( lastSync > localMod ) {
return 2;
+ }
localIsNew = localMod >= remoteMod;
@@ -3008,6 +3012,8 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
skipIncidence = true;
- if ( !filterOUT.name().isEmpty() && ! filterOUT.filterAddressee( inL ) )
- skipIncidence = true;
- if ( !skipIncidence ) {
+ if ( ! skipIncidence ) {
inL = local->findByUid( uid );
+ if ( (!filterOUT.name().isEmpty()) && (! filterOUT.filterAddressee( inL ) ) )
+ skipIncidence = true;
+ }
+ if ( !skipIncidence ) {
if ( !inL.resource() || inL.resource()->includeInSync() ) {
diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp
index 2832257..519dc92 100644
--- a/kaddressbook/kaddressbookmain.cpp
+++ b/kaddressbook/kaddressbookmain.cpp
@@ -229,3 +229,3 @@ void KAddressBookMain::closeEvent( QCloseEvent* ce )
mCore->saveSettings();
- KABPrefs::instance()->writeConfig();
+ //KABPrefs::instance()->writeConfig();
}
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index 9c3a641..4be860e 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -285,3 +285,3 @@ void ViewManager::setActiveView( const QString &name )
//US mActiveView->refresh();
-
+ mCore->saveSettings();
}
@@ -290,3 +290,2 @@ void ViewManager::setActiveView( const QString &name )
qDebug("ViewManager::setActiveView: unable to find view" );
- kdDebug(5720) << "ViewManager::setActiveView: unable to find view\n";
}