summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Unidiff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 77321aa..af12f2b 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -363,115 +363,115 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
363 SLOT( setModified() ) ); 363 SLOT( setModified() ) );
364 364
365 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ), 365 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ),
366 SLOT( incrementalSearchJump( const QString& ) ) ); 366 SLOT( incrementalSearchJump( const QString& ) ) );
367 connect( mIncSearchWidget, SIGNAL( fieldChanged() ), 367 connect( mIncSearchWidget, SIGNAL( fieldChanged() ),
368 mJumpButtonBar, SLOT( recreateButtons() ) ); 368 mJumpButtonBar, SLOT( recreateButtons() ) );
369 369
370 connect( mDetails, SIGNAL( sendEmail( const QString& ) ), 370 connect( mDetails, SIGNAL( sendEmail( const QString& ) ),
371 SLOT( sendMail( const QString& ) ) ); 371 SLOT( sendMail( const QString& ) ) );
372 372
373 373
374 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); 374 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&)));
375 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&))); 375 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&)));
376 connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); 376 connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&)));
377 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); 377 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle()));
378 connect( ExternalAppHandler::instance(), SIGNAL (doRingSync()),this, SLOT( doRingSync())); 378 connect( ExternalAppHandler::instance(), SIGNAL (doRingSync()),this, SLOT( doRingSync()));
379 connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog())); 379 connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog()));
380 380
381 381
382#ifndef KAB_EMBEDDED 382#ifndef KAB_EMBEDDED
383 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), 383 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ),
384 mXXPortManager, SLOT( importVCard( const KURL& ) ) ); 384 mXXPortManager, SLOT( importVCard( const KURL& ) ) );
385 385
386 connect( mDetails, SIGNAL( browse( const QString& ) ), 386 connect( mDetails, SIGNAL( browse( const QString& ) ),
387 SLOT( browse( const QString& ) ) ); 387 SLOT( browse( const QString& ) ) );
388 388
389 389
390 mAddressBookService = new KAddressBookService( this ); 390 mAddressBookService = new KAddressBookService( this );
391 391
392#endif //KAB_EMBEDDED 392#endif //KAB_EMBEDDED
393 393
394 mMessageTimer = new QTimer( this ); 394 mMessageTimer = new QTimer( this );
395 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); 395 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) );
396 mEditorDialog = 0; 396 mEditorDialog = 0;
397 createAddresseeEditorDialog( this ); 397 createAddresseeEditorDialog( this );
398 setModified( false ); 398 setModified( false );
399 mBRdisabled = false; 399 mBRdisabled = false;
400#ifndef DESKTOP_VERSION 400#ifndef DESKTOP_VERSION
401 infrared = 0; 401 infrared = 0;
402#endif 402#endif
403 //toggleBeamReceive( ); 403 //toggleBeamReceive( );
404 mMainWindow->toolBar()->show(); 404 mMainWindow->toolBar()->show();
405 // we have a toolbar repainting error on the Zaurus when starting KA/Pi 405 // we have a toolbar repainting error on the Zaurus when starting KA/Pi
406 //QTimer::singleShot( 10, this , SLOT ( updateToolBar())); 406 //QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
407 QTimer::singleShot( 100, this, SLOT ( loadDataAfterStart() )); 407 QTimer::singleShot( 100, this, SLOT ( loadDataAfterStart() ));
408} 408}
409void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data ) 409void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data )
410{ 410{
411 qDebug("KO: QCOP start message received: %s ", cmsg.data() ); 411 //qDebug("KO: QCOP start message received: %s ", cmsg.data() );
412 mCStringMess = cmsg; 412 mCStringMess = cmsg;
413 mByteData = data; 413 mByteData = data;
414} 414}
415 415
416void KABCore::loadDataAfterStart() 416void KABCore::loadDataAfterStart()
417{ 417{
418 qDebug("KABCore::loadDataAfterStart() "); 418 //qDebug("KABCore::loadDataAfterStart() ");
419 ((StdAddressBook*)mAddressBook)->init( true ); 419 ((StdAddressBook*)mAddressBook)->init( true );
420 mViewManager->refreshView(); 420 mViewManager->refreshView();
421 421
422#ifndef DESKTOP_VERSION 422#ifndef DESKTOP_VERSION
423 disconnect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT (receiveStart ( const QCString &, const QByteArray & ))); 423 disconnect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT (receiveStart ( const QCString &, const QByteArray & )));
424 424
425 QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 425 QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
426 if ( !mCStringMess.isEmpty() ) 426 if ( !mCStringMess.isEmpty() )
427 ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData ); 427 ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData );
428#endif 428#endif
429 QTimer::singleShot( 10, this , SLOT ( updateToolBar())); 429 // QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
430 setCaptionBack(); 430 setCaptionBack();
431} 431}
432void KABCore::updateToolBar() 432void KABCore::updateToolBar()
433{ 433{
434 static int iii = 0; 434 static int iii = 0;
435 ++iii; 435 ++iii;
436 mMainWindow->toolBar()->repaintMe(); 436 mMainWindow->toolBar()->repaintMe();
437 if ( iii < 4 ) 437 if ( iii < 4 )
438 QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar())); 438 QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar()));
439} 439}
440KABCore::~KABCore() 440KABCore::~KABCore()
441{ 441{
442 // save(); 442 // save();
443 //saveSettings(); 443 //saveSettings();
444 //KABPrefs::instance()->writeConfig(); 444 //KABPrefs::instance()->writeConfig();
445 delete AddresseeConfig::instance(); 445 delete AddresseeConfig::instance();
446 mAddressBook = 0; 446 mAddressBook = 0;
447 KABC::StdAddressBook::close(); 447 KABC::StdAddressBook::close();
448 448
449 delete syncManager; 449 delete syncManager;
450#ifndef DESKTOP_VERSION 450#ifndef DESKTOP_VERSION
451 if ( infrared ) 451 if ( infrared )
452 delete infrared; 452 delete infrared;
453#endif 453#endif
454} 454}
455void KABCore::receive( const QCString& cmsg, const QByteArray& data ) 455void KABCore::receive( const QCString& cmsg, const QByteArray& data )
456{ 456{
457 //qDebug("KA: QCOP message received: %s ", cmsg.data() ); 457 //qDebug("KA: QCOP message received: %s ", cmsg.data() );
458 if ( cmsg == "setDocument(QString)" ) { 458 if ( cmsg == "setDocument(QString)" ) {
459 QDataStream stream( data, IO_ReadOnly ); 459 QDataStream stream( data, IO_ReadOnly );
460 QString fileName; 460 QString fileName;
461 stream >> fileName; 461 stream >> fileName;
462 recieve( fileName ); 462 recieve( fileName );
463 return; 463 return;
464 } 464 }
465} 465}
466void KABCore::toggleBeamReceive( ) 466void KABCore::toggleBeamReceive( )
467{ 467{
468 if ( mBRdisabled ) 468 if ( mBRdisabled )
469 return; 469 return;
470#ifndef DESKTOP_VERSION 470#ifndef DESKTOP_VERSION
471 if ( infrared ) { 471 if ( infrared ) {
472 qDebug("KA: AB disable BeamReceive "); 472 qDebug("KA: AB disable BeamReceive ");
473 delete infrared; 473 delete infrared;
474 infrared = 0; 474 infrared = 0;
475 mActionBR->setChecked(false); 475 mActionBR->setChecked(false);
476 return; 476 return;
477 } 477 }