summaryrefslogtreecommitdiffstats
path: root/examples/sensors/maze/maze.qml
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-09-17 15:02:23 +0200
committerAlex Blasche <alexander.blasche@digia.com>2014-09-18 08:14:11 +0200
commit86c62fa1f17630d78d249bec2471f81c38bbd8df (patch)
tree0d68415a4a6f587442bc135163b5b3e98fcc38c0 /examples/sensors/maze/maze.qml
parent88ba6ede3986c119d9e95804539bbe6dfbc5bf64 (diff)
Fix a couple of issues in the maze example
1.) Remove dependency on QtSystemInfo. The module is not officially supported at this stage and screen saver related code is not really required for the example. 2.) Add AndroidManifest.xml to lock the screen orientation in portrait mode. Since the example depends on the tilt sensor a rotating UI is messing the game up. 3.) Port app to current TiltSensor API. The game works but its biggest problem remains the UI. It uses fixed-size UI elements which makes it tiny on High DPI screens. Task-number: QTBUG-31076 Change-Id: I73df9361b5171da930df66072e8ee9eba89b71ad Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Diffstat (limited to 'examples/sensors/maze/maze.qml')
-rw-r--r--examples/sensors/maze/maze.qml8
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/sensors/maze/maze.qml b/examples/sensors/maze/maze.qml
index eeaea28f..19174a4f 100644
--- a/examples/sensors/maze/maze.qml
+++ b/examples/sensors/maze/maze.qml
@@ -75,7 +75,6 @@ import "components"
//! [0]
import QtSensors 5.0
//! [0]
-import QtSystemInfo 5.0
//Import the javascript functions for this game
import "lib.js" as Lib
@@ -86,7 +85,6 @@ ApplicationWindow {
property Mouse mouseCtrl;
property LabyrinthSquare cheeseSquare;
property Congratulation congratulation;
- ScreenSaver { screenSaverEnabled: !tiltTimer.running }
Rectangle {
id: gameRect
@@ -171,9 +169,9 @@ ApplicationWindow {
}
//! [1]
- TiltSensor{
+ TiltSensor {
id: tiltSensor
- enabled: true
+ active: true
}
//! [1]
@@ -185,7 +183,7 @@ ApplicationWindow {
//! [2]
onTriggered: {
if (!tiltSensor.enabled)
- tiltSensor.enabled = true;
+ tiltSensor.active = true;
//! [2]
if (mouseCtrl === null)