summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-10-07 19:23:54 (GMT)
committerMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-10-07 19:23:54 (GMT)
commit4f1d524f992b0df3626ab63c001345c96ccea766 (patch)
treeddc248c09fbb041b09792dae680b2f494e9b4e4b /demos
parent34c8022c216f6e298b0b0f8250cdf17688534c5b (diff)
parent161f15e1e79ec5f23244da68340ba1e78f3ac4bb (diff)
downloadQt-4f1d524f992b0df3626ab63c001345c96ccea766.zip
Qt-4f1d524f992b0df3626ab63c001345c96ccea766.tar.gz
Qt-4f1d524f992b0df3626ab63c001345c96ccea766.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'demos')
-rw-r--r--demos/declarative/flickr/flickr.qml2
-rw-r--r--demos/declarative/flickr/mobile/ImageDetails.qml2
-rw-r--r--demos/declarative/flickr/mobile/ToolBar.qml22
-rw-r--r--demos/declarative/minehunt/main.cpp2
-rw-r--r--demos/declarative/minehunt/minehunt.pro1
-rw-r--r--demos/declarative/minehunt/minehunt.qrc20
-rw-r--r--demos/qmediaplayer/mediaplayer.cpp2
-rw-r--r--demos/qtdemo/menumanager.cpp1
-rw-r--r--demos/qtdemo/xml/examples.xml2
9 files changed, 41 insertions, 13 deletions
diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml
index 1533c04..740ee35 100644
--- a/demos/declarative/flickr/flickr.qml
+++ b/demos/declarative/flickr/flickr.qml
@@ -109,7 +109,7 @@ Item {
states: State {
name: "DetailedView"
PropertyChanges { target: views; x: -parent.width }
- PropertyChanges { target: toolBar; button1Label: "More..." }
+ PropertyChanges { target: toolBar; button1Label: "View..." }
PropertyChanges {
target: toolBar
onButton1Clicked: if (imageDetails.state=='') imageDetails.state='Back'; else imageDetails.state=''
diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml
index 5dd3b4e..9d1464e 100644
--- a/demos/declarative/flickr/mobile/ImageDetails.qml
+++ b/demos/declarative/flickr/mobile/ImageDetails.qml
@@ -172,6 +172,8 @@ Flipable {
states: State {
name: "Back"
PropertyChanges { target: itemRotation; angle: 180 }
+ PropertyChanges { target: toolBar; button2Visible: false }
+ PropertyChanges { target: toolBar; button1Label: "Back" }
}
transitions: Transition {
diff --git a/demos/declarative/flickr/mobile/ToolBar.qml b/demos/declarative/flickr/mobile/ToolBar.qml
index 55f19d2..d8abb14 100644
--- a/demos/declarative/flickr/mobile/ToolBar.qml
+++ b/demos/declarative/flickr/mobile/ToolBar.qml
@@ -46,20 +46,24 @@ Item {
property alias button1Label: button1.text
property alias button2Label: button2.text
+ property alias button2Visible: button2.visible
+
signal button1Clicked
signal button2Clicked
BorderImage { source: "images/titlebar.sci"; width: parent.width; height: parent.height + 14; y: -7 }
- Button {
- id: button1
- anchors.left: parent.left; anchors.leftMargin: 5; y: 3; width: 140; height: 32
- onClicked: toolbar.button1Clicked()
- }
+ Row {
+ anchors.right: parent.right; anchors.rightMargin: 5; y: 3; height: 32; spacing: 30
+ Button {
+ id: button1
+ width: 140; height: 32
+ onClicked: toolbar.button1Clicked()
+ }
- Button {
- id: button2
- anchors.right: parent.right; anchors.rightMargin: 5; y: 3; width: 140; height: 32
- onClicked: toolbar.button2Clicked()
+ Button {
+ id: button2; width: 140; height: 32
+ onClicked: toolbar.button2Clicked()
+ }
}
}
diff --git a/demos/declarative/minehunt/main.cpp b/demos/declarative/minehunt/main.cpp
index 8bbaee9..2b286ef 100644
--- a/demos/declarative/minehunt/main.cpp
+++ b/demos/declarative/minehunt/main.cpp
@@ -58,7 +58,7 @@ int main(int argc, char *argv[])
canvas.setResizeMode(QDeclarativeView::SizeRootObjectToView);
#endif
canvas.engine()->rootContext()->setContextObject(game);
- canvas.setSource(QString("minehunt.qml"));
+ canvas.setSource(QString("qrc:minehunt.qml"));
QObject::connect(canvas.engine(), SIGNAL(quit()), &app, SLOT(quit()));
#ifdef Q_OS_SYMBIAN
diff --git a/demos/declarative/minehunt/minehunt.pro b/demos/declarative/minehunt/minehunt.pro
index 7a491ab..753ca4e 100644
--- a/demos/declarative/minehunt/minehunt.pro
+++ b/demos/declarative/minehunt/minehunt.pro
@@ -6,6 +6,7 @@ CONFIG += qt plugin
# Input
HEADERS += minehunt.h
SOURCES += main.cpp minehunt.cpp
+RESOURCES = minehunt.qrc
sources.files = minehunt.qml minehunt.pro MinehuntCore
sources.path = $$[QT_INSTALL_DEMOS]/declarative/minehunt
diff --git a/demos/declarative/minehunt/minehunt.qrc b/demos/declarative/minehunt/minehunt.qrc
new file mode 100644
index 0000000..fa8e27d
--- /dev/null
+++ b/demos/declarative/minehunt/minehunt.qrc
@@ -0,0 +1,20 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>minehunt.qml</file>
+ <file>MinehuntCore/Explosion.qml</file>
+ <file>MinehuntCore/Tile.qml</file>
+ <file>MinehuntCore/qmldir</file>
+ <file>MinehuntCore/pics/background.png</file>
+ <file>MinehuntCore/pics/back.png</file>
+ <file>MinehuntCore/pics/bomb-color.png</file>
+ <file>MinehuntCore/pics/bomb.png</file>
+ <file>MinehuntCore/pics/face-sad.png</file>
+ <file>MinehuntCore/pics/face-smile-big.png</file>
+ <file>MinehuntCore/pics/face-smile.png</file>
+ <file>MinehuntCore/pics/flag-color.png</file>
+ <file>MinehuntCore/pics/flag.png</file>
+ <file>MinehuntCore/pics/front.png</file>
+ <file>MinehuntCore/pics/quit.png</file>
+ <file>MinehuntCore/pics/star.png</file>
+</qresource>
+</RCC>
diff --git a/demos/qmediaplayer/mediaplayer.cpp b/demos/qmediaplayer/mediaplayer.cpp
index 3cb0616..97a8e35 100644
--- a/demos/qmediaplayer/mediaplayer.cpp
+++ b/demos/qmediaplayer/mediaplayer.cpp
@@ -716,7 +716,7 @@ void MediaPlayer::openFile()
void MediaPlayer::bufferStatus(int percent)
{
- if (percent == 0 || percent == 100)
+ if (percent == 100)
progressLabel->setText(QString());
else {
QString str = QString::fromLatin1("(%1%)").arg(percent);
diff --git a/demos/qtdemo/menumanager.cpp b/demos/qtdemo/menumanager.cpp
index fe3c5aa..ea9146e 100644
--- a/demos/qtdemo/menumanager.cpp
+++ b/demos/qtdemo/menumanager.cpp
@@ -518,6 +518,7 @@ QString MenuManager::resolveExeFile(const QString &name)
dir.cd(dirName);
dir.cd(fileName);
+ fileName = fileName.split("/").last();
QFile unixFile(dir.path() + "/" + fileName);
if (unixFile.exists()) return unixFile.fileName();
QFile winR(dir.path() + "\\release\\" + fileName + ".exe");
diff --git a/demos/qtdemo/xml/examples.xml b/demos/qtdemo/xml/examples.xml
index 0ab048e..27f72bb 100644
--- a/demos/qtdemo/xml/examples.xml
+++ b/demos/qtdemo/xml/examples.xml
@@ -18,7 +18,7 @@
<example filename="boxes" name="Boxes" />
<example filename="sub-attaq" name="Sub-attaq" />
<example filename="spectrum" name="Spectrum Analyzer" />
- <example filename="declarative/minehunt" name="Minehunt" executable="false" qml="true"/>
+ <example filename="declarative/minehunt" name="Minehunt"/>
<example filename="declarative/snake" name="Snake" executable="false" qml="true"/>
<example filename="deform" name="Vector Deformation" />
<example filename="books" name="Books" />