author | zautrix <zautrix> | 2005-01-18 14:09:00 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-18 14:09:00 (UTC) |
commit | ced210b0c4643ddac6a2e80eab4c85c1994b20e0 (patch) (unidiff) | |
tree | 5126b599b1213553ae71512a400f46d7b2037d92 /kaddressbook | |
parent | 4b82a36d1b2479dd2e6f00aef45af848f6793099 (diff) | |
download | kdepimpi-ced210b0c4643ddac6a2e80eab4c85c1994b20e0.zip kdepimpi-ced210b0c4643ddac6a2e80eab4c85c1994b20e0.tar.gz kdepimpi-ced210b0c4643ddac6a2e80eab4c85c1994b20e0.tar.bz2 |
ab sync fixes
-rw-r--r-- | kaddressbook/imagewidget.cpp | 5 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 7 | ||||
-rw-r--r-- | kaddressbook/views/kaddressbooktableview.cpp | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp index 1e9743c..d0f52ea 100644 --- a/kaddressbook/imagewidget.cpp +++ b/kaddressbook/imagewidget.cpp | |||
@@ -236,14 +236,15 @@ KABC::Picture ImageWidget::logo() const | |||
236 | if ( px ) { | 236 | if ( px ) { |
237 | #ifndef KAB_EMBEDDED | 237 | #ifndef KAB_EMBEDDED |
238 | if ( px->height() > px->width() ) | 238 | if ( px->height() > px->width() ) |
239 | logo.setData( px->convertToImage().scaleHeight( 140 ) ); | 239 | logo.setData( px->convertToImage().scaleHeight( 140 ) ); |
240 | else | 240 | else |
241 | logo.setData( px->convertToImage().scaleWidth( 100 ) ); | 241 | logo.setData( px->convertToImage().scaleWidth( 100 ) ); |
242 | #else //KAB_EMBEDDED | 242 | #else //KAB_EMBEDDED |
243 | logo.setData( px->convertToImage() ); | 243 | if (px->isNull() != true ) |
244 | logo.setData( px->convertToImage() ); | ||
244 | #endif //KAB_EMBEDDED | 245 | #endif //KAB_EMBEDDED |
245 | 246 | ||
246 | logo.setType( "PNG" ); | 247 | logo.setType( "PNG" ); |
247 | 248 | ||
248 | } | 249 | } |
249 | } | 250 | } |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index d970ff1..e88706e 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -1185,12 +1185,16 @@ bool KABCore::modified() const | |||
1185 | return mModified; | 1185 | return mModified; |
1186 | } | 1186 | } |
1187 | 1187 | ||
1188 | void KABCore::contactModified( const KABC::Addressee &addr ) | 1188 | void KABCore::contactModified( const KABC::Addressee &addr ) |
1189 | { | 1189 | { |
1190 | addrModified( addr ); | 1190 | addrModified( addr ); |
1191 | #if 0 // debug only | ||
1192 | KABC::Addressee ad = addr; | ||
1193 | ad.computeCsum( "123"); | ||
1194 | #endif | ||
1191 | } | 1195 | } |
1192 | 1196 | ||
1193 | void KABCore::addrModified( const KABC::Addressee &addr ,bool updateDetails ) | 1197 | void KABCore::addrModified( const KABC::Addressee &addr ,bool updateDetails ) |
1194 | { | 1198 | { |
1195 | 1199 | ||
1196 | Command *command = 0; | 1200 | Command *command = 0; |
@@ -2710,13 +2714,14 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i | |||
2710 | 2714 | ||
2711 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); | 2715 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); |
2712 | 2716 | ||
2713 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2717 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2714 | bool remCh, locCh; | 2718 | bool remCh, locCh; |
2715 | remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); | 2719 | remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); |
2716 | //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); | 2720 | if ( remCh ) |
2721 | qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); | ||
2717 | locCh = ( localMod > mLastAddressbookSync ); | 2722 | locCh = ( localMod > mLastAddressbookSync ); |
2718 | //qDebug("cahnged rem %d loc %d",remCh, locCh ); | 2723 | //qDebug("cahnged rem %d loc %d",remCh, locCh ); |
2719 | if ( !remCh && ! locCh ) { | 2724 | if ( !remCh && ! locCh ) { |
2720 | //qDebug("both not changed "); | 2725 | //qDebug("both not changed "); |
2721 | lastSync = localMod.addDays(1); | 2726 | lastSync = localMod.addDays(1); |
2722 | if ( mode <= SYNC_PREF_ASK ) | 2727 | if ( mode <= SYNC_PREF_ASK ) |
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp index ecd6f05..7022dcb 100644 --- a/kaddressbook/views/kaddressbooktableview.cpp +++ b/kaddressbook/views/kaddressbooktableview.cpp | |||
@@ -154,13 +154,13 @@ void KAddressBookTableView::doSearch( const QString& s, KABC::Field *field ) | |||
154 | KABC::Addressee::List::Iterator it; | 154 | KABC::Addressee::List::Iterator it; |
155 | if ( field ) { | 155 | if ( field ) { |
156 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { | 156 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { |
157 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) | 157 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) |
158 | continue; | 158 | continue; |
159 | #if QT_VERSION >= 300 | 159 | #if QT_VERSION >= 300 |
160 | if (re.search(field->value( *it ).lower()) != -1) | 160 | if (re.search(field->value( *it ).lower()) == 0) |
161 | #else | 161 | #else |
162 | if (re.match(field->value( *it ).lower()) != -1) | 162 | if (re.match(field->value( *it ).lower()) != -1) |
163 | #endif | 163 | #endif |
164 | ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields()); | 164 | ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields()); |
165 | 165 | ||
166 | } | 166 | } |