author | zecke <zecke> | 2003-02-15 14:07:56 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-02-15 14:07:56 (UTC) |
commit | b1b8d1d40624c37555412047b6d925e043d2f388 (patch) (side-by-side diff) | |
tree | 2f1e4d28ea6698a9df9a4e36b14102aa5908f33e | |
parent | 4049351d6bd48c8e5866f3bc047f567dfe4b35d6 (diff) | |
download | opie-b1b8d1d40624c37555412047b6d925e043d2f388.zip opie-b1b8d1d40624c37555412047b6d925e043d2f388.tar.gz opie-b1b8d1d40624c37555412047b6d925e043d2f388.tar.bz2 |
Implement flush and reload
so that syncing works with Opie/X11 again
-rw-r--r-- | x11/libqpe-x11/qpe/qpeapplication.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/x11/libqpe-x11/qpe/qpeapplication.cpp b/x11/libqpe-x11/qpe/qpeapplication.cpp index c4f8f38..ed815f8 100644 --- a/x11/libqpe-x11/qpe/qpeapplication.cpp +++ b/x11/libqpe-x11/qpe/qpeapplication.cpp @@ -457,97 +457,104 @@ void QPEApplication::showDialog( QDialog* d, bool nomax ) { { d->showMaximized(); } else { d->resize(w,h); d->show(); } } int QPEApplication::execDialog( QDialog* d, bool nomax) { showDialog(d,nomax); return d->exec(); } void QPEApplication::setKeepRunning() { if ( qApp && qApp->inherits( "QPEApplication" ) ) { QPEApplication * qpeApp = ( QPEApplication* ) qApp; qpeApp->d->keep_running = TRUE; } } bool QPEApplication::keepRunning()const { return d->keep_running; } bool QPEApplication::keyboardGrabbed()const { return d->kbgrabber; } int QPEApplication::exec() { /* now send the QCOP stuff gotten from the file */ d->sendQCopQ(); if ( d->keep_running ) { qWarning("going to exec"); int a = QApplication::exec(); qWarning("left"); return a; } { QCopEnvelope e( "QPE/System", "closing(QString)" ); e << d->appName; } qWarning("processing events!"); processEvents(); return 0; } void QPEApplication::internalSetStyle( const QString& ) { } void QPEApplication::systemMessage( const QCString& chan, const QByteArray& ) { qWarning("QPEApplication::systemMessage( %s )", chan.data() ); } -void QPEApplication::pidMessage( const QCString&, const QByteArray& ) { +void QPEApplication::pidMessage( const QCString& msg, const QByteArray& ) { + if ( msg == "flush()" ) { + emit flush(); + QCopEnvelope e( "QPE/Desktop", "flushDone(QString)" ); + e << d->appName; + }else if ( msg == "reload()" ) { + emit reload(); + } } void QPEApplication::timerEvent( QTimerEvent* e ) { if ( e->timerId() == d->presstimer && d->presswidget ) { // Right pressed postEvent( d->presswidget, new QMouseEvent( QEvent::MouseButtonPress, d->presspos, RightButton, LeftButton ) ); killTimer( d->presstimer ); d->presstimer = 0; } } // InputMethods Hints namespace { static QPtrDict<void>* inputMethodDict = 0; static void createInputMethodDict(){ if ( !inputMethodDict ) inputMethodDict = new QPtrDict<void>; } static QPtrDict<void>* stylusDict = 0; static void createDict() { if ( !stylusDict ) stylusDict = new QPtrDict<void>; } }; void QPEApplication::setInputMethodHint( QWidget* w, InputMethodHint mode ) { createInputMethodDict(); if ( mode == Normal ) { inputMethodDict->remove ( w ); }else { inputMethodDict->insert( w, ( void* ) mode ); } } QPEApplication::InputMethodHint QPEApplication::inputMethodHint( QWidget* w) { if ( inputMethodDict && w ) return ( InputMethodHint ) ( int ) inputMethodDict->find( w ); return Normal; } void QPEApplication::removeSenderFromStylusDict() { stylusDict->remove( ( void* ) sender() ); if ( d->presswidget == sender() ) d->presswidget = 0; |