summaryrefslogtreecommitdiff
path: root/core/launcher/shutdownimpl.cpp
Unidiff
Diffstat (limited to 'core/launcher/shutdownimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/shutdownimpl.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/launcher/shutdownimpl.cpp b/core/launcher/shutdownimpl.cpp
index b1925d9..9292bb8 100644
--- a/core/launcher/shutdownimpl.cpp
+++ b/core/launcher/shutdownimpl.cpp
@@ -12,24 +12,25 @@
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "shutdownimpl.h" 21#include "shutdownimpl.h"
22 22
23#include <qpe/global.h> 23#include <qpe/global.h>
24#include <qpe/qcopenvelope_qws.h>
24 25
25#include <qtimer.h> 26#include <qtimer.h>
26#include <qprogressbar.h> 27#include <qprogressbar.h>
27#include <qpushbutton.h> 28#include <qpushbutton.h>
28#include <qbuttongroup.h> 29#include <qbuttongroup.h>
29#include <qlabel.h> 30#include <qlabel.h>
30#include <qlayout.h> 31#include <qlayout.h>
31#include <qpalette.h> 32#include <qpalette.h>
32 33
33 34
34static void changeButtonColor ( QPushButton *btn, const QColor &col ) 35static void changeButtonColor ( QPushButton *btn, const QColor &col )
35{ 36{
@@ -156,13 +157,23 @@ void ShutdownImpl::cancelClicked ( )
156 157
157void ShutdownImpl::timeout ( ) 158void ShutdownImpl::timeout ( )
158{ 159{
159 if ( ( m_counter += 2 ) > m_progress-> totalSteps ( ) ) { 160 if ( ( m_counter += 2 ) > m_progress-> totalSteps ( ) ) {
160 m_progress-> hide ( ); 161 m_progress-> hide ( );
161 m_timer-> stop ( ); 162 m_timer-> stop ( );
162 emit shutdown ( m_operation ); 163 emit shutdown ( m_operation );
163 } 164 }
164 else 165 else
165 m_progress-> setProgress ( m_counter ); 166 m_progress-> setProgress ( m_counter );
166} 167}
167 168
169void ShutdownImpl::hide ( )
170{
171 if ( isVisible ( )) {
172 // hack - shutdown is a launcher dialog, but treated like a standalone app
173 QCopEnvelope e( "QPE/System", "closing(QString)" );
174 e << QString ( "shutdown" );
175
176 }
177 QWidget::hide ( );
178}
168 179