diff options
author | A-Team <ateam@pad.test.qt.nokia.com> | 2010-10-07 22:00:16 (GMT) |
---|---|---|
committer | A-Team <ateam@pad.test.qt.nokia.com> | 2010-10-07 22:00:16 (GMT) |
commit | 8130fcbffe365c0e019f45baae7f1b273d8e17e7 (patch) | |
tree | 91cebf29af4336d2010fe66460d586f605a72ab0 /demos | |
parent | 0f9d642e105da1644f4ed846a696510f9a9f1daf (diff) | |
parent | 161f15e1e79ec5f23244da68340ba1e78f3ac4bb (diff) | |
download | Qt-8130fcbffe365c0e019f45baae7f1b273d8e17e7.zip Qt-8130fcbffe365c0e019f45baae7f1b273d8e17e7.tar.gz Qt-8130fcbffe365c0e019f45baae7f1b273d8e17e7.tar.bz2 |
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'demos')
-rw-r--r-- | demos/declarative/flickr/flickr.qml | 2 | ||||
-rw-r--r-- | demos/declarative/flickr/mobile/ImageDetails.qml | 2 | ||||
-rw-r--r-- | demos/declarative/flickr/mobile/ToolBar.qml | 22 | ||||
-rw-r--r-- | demos/declarative/minehunt/main.cpp | 2 | ||||
-rw-r--r-- | demos/declarative/minehunt/minehunt.pro | 1 | ||||
-rw-r--r-- | demos/declarative/minehunt/minehunt.qrc | 20 | ||||
-rw-r--r-- | demos/qtdemo/menumanager.cpp | 1 | ||||
-rw-r--r-- | demos/qtdemo/xml/examples.xml | 2 | ||||
-rw-r--r-- | demos/textedit/textedit.cpp | 4 |
9 files changed, 42 insertions, 14 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/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" /> diff --git a/demos/textedit/textedit.cpp b/demos/textedit/textedit.cpp index e1f24a1..165c97c 100644 --- a/demos/textedit/textedit.cpp +++ b/demos/textedit/textedit.cpp @@ -262,7 +262,7 @@ void TextEdit::setupEditActions() tb->addAction(a); menu->addAction(a); #ifndef QT_NO_CLIPBOARD - actionPaste->setEnabled(!QApplication::clipboard()->text().isEmpty()); + actionPaste->setEnabled(QApplication::clipboard()->mimeData()->hasText()); #endif } @@ -681,7 +681,7 @@ void TextEdit::cursorPositionChanged() void TextEdit::clipboardDataChanged() { #ifndef QT_NO_CLIPBOARD - actionPaste->setEnabled(!QApplication::clipboard()->text().isEmpty()); + actionPaste->setEnabled(QApplication::clipboard()->mimeData()->hasText()); #endif } |