-rw-r--r-- | kabc/addressbook.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 4 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index df0fba4..d101589 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp | |||
@@ -547,65 +547,65 @@ void AddressBook::smplifyAddressees() | |||
547 | { | 547 | { |
548 | Iterator ait; | 548 | Iterator ait; |
549 | for ( ait = begin(); ait != end(); ++ait ) { | 549 | for ( ait = begin(); ait != end(); ++ait ) { |
550 | (*ait).simplifyEmails(); | 550 | (*ait).simplifyEmails(); |
551 | (*ait).simplifyPhoneNumbers(); | 551 | (*ait).simplifyPhoneNumbers(); |
552 | (*ait).simplifyPhoneNumberTypes(); | 552 | (*ait).simplifyPhoneNumberTypes(); |
553 | (*ait).simplifyAddresses(); | 553 | (*ait).simplifyAddresses(); |
554 | } | 554 | } |
555 | } | 555 | } |
556 | void AddressBook::removeSyncInfo( QString syncProfile) | 556 | void AddressBook::removeSyncInfo( QString syncProfile) |
557 | { | 557 | { |
558 | Iterator ait; | 558 | Iterator ait; |
559 | for ( ait = begin(); ait != end(); ++ait ) { | 559 | for ( ait = begin(); ait != end(); ++ait ) { |
560 | (*ait).removeID( syncProfile ); | 560 | (*ait).removeID( syncProfile ); |
561 | } | 561 | } |
562 | if ( syncProfile.isEmpty() ) { | 562 | if ( syncProfile.isEmpty() ) { |
563 | Iterator it = begin(); | 563 | Iterator it = begin(); |
564 | Iterator it2 ; | 564 | Iterator it2 ; |
565 | QDateTime dt ( QDate( 2004,1,1) ); | 565 | QDateTime dt ( QDate( 2004,1,1) ); |
566 | while ( it != end() ) { | 566 | while ( it != end() ) { |
567 | if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") ) { | 567 | if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") ) { |
568 | it2 = it; | 568 | it2 = it; |
569 | //qDebug("removing %s ",(*it).uid().latin1() ); | 569 | //qDebug("removing %s ",(*it).uid().latin1() ); |
570 | ++it; | 570 | ++it; |
571 | removeAddressee( it2 ); | 571 | removeAddressee( it2 ); |
572 | } else { | 572 | } else { |
573 | //qDebug("skipping %s ",(*it).uid().latin1() ); | 573 | //qDebug("skipping %s ",(*it).uid().latin1() ); |
574 | ++it; | 574 | ++it; |
575 | } | 575 | } |
576 | } | 576 | } |
577 | } else { | 577 | } else { |
578 | Addressee lse; | 578 | Addressee lse; |
579 | lse = mAddressBook->findByUid( "last-syncAddressee-"+ syncProfile ); | 579 | lse = findByUid( "last-syncAddressee-"+ syncProfile ); |
580 | if ( ! lse.isEmpty() ) | 580 | if ( ! lse.isEmpty() ) |
581 | removeAddressee( lse ); | 581 | removeAddressee( lse ); |
582 | } | 582 | } |
583 | 583 | ||
584 | } | 584 | } |
585 | void AddressBook::preparePhoneSync( QString currentSyncDevice, bool isPreSync ) | 585 | void AddressBook::preparePhoneSync( QString currentSyncDevice, bool isPreSync ) |
586 | { | 586 | { |
587 | Iterator ait; | 587 | Iterator ait; |
588 | for ( ait = begin(); ait != end(); ++ait ) { | 588 | for ( ait = begin(); ait != end(); ++ait ) { |
589 | QString id = (*ait).IDStr(); | 589 | QString id = (*ait).IDStr(); |
590 | (*ait).setIDStr( ":"); | 590 | (*ait).setIDStr( ":"); |
591 | (*ait).setExternalUID( id ); | 591 | (*ait).setExternalUID( id ); |
592 | (*ait).setOriginalExternalUID( id ); | 592 | (*ait).setOriginalExternalUID( id ); |
593 | if ( isPreSync ) | 593 | if ( isPreSync ) |
594 | (*ait).setTempSyncStat( SYNC_TEMPSTATE_NEW_EXTERNAL ); | 594 | (*ait).setTempSyncStat( SYNC_TEMPSTATE_NEW_EXTERNAL ); |
595 | else { | 595 | else { |
596 | (*ait).setTempSyncStat( SYNC_TEMPSTATE_NEW_ID ); | 596 | (*ait).setTempSyncStat( SYNC_TEMPSTATE_NEW_ID ); |
597 | (*ait).setID( currentSyncDevice,id ); | 597 | (*ait).setID( currentSyncDevice,id ); |
598 | 598 | ||
599 | } | 599 | } |
600 | } | 600 | } |
601 | } | 601 | } |
602 | void AddressBook::findNewExtIds( QString fileName, QString currentSyncDevice ) | 602 | void AddressBook::findNewExtIds( QString fileName, QString currentSyncDevice ) |
603 | { | 603 | { |
604 | 604 | ||
605 | setUntagged(); | 605 | setUntagged(); |
606 | KABC::Addressee::List list; | 606 | KABC::Addressee::List list; |
607 | QFile file( fileName ); | 607 | QFile file( fileName ); |
608 | file.open( IO_ReadOnly ); | 608 | file.open( IO_ReadOnly ); |
609 | QByteArray rawData = file.readAll(); | 609 | QByteArray rawData = file.readAll(); |
610 | file.close(); | 610 | file.close(); |
611 | QString data; | 611 | QString data; |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index e56e46a..2f00a09 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -284,69 +284,69 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const | |||
284 | 284 | ||
285 | connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ), | 285 | connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ), |
286 | SLOT( incrementalSearch( const QString& ) ) ); | 286 | SLOT( incrementalSearch( const QString& ) ) ); |
287 | connect( mIncSearchWidget, SIGNAL( fieldChanged() ), | 287 | connect( mIncSearchWidget, SIGNAL( fieldChanged() ), |
288 | mJumpButtonBar, SLOT( recreateButtons() ) ); | 288 | mJumpButtonBar, SLOT( recreateButtons() ) ); |
289 | 289 | ||
290 | connect( mDetails, SIGNAL( sendEmail( const QString& ) ), | 290 | connect( mDetails, SIGNAL( sendEmail( const QString& ) ), |
291 | SLOT( sendMail( const QString& ) ) ); | 291 | SLOT( sendMail( const QString& ) ) ); |
292 | 292 | ||
293 | 293 | ||
294 | connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); | 294 | connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); |
295 | connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); | 295 | connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); |
296 | connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); | 296 | connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); |
297 | 297 | ||
298 | 298 | ||
299 | #ifndef KAB_EMBEDDED | 299 | #ifndef KAB_EMBEDDED |
300 | connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), | 300 | connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), |
301 | mXXPortManager, SLOT( importVCard( const KURL& ) ) ); | 301 | mXXPortManager, SLOT( importVCard( const KURL& ) ) ); |
302 | 302 | ||
303 | connect( mDetails, SIGNAL( browse( const QString& ) ), | 303 | connect( mDetails, SIGNAL( browse( const QString& ) ), |
304 | SLOT( browse( const QString& ) ) ); | 304 | SLOT( browse( const QString& ) ) ); |
305 | 305 | ||
306 | 306 | ||
307 | mAddressBookService = new KAddressBookService( this ); | 307 | mAddressBookService = new KAddressBookService( this ); |
308 | 308 | ||
309 | #endif //KAB_EMBEDDED | 309 | #endif //KAB_EMBEDDED |
310 | 310 | ||
311 | mMessageTimer = new QTimer( this ); | 311 | mMessageTimer = new QTimer( this ); |
312 | connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); | 312 | connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); |
313 | mEditorDialog = 0; | 313 | mEditorDialog = 0; |
314 | createAddresseeEditorDialog( this ); | 314 | createAddresseeEditorDialog( this ); |
315 | setModified( false ); | 315 | setModified( false ); |
316 | mBRdisabled = 0; | 316 | mBRdisabled = false; |
317 | #ifndef DESKTOP_VERSION | 317 | #ifndef DESKTOP_VERSION |
318 | infrared = 0; | 318 | infrared = 0; |
319 | #endif | 319 | #endif |
320 | toggleBeamReceive( ); | 320 | //toggleBeamReceive( ); |
321 | } | 321 | } |
322 | 322 | ||
323 | KABCore::~KABCore() | 323 | KABCore::~KABCore() |
324 | { | 324 | { |
325 | // save(); | 325 | // save(); |
326 | //saveSettings(); | 326 | //saveSettings(); |
327 | //KABPrefs::instance()->writeConfig(); | 327 | //KABPrefs::instance()->writeConfig(); |
328 | delete AddresseeConfig::instance(); | 328 | delete AddresseeConfig::instance(); |
329 | mAddressBook = 0; | 329 | mAddressBook = 0; |
330 | KABC::StdAddressBook::close(); | 330 | KABC::StdAddressBook::close(); |
331 | 331 | ||
332 | delete syncManager; | 332 | delete syncManager; |
333 | #ifndef DESKTOP_VERSION | 333 | #ifndef DESKTOP_VERSION |
334 | if ( infrared ) | 334 | if ( infrared ) |
335 | delete infrared; | 335 | delete infrared; |
336 | #endif | 336 | #endif |
337 | } | 337 | } |
338 | void KABCore::receive( const QCString& cmsg, const QByteArray& data ) | 338 | void KABCore::receive( const QCString& cmsg, const QByteArray& data ) |
339 | { | 339 | { |
340 | qDebug("KA: QCOP message received: %s ", cmsg.data() ); | 340 | qDebug("KA: QCOP message received: %s ", cmsg.data() ); |
341 | if ( cmsg == "setDocument(QString)" ) { | 341 | if ( cmsg == "setDocument(QString)" ) { |
342 | QDataStream stream( data, IO_ReadOnly ); | 342 | QDataStream stream( data, IO_ReadOnly ); |
343 | QString fileName; | 343 | QString fileName; |
344 | stream >> fileName; | 344 | stream >> fileName; |
345 | recieve( fileName ); | 345 | recieve( fileName ); |
346 | return; | 346 | return; |
347 | } | 347 | } |
348 | } | 348 | } |
349 | void KABCore::toggleBeamReceive( ) | 349 | void KABCore::toggleBeamReceive( ) |
350 | { | 350 | { |
351 | if ( mBRdisabled ) | 351 | if ( mBRdisabled ) |
352 | return; | 352 | return; |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index dc2026b..fc2d59b 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -250,65 +250,65 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
250 | mView->updateConfig(); | 250 | mView->updateConfig(); |
251 | // qApp->processEvents(); | 251 | // qApp->processEvents(); |
252 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); | 252 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); |
253 | //fillSyncMenu(); | 253 | //fillSyncMenu(); |
254 | 254 | ||
255 | 255 | ||
256 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); | 256 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); |
257 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); | 257 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); |
258 | connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); | 258 | connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); |
259 | mSyncManager->setDefaultFileName( defaultFileName()); | 259 | mSyncManager->setDefaultFileName( defaultFileName()); |
260 | connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); | 260 | connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); |
261 | mSyncManager->fillSyncMenu(); | 261 | mSyncManager->fillSyncMenu(); |
262 | 262 | ||
263 | 263 | ||
264 | 264 | ||
265 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); | 265 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); |
266 | if ( showWarning ) { | 266 | if ( showWarning ) { |
267 | KMessageBox::information( this, | 267 | KMessageBox::information( this, |
268 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); | 268 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); |
269 | qApp->processEvents(); | 269 | qApp->processEvents(); |
270 | mView->dialogManager()->showSyncOptions(); | 270 | mView->dialogManager()->showSyncOptions(); |
271 | } | 271 | } |
272 | 272 | ||
273 | //US listen for result adressed from Ka/Pi | 273 | //US listen for result adressed from Ka/Pi |
274 | #ifndef DESKTOP_VERSION | 274 | #ifndef DESKTOP_VERSION |
275 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 275 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |
276 | #endif | 276 | #endif |
277 | #ifndef DESKTOP_VERSION | 277 | #ifndef DESKTOP_VERSION |
278 | infrared = 0; | 278 | infrared = 0; |
279 | #endif | 279 | #endif |
280 | 280 | ||
281 | mBRdisabled = false; | 281 | mBRdisabled = false; |
282 | toggleBeamReceive(); | 282 | //toggleBeamReceive(); |
283 | } | 283 | } |
284 | MainWindow::~MainWindow() | 284 | MainWindow::~MainWindow() |
285 | { | 285 | { |
286 | //qDebug("MainWindow::~MainWindow() "); | 286 | //qDebug("MainWindow::~MainWindow() "); |
287 | //save toolbar location | 287 | //save toolbar location |
288 | delete mCalendar; | 288 | delete mCalendar; |
289 | delete mSyncManager; | 289 | delete mSyncManager; |
290 | #ifndef DESKTOP_VERSION | 290 | #ifndef DESKTOP_VERSION |
291 | if ( infrared ) | 291 | if ( infrared ) |
292 | delete infrared; | 292 | delete infrared; |
293 | #endif | 293 | #endif |
294 | 294 | ||
295 | 295 | ||
296 | } | 296 | } |
297 | 297 | ||
298 | void MainWindow::disableBR(bool b) | 298 | void MainWindow::disableBR(bool b) |
299 | { | 299 | { |
300 | #ifndef DESKTOP_VERSION | 300 | #ifndef DESKTOP_VERSION |
301 | if ( b ) { | 301 | if ( b ) { |
302 | if ( infrared ) { | 302 | if ( infrared ) { |
303 | toggleBeamReceive(); | 303 | toggleBeamReceive(); |
304 | mBRdisabled = true; | 304 | mBRdisabled = true; |
305 | } | 305 | } |
306 | mBRdisabled = true; | 306 | mBRdisabled = true; |
307 | } else { | 307 | } else { |
308 | if ( mBRdisabled ) { | 308 | if ( mBRdisabled ) { |
309 | mBRdisabled = false; | 309 | mBRdisabled = false; |
310 | //makes no sense,because other cal ap is probably running | 310 | //makes no sense,because other cal ap is probably running |
311 | // toggleBeamReceive(); | 311 | // toggleBeamReceive(); |
312 | } | 312 | } |
313 | } | 313 | } |
314 | #endif | 314 | #endif |