diff options
Diffstat (limited to 'examples/sensors/grue/console_app')
-rw-r--r-- | examples/sensors/grue/console_app/console_app.pro | 2 | ||||
-rw-r--r-- | examples/sensors/grue/console_app/main.cpp | 2 |
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) { |