summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-04-21 17:15:01 (UTC)
committer kergoth <kergoth>2003-04-21 17:15:01 (UTC)
commitb3ec819dfed40b05b2bea1b1392de774bc1f572d (patch) (unidiff)
treec0e30307ba6623f49cda10ce35e7f3323b4062f8
parenteecb4b6d3c22466f273c3498b6370b1e1c67c726 (diff)
downloadopie-b3ec819dfed40b05b2bea1b1392de774bc1f572d.zip
opie-b3ec819dfed40b05b2bea1b1392de774bc1f572d.tar.gz
opie-b3ec819dfed40b05b2bea1b1392de774bc1f572d.tar.bz2
Final fix for the suspend bug
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 501b601..62e3569 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -57,6 +57,4 @@ using namespace Opie;
57class ODeviceData { 57class ODeviceData {
58public: 58public:
59 bool m_qwsserver : 1;
60
61 QString m_vendorstr; 59 QString m_vendorstr;
62 OVendor m_vendor; 60 OVendor m_vendor;
@@ -240,6 +238,8 @@ static QCString makeChannel ( const char *str )
240} 238}
241 239
242 240static inline bool isQWS()
243 241{
242 return qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false;
243}
244 244
245ODevice *ODevice::inst ( ) 245ODevice *ODevice::inst ( )
@@ -272,6 +272,4 @@ ODevice::ODevice ( )
272 d = new ODeviceData; 272 d = new ODeviceData;
273 273
274 d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false;
275
276 d-> m_modelstr = "Unknown"; 274 d-> m_modelstr = "Unknown";
277 d-> m_model = Model_Unknown; 275 d-> m_model = Model_Unknown;
@@ -307,6 +305,4 @@ void ODevice::initButtons ( )
307 return; 305 return;
308 306
309 d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false;
310
311 // Simulation uses iPAQ 3660 device buttons 307 // Simulation uses iPAQ 3660 device buttons
312 308
@@ -360,5 +356,5 @@ bool ODevice::setSoftSuspend ( bool /*soft*/ )
360bool ODevice::suspend ( ) 356bool ODevice::suspend ( )
361{ 357{
362 if ( !d-> m_qwsserver ) // only qwsserver is allowed to suspend 358 if ( !isQWS( ) ) // only qwsserver is allowed to suspend
363 return false; 359 return false;
364 360
@@ -808,7 +804,5 @@ void iPAQ::initButtons ( )
808 return; 804 return;
809 805
810 d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false; 806 if ( isQWS( ) )
811
812 if ( d-> m_qwsserver )
813 QWSServer::setKeyboardFilter ( this ); 807 QWSServer::setKeyboardFilter ( this );
814 808
@@ -1208,6 +1202,4 @@ void Zaurus::initButtons ( )
1208 return; 1202 return;
1209 1203
1210 d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false;
1211
1212 d-> m_buttons = new QValueList <ODeviceButton>; 1204 d-> m_buttons = new QValueList <ODeviceButton>;
1213 1205