From 02fa432f183ad2b18380de0e41399efe3b867dba Mon Sep 17 00:00:00 2001 From: zautrix Date: Tue, 23 Aug 2005 13:59:59 +0000 Subject: fixx --- (limited to 'kaddressbook/kabcore.cpp') diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index b9830b1..c670b1f 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -403,9 +403,32 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const //toggleBeamReceive( ); mMainWindow->toolBar()->show(); // we have a toolbar repainting error on the Zaurus when starting KA/Pi - QTimer::singleShot( 10, this , SLOT ( updateToolBar())); + //QTimer::singleShot( 10, this , SLOT ( updateToolBar())); + QTimer::singleShot( 100, this, SLOT ( loadDataAfterStart() )); +} +void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data ) +{ + qDebug("KO: QCOP start message received: %s ", cmsg.data() ); + mCStringMess = cmsg; + mByteData = data; } +void KABCore::loadDataAfterStart() +{ + qDebug("KABCore::loadDataAfterStart() "); + ((StdAddressBook*)mAddressBook)->init( true ); + mViewManager->refreshView(); + +#ifndef DESKTOP_VERSION + disconnect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT (receiveStart ( const QCString &, const QByteArray & ))); + + QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); + if ( !mCStringMess.isEmpty() ) + ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData ); +#endif + QTimer::singleShot( 10, this , SLOT ( updateToolBar())); + setCaptionBack(); +} void KABCore::updateToolBar() { static int iii = 0; @@ -2445,7 +2468,6 @@ void KABCore::removeVoice() } } message(i18n("Refreshing view...") ); - qApp->processEvents(); mViewManager->refreshView( "" ); Addressee add; mDetails->setAddressee( add ); @@ -2477,7 +2499,6 @@ void KABCore::setFormattedName() ++count; if ( count %10 == 0 ) message(i18n("Changing contact #%1").arg( count ) ); - qApp->processEvents(); QString fName; if ( setpref.simple->isChecked() ) fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); @@ -2497,7 +2518,6 @@ void KABCore::setFormattedName() } } message(i18n("Refreshing view...") ); - qApp->processEvents(); if ( modified ) setModified( true ); Addressee add; -- cgit v0.9.0.2