-rw-r--r-- | libopie2/opiecore/device/odevice_abstractmobiledevice.cpp | 16 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 24 |
2 files changed, 14 insertions, 26 deletions
diff --git a/libopie2/opiecore/device/odevice_abstractmobiledevice.cpp b/libopie2/opiecore/device/odevice_abstractmobiledevice.cpp index b446d05..7ee72ba 100644 --- a/libopie2/opiecore/device/odevice_abstractmobiledevice.cpp +++ b/libopie2/opiecore/device/odevice_abstractmobiledevice.cpp @@ -28,13 +28,14 @@ */ #include "odevice_abstractmobiledevice.h" -#include <qpe/qcopenvelope_qws.h> +/* QT */ +#include <qcopchannel_qws.h> +/* STD */ #include <sys/time.h> #include <sys/ioctl.h> - #include <time.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> @@ -61,13 +62,9 @@ bool OAbstractMobileDevice::suspend() { if ( !isQWS( ) ) // only qwsserver is allowed to suspend return false; bool res = false; - - { - QCopEnvelope( "QPE/System", "aboutToSuspend()" ); - } - qApp->processEvents(); // ensure the qcop call is being processed asap + QCopChannel::send( "QPE/System", "aboutToSuspend()" ); struct timeval tvs, tvn; ::gettimeofday ( &tvs, 0 ); @@ -84,12 +81,9 @@ bool OAbstractMobileDevice::suspend() { ::gettimeofday ( &tvn, 0 ); } while ((( tvn. tv_sec - tvs. tv_sec ) * 1000 + ( tvn. tv_usec - tvs. tv_usec ) / 1000 ) < m_timeOut ); } - { - QCopEnvelope( "QPE/System", "returnFromSuspend()" ); - } - qApp->processEvents(); // ensure the qcop call is being processed asap + QCopChannel::send( "QPE/System", "returnFromSuspend()" ); return res; } diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index 2b2467c..33d5cd6 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp @@ -28,21 +28,21 @@ */ #include "odevice_zaurus.h" -/* QT */ -#include <qapplication.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qwindowsystem_qws.h> - /* OPIE */ #include <opie2/oinputsystem.h> #include <opie2/oresource.h> #include <qpe/config.h> #include <qpe/sound.h> -#include <qpe/qcopenvelope_qws.h> + +/* QT */ +#include <qapplication.h> +#include <qfile.h> +#include <qtextstream.h> +#include <qwindowsystem_qws.h> +#include <qcopchannel_qws.h> /* STD */ #include <fcntl.h> #include <math.h> @@ -711,12 +711,9 @@ bool Zaurus::suspend() { if ( !isQWS( ) ) // only qwsserver is allowed to suspend return false; bool res = false; - { - QCopEnvelope( "QPE/System", "aboutToSuspend()" ); - } - qApp->processEvents(); // ensure the qcop call is being processed asap + QCopChannel::send( "QPE/System", "aboutToSuspend()" ); struct timeval tvs, tvn; ::gettimeofday ( &tvs, 0 ); @@ -734,11 +731,8 @@ bool Zaurus::suspend() { ::gettimeofday ( &tvn, 0 ); } while ((( tvn. tv_sec - tvs. tv_sec ) * 1000 + ( tvn. tv_usec - tvs. tv_usec ) / 1000 ) < m_timeOut ); } - { - QCopEnvelope( "QPE/System", "returnFromSuspend()" ); - } - qApp->processEvents(); // ensure the qcop call is being processed asap + QCopChannel::send( "QPE/System", "returnFromSuspend()" ); return res; } |