Fixed CeTest remotelib build for WinCE 5.
authorJanne Anttila <janne.anttila@digia.com>
Mon, 12 Dec 2011 12:14:15 +0000 (14:14 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 28 May 2012 22:40:54 +0000 (00:40 +0200)
WinCE 5 does not have PPN_POWERBUTTONPRESSED but PPN_SUSPENDKEYPRESSED.
Newer WinCE version have both, but PPN_POWERBUTTONPRESSED is defined
to same as PPN_SUSPENKEYPRESSED, that's why it is safe to use
PPN_SUSPENKEYPRESSED in all WinCE versions.

Change-Id: Ida0604f86330c3e833a1ad41a88db55aa6a625fa
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
(cherry picked from commit 15f84271e8eb47a035ad572fb3db81171f354839)
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
src/qtestlib/wince/remotelib/commands.cpp

index 6cafd2b..b02df90 100644 (file)
@@ -202,7 +202,7 @@ int qRemotePowerButton(DWORD, BYTE*, DWORD*, BYTE**, IRAPIStream* stream)
     //PPN_OEMBASE Greater than or equal to 0x10000 
     //You can define higher values, such as 0x10001, 0x10002, and so on.
     // Reserved. Set dwData to zero (0). 
-    returnValue = PowerPolicyNotify(PPN_POWERBUTTONPRESSED, 0);
+    returnValue = PowerPolicyNotify(PPN_SUSPENDKEYPRESSED, 0);
 
     if (S_OK != stream->Write(&returnValue, sizeof(returnValue), &bytesRead))
         return -3;