summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Unidiff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp28
1 files changed, 24 insertions, 4 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index b9830b1..c670b1f 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -402,11 +402,34 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
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() ));
408}
409void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data )
410{
411 qDebug("KO: QCOP start message received: %s ", cmsg.data() );
412 mCStringMess = cmsg;
413 mByteData = data;
407} 414}
408 415
416void KABCore::loadDataAfterStart()
417{
418 qDebug("KABCore::loadDataAfterStart() ");
419 ((StdAddressBook*)mAddressBook)->init( true );
420 mViewManager->refreshView();
421
422#ifndef DESKTOP_VERSION
423 disconnect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT (receiveStart ( const QCString &, const QByteArray & )));
424
425 QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
426 if ( !mCStringMess.isEmpty() )
427 ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData );
428#endif
429 QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
430 setCaptionBack();
431}
409void KABCore::updateToolBar() 432void KABCore::updateToolBar()
410{ 433{
411 static int iii = 0; 434 static int iii = 0;
412 ++iii; 435 ++iii;
@@ -2444,9 +2467,8 @@ void KABCore::removeVoice()
2444 (*it).removeVoice(); 2467 (*it).removeVoice();
2445 } 2468 }
2446 } 2469 }
2447 message(i18n("Refreshing view...") ); 2470 message(i18n("Refreshing view...") );
2448 qApp->processEvents();
2449 mViewManager->refreshView( "" ); 2471 mViewManager->refreshView( "" );
2450 Addressee add; 2472 Addressee add;
2451 mDetails->setAddressee( add ); 2473 mDetails->setAddressee( add );
2452 message(i18n("Remove voice completed!") ); 2474 message(i18n("Remove voice completed!") );
@@ -2476,9 +2498,8 @@ void KABCore::setFormattedName()
2476 continue; 2498 continue;
2477 ++count; 2499 ++count;
2478 if ( count %10 == 0 ) 2500 if ( count %10 == 0 )
2479 message(i18n("Changing contact #%1").arg( count ) ); 2501 message(i18n("Changing contact #%1").arg( count ) );
2480 qApp->processEvents();
2481 QString fName; 2502 QString fName;
2482 if ( setpref.simple->isChecked() ) 2503 if ( setpref.simple->isChecked() )
2483 fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); 2504 fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName );
2484 else if ( setpref.full->isChecked() ) 2505 else if ( setpref.full->isChecked() )
@@ -2496,9 +2517,8 @@ void KABCore::setFormattedName()
2496 (*it).setRevision( QDateTime::currentDateTime() ); 2517 (*it).setRevision( QDateTime::currentDateTime() );
2497 } 2518 }
2498 } 2519 }
2499 message(i18n("Refreshing view...") ); 2520 message(i18n("Refreshing view...") );
2500 qApp->processEvents();
2501 if ( modified ) 2521 if ( modified )
2502 setModified( true ); 2522 setModified( true );
2503 Addressee add; 2523 Addressee add;
2504 mDetails->setAddressee( add ); 2524 mDetails->setAddressee( add );