Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/devices/neo/server/neosuspend.cpp b/devices/neo/server/neosuspend.cpp
- index 3023b70..8458fcc 100644
- --- a/devices/neo/server/neosuspend.cpp
- +++ b/devices/neo/server/neosuspend.cpp
- @@ -44,7 +44,8 @@ public:
- virtual bool canSuspend() const;
- virtual bool suspend();
- virtual bool wake();
- -private slots:
- +private:
- + QProcess afterSuspend;
- };
- QTOPIA_DEMAND_TASK(NeoSuspend, NeoSuspend);
- @@ -66,6 +67,8 @@ bool NeoSuspend::suspend()
- {
- qLog(PowerManagement)<< __PRETTY_FUNCTION__;
- + QProcess::execute("before-suspend.sh");
- +
- QFile powerStateFile("/sys/power/state");
- if( !powerStateFile.open(QIODevice::ReadWrite | QIODevice::Text | QIODevice::Truncate)) {
- qWarning()<<"File not opened";
- @@ -100,5 +103,12 @@ bool NeoSuspend::wake()
- QtopiaIpcEnvelope("QPE/NetworkState", "updateNetwork()"); //might have changed
- }
- #endif
- +
- + /* waitForFinished so that we can call start */
- + afterSuspend.waitForFinished();
- +
- + afterSuspend.start("after-suspend.sh");
- + /* no waitForFinished after start, because we want the command to complete in the background */
- +
- return true;
- }
Add Comment
Please, Sign In to add comment