summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-10-25 10:54:16 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-10-25 10:54:16 (GMT)
commitcb50699b39e016a64a2a06088042622546c428a2 (patch)
tree77d269a3103a6c140098b9caaafd17a29a81addd /demos
parent89807f70656b95c1568ef183dd7f28c527fc3eaa (diff)
parent890c1110ec5e39bb6e63e99fe09c296c1ea824be (diff)
downloadQt-cb50699b39e016a64a2a06088042622546c428a2.zip
Qt-cb50699b39e016a64a2a06088042622546c428a2.tar.gz
Qt-cb50699b39e016a64a2a06088042622546c428a2.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: demos/declarative/snake/snake.qml qmake/generators/symbian/symbiancommon.cpp src/network/access/qnetworkaccessmanager.cpp src/s60installs/s60installs.pro tests/auto/qitemselectionmodel/tst_qitemselectionmodel.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp
Diffstat (limited to 'demos')
-rw-r--r--demos/declarative/snake/content/pics/pause.pngbin0 -> 4327 bytes
-rw-r--r--demos/declarative/snake/content/snake.js4
-rw-r--r--demos/declarative/snake/snake.qml13
-rw-r--r--demos/declarative/twitter/twitter.qml2
-rw-r--r--demos/symbianpkgrules.pri2
-rw-r--r--demos/textedit/textedit.qdoc10
6 files changed, 21 insertions, 10 deletions
diff --git a/demos/declarative/snake/content/pics/pause.png b/demos/declarative/snake/content/pics/pause.png
new file mode 100644
index 0000000..056d97d
--- /dev/null
+++ b/demos/declarative/snake/content/pics/pause.png
Binary files differ
diff --git a/demos/declarative/snake/content/snake.js b/demos/declarative/snake/content/snake.js
index 2a99aa8..837b82a 100644
--- a/demos/declarative/snake/content/snake.js
+++ b/demos/declarative/snake/content/snake.js
@@ -39,7 +39,7 @@ function startNewGame()
return;
}
- if (heartbeat.running) {
+ if (activeGame) {
endGame();
startNewGameTimer.running = true;
return;
@@ -93,7 +93,7 @@ function startNewGame()
function endGame()
{
- heartbeat.running = false;
+ activeGame = false;
for(var i in snake)
snake[i].dying = true;
if (cookie) {
diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml
index 5cbf1be..37e64ec 100644
--- a/demos/declarative/snake/snake.qml
+++ b/demos/declarative/snake/snake.qml
@@ -47,6 +47,7 @@ Rectangle {
id: screen;
SystemPalette { id: activePalette }
color: activePalette.window
+ property bool activeGame: false
property int gridSize : 34
property int margin: 4
@@ -75,6 +76,7 @@ Rectangle {
Timer {
id: heartbeat;
interval: heartbeatInterval;
+ running: activeGame && runtime.isActiveWindow
repeat: true
onTriggered: { Logic.move() }
}
@@ -94,7 +96,16 @@ Rectangle {
Timer {
id: startHeartbeatTimer;
interval: 1000 ;
- onTriggered: { state = "running"; heartbeat.running = true;}
+ onTriggered: { state = "running"; activeGame = true; }
+ }
+
+ Image{
+ id: pauseDialog
+ z: 1
+ source: "content/pics/pause.png"
+ anchors.centerIn: parent;
+ //opacity is deliberately not animated
+ opacity: gameActive && !runtime.isActiveWindow
}
Image {
diff --git a/demos/declarative/twitter/twitter.qml b/demos/declarative/twitter/twitter.qml
index 4495523..74bab37 100644
--- a/demos/declarative/twitter/twitter.qml
+++ b/demos/declarative/twitter/twitter.qml
@@ -78,7 +78,7 @@ Item {
id: views
x: 2; width: parent.width - 4
y:60 //Below the title bars
- height: 380
+ height: parent.height - 100
Text {
id:title
diff --git a/demos/symbianpkgrules.pri b/demos/symbianpkgrules.pri
index 68a82cd..d42f188 100644
--- a/demos/symbianpkgrules.pri
+++ b/demos/symbianpkgrules.pri
@@ -13,4 +13,4 @@ vendorinfo = \
demos_deployment.pkg_prerules += vendorinfo
DEPLOYMENT += demos_deployment
-isEmpty(ICON):ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg
+contains(TEMPLATE,app):isEmpty(ICON):ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg
diff --git a/demos/textedit/textedit.qdoc b/demos/textedit/textedit.qdoc
index f3ba4d7..c27589e 100644
--- a/demos/textedit/textedit.qdoc
+++ b/demos/textedit/textedit.qdoc
@@ -7,11 +7,11 @@
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
-** Commercial Usage
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in a
-** written agreement between you and Nokia.
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free