summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-02-10 14:40:06 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-15 05:07:46 +0100
commit278a39cec989c1f9e6d69b21e1f404bd61ee4ec6 (patch)
treecded53fa6179c6ab10c55c92b5c2161359a8f076 /tools
parent7dbca9ba39d1b18dce510520adf4bbbf6e346adb (diff)
Fix compilation on Harmattan
Yeah, this seems strange, perhaps the code should be removed altogether. But this fix is simple to compensate for the fact that the code is compiled with NO_CAST_FROM_ASCII. Change-Id: I35dc093b05e7de4df757464869b5aa4609d74977 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/qml/deviceorientation_harmattan.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/qml/deviceorientation_harmattan.cpp b/tools/qml/deviceorientation_harmattan.cpp
index fe3a1663..94e437b4 100644
--- a/tools/qml/deviceorientation_harmattan.cpp
+++ b/tools/qml/deviceorientation_harmattan.cpp
@@ -43,13 +43,13 @@
#include <QtDBus>
#include <QDebug>
-#define ORIENTATION_SERVICE "com.nokia.SensorService"
-#define ORIENTATION_PATH "/org/maemo/contextkit/Screen/TopEdge"
-#define CONTEXT_INTERFACE "org.maemo.contextkit.Property"
-#define CONTEXT_CHANGED "ValueChanged"
-#define CONTEXT_SUBSCRIBE "Subscribe"
-#define CONTEXT_UNSUBSCRIBE "Unsubscribe"
-#define CONTEXT_GET "Get"
+#define ORIENTATION_SERVICE QLatin1String("com.nokia.SensorService")
+#define ORIENTATION_PATH QLatin1String("/org/maemo/contextkit/Screen/TopEdge")
+#define CONTEXT_INTERFACE QLatin1String("org.maemo.contextkit.Property")
+#define CONTEXT_CHANGED QLatin1String("ValueChanged")
+#define CONTEXT_SUBSCRIBE QLatin1String("Subscribe")
+#define CONTEXT_UNSUBSCRIBE QLatin1String("Unsubscribe")
+#define CONTEXT_GET QLatin1String("Get")
class HarmattanOrientation : public DeviceOrientation
@@ -136,13 +136,13 @@ private Q_SLOTS:
private:
static Orientation toOrientation(const QString &nativeOrientation)
{
- if (nativeOrientation == "top")
+ if (nativeOrientation == QLatin1String("top"))
return Landscape;
- else if (nativeOrientation == "left")
+ else if (nativeOrientation == QLatin1String("left"))
return Portrait;
- else if (nativeOrientation == "bottom")
+ else if (nativeOrientation == QLatin1String("bottom"))
return LandscapeInverted;
- else if (nativeOrientation == "right")
+ else if (nativeOrientation == QLatin1String("right"))
return PortraitInverted;
return UnknownOrientation;
}