void ImodvWindow::closeEvent ( QCloseEvent * e ) { if (ImodvClosed) return; imodvQuit(); e->accept(); }
void ImodClipboard::clipTimeout() { // If exiting flag is set, then finally quit if (mExiting) { // But during initial load, it may need two chances to get the message out. if (sInitialLoad && mExiting < 2) { mExiting++; QTimer::singleShot(50, this, SLOT(clipTimeout())); return; } if (ImodvClosed || !Imodv->standalone) imod_quit(); else imodvQuit(); } else { // If it time to do deferred handling, now set the flag positive if (mDeferredHandling < 0) { mDeferredHandling = 1; mHandling = true; } // Otherwise, execute the message if (executeMessage()) { // If it returns true, set the exiting flag and start another timer // 100 ms is too short on SGI mExiting = 1; QTimer::singleShot(200, this, SLOT(clipTimeout())); } mHandling = false; } }