summaryrefslogtreecommitdiff
path: root/core/applets/logoutapplet/logout.cpp
Unidiff
Diffstat (limited to 'core/applets/logoutapplet/logout.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/logoutapplet/logout.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/applets/logoutapplet/logout.cpp b/core/applets/logoutapplet/logout.cpp
index 1769ae6..8d3cdba 100644
--- a/core/applets/logoutapplet/logout.cpp
+++ b/core/applets/logoutapplet/logout.cpp
@@ -90,35 +90,37 @@ void LogoutApplet::activated ( )
90 90
91 mb. setButtonText ( QMessageBox::Yes, "Yes" ); 91 mb. setButtonText ( QMessageBox::Yes, "Yes" );
92 mb. setButtonText ( QMessageBox::No, "No" ); 92 mb. setButtonText ( QMessageBox::No, "No" );
93 mb. setIconPixmap ( icon ( ). pixmap ( )); 93 mb. setIconPixmap ( icon ( ). pixmap ( ));
94 94
95 if ( mb. exec ( ) == QMessageBox::Yes ) { 95 if ( mb. exec ( ) == QMessageBox::Yes ) {
96 { QCopEnvelope envelope( "QPE/System", "forceQuit()" ); } 96 { QCopEnvelope envelope( "QPE/System", "forceQuit()" ); }
97 97
98 qApp-> processEvents ( ); // ensure the message goes out. 98 qApp-> processEvents ( ); // ensure the message goes out.
99 sleep ( 1 ); // You have 1 second to comply. 99 sleep ( 1 ); // You have 1 second to comply.
100 100
101 ((HackApplication *) qApp )-> emit_about_to_quit ( ); 101 ((HackApplication *) qApp )-> emit_about_to_quit ( );
102 qApp-> quit(); 102 qApp-> quit();
103 } 103 }
104} 104}
105 105
106 106
107QRESULT LogoutApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) 107QRESULT LogoutApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface )
108{ 108{
109 *iface = 0; 109 *iface = 0;
110 if ( uuid == IID_QUnknown ) 110 if ( uuid == IID_QUnknown )
111 *iface = this; 111 *iface = this;
112 else if ( uuid == IID_MenuApplet ) 112 else if ( uuid == IID_MenuApplet )
113 *iface = this; 113 *iface = this;
114 else
115 return QS_FALSE;
114 116
115 if ( *iface ) 117 if ( *iface )
116 (*iface)-> addRef ( ); 118 (*iface)-> addRef ( );
117 return QS_OK; 119 return QS_OK;
118} 120}
119 121
120Q_EXPORT_INTERFACE( ) 122Q_EXPORT_INTERFACE( )
121{ 123{
122 Q_CREATE_INSTANCE( LogoutApplet ) 124 Q_CREATE_INSTANCE( LogoutApplet )
123} 125}
124 126