summaryrefslogtreecommitdiffstats
path: root/examples/sensors/grue/console_app
diff options
context:
space:
mode:
authorLincoln Ramsay <lincoln.ramsay@nokia.com>2012-06-19 16:59:47 +1000
committerQt by Nokia <qt-info@nokia.com>2012-06-20 03:16:25 +0200
commit66e6d660edabd9c89517b7d3e86ebad381c0c741 (patch)
tree4b616c180987a4f67228b6b9425d7f8f8fa469e2 /examples/sensors/grue/console_app
parentda431f39aa998b2b2829f146e705a9ef09310a3c (diff)
Get all the examples building and running on Desktop.
Build the required C++ stubs for each example and deploy all the files so that the examples are runnable. Change-Id: I03d23cb37e1c484110a58934a9b0aa550d6915a6 Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
Diffstat (limited to 'examples/sensors/grue/console_app')
-rw-r--r--examples/sensors/grue/console_app/console_app.pro2
-rw-r--r--examples/sensors/grue/console_app/main.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/examples/sensors/grue/console_app/console_app.pro b/examples/sensors/grue/console_app/console_app.pro
index 33d43176..285fd892 100644
--- a/examples/sensors/grue/console_app/console_app.pro
+++ b/examples/sensors/grue/console_app/console_app.pro
@@ -4,3 +4,5 @@ CONFIG += console
QT=core sensors
SOURCES=main.cpp
+target.path = $$[QT_INSTALL_EXAMPLES]/sensors/grue
+INSTALLS += target
diff --git a/examples/sensors/grue/console_app/main.cpp b/examples/sensors/grue/console_app/main.cpp
index dc62e4de..1a112aee 100644
--- a/examples/sensors/grue/console_app/main.cpp
+++ b/examples/sensors/grue/console_app/main.cpp
@@ -53,7 +53,7 @@ public:
bool filter(QSensorReading *reading)
{
- int percent = reading->property("chanceOfBeingEaten").value<qreal>() * 100;
+ int percent = reading->property("chanceOfBeingEaten").value<int>();
if (percent == 0) {
qDebug() << "It is light. You are safe from Grues.";
} else if (lastPercent == 0) {