summaryrefslogtreecommitdiff
path: root/x11/libqpe-x11/qpe/qpeapplication.cpp
Side-by-side diff
Diffstat (limited to 'x11/libqpe-x11/qpe/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--x11/libqpe-x11/qpe/qpeapplication.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/x11/libqpe-x11/qpe/qpeapplication.cpp b/x11/libqpe-x11/qpe/qpeapplication.cpp
index 6e4a96c..8785c74 100644
--- a/x11/libqpe-x11/qpe/qpeapplication.cpp
+++ b/x11/libqpe-x11/qpe/qpeapplication.cpp
@@ -632,6 +632,32 @@ void QPEApplication::hideOrQuit() {
quit();
}
+/*!
+ \internal
+*/
+void QPEApplication::prepareForTermination( bool willrestart )
+{
+ if ( willrestart ) {
+ // Draw a big wait icon, the image can be altered in later revisions
+ // QWidget *d = QApplication::desktop();
+ QImage img = Resource::loadImage( "launcher/new_wait" );
+ QPixmap pix;
+ pix.convertFromImage( img.smoothScale( 1 * img.width(), 1 * img.height() ) );
+ QLabel *lblWait = new QLabel( 0, "wait hack!", QWidget::WStyle_Customize |
+ QWidget::WStyle_NoBorder | QWidget::WStyle_Tool );
+ lblWait->setPixmap( pix );
+ lblWait->setAlignment( QWidget::AlignCenter );
+ lblWait->show();
+ lblWait->showMaximized();
+ }
+#ifndef SINGLE_APP
+ { QCopEnvelope envelope( "QPE/System", "forceQuit()" );
+ }
+ processEvents(); // ensure the message goes out.
+ sleep( 1 ); // You have 1 second to comply.
+#endif
+}
+
#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
// The libraries with the skiff package (and possibly others) have