summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-30 01:14:04 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-30 01:14:04 (GMT)
commit4c0abb14712abe6d64338e74164e09ddd2f246f2 (patch)
tree364e2959c7602f89cda1653f29126b1bbfbab766 /demos
parent587b0fed9bd17a378eb0212c95074df965549ef2 (diff)
parent3acc686f9b2de7a261fc28e256b9f87ee5e341bc (diff)
downloadQt-4c0abb14712abe6d64338e74164e09ddd2f246f2.zip
Qt-4c0abb14712abe6d64338e74164e09ddd2f246f2.tar.gz
Qt-4c0abb14712abe6d64338e74164e09ddd2f246f2.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (54 commits) update qml.qch to version 4.7 Undefined is undefined, and now qml warns about it Fix so window will resize with the root object (broken by Avoid duplicate code for testing initial sizes Remove an unnecessary connect() in TextInput Ensure micro focus is updated in TextEdit and TextInput Fix flow layout not taking into account whether it's width and height are implicit or not. Avoid binding loop. Ensure Loader item change listener is removed when Loader is destroyed Adapt all qmlviewer testcases to the code changes in the actual viewer. Stop QMLLauncher from crashing on exit on Mac when quitting app via the VisualDataModel hasModelChildren role shadowed user roles. Allow positioning of ListView items width sub-pixel precision. Examples clean up Docs Improve appearance when scaling Tweak Qt Demo Behaviour forget to rename the moc include when renaming deviceorientation_maemo.cpp fix namespace macros fix QML Viewer resize modes ...
Diffstat (limited to 'demos')
-rw-r--r--demos/declarative/rssnews/content/NewsDelegate.qml3
-rw-r--r--demos/declarative/snake/content/snake.js6
-rw-r--r--demos/qtdemo/menumanager.cpp6
-rw-r--r--demos/qtdemo/qmlShell.qml4
4 files changed, 11 insertions, 8 deletions
diff --git a/demos/declarative/rssnews/content/NewsDelegate.qml b/demos/declarative/rssnews/content/NewsDelegate.qml
index 040dadc..cfe9b00 100644
--- a/demos/declarative/rssnews/content/NewsDelegate.qml
+++ b/demos/declarative/rssnews/content/NewsDelegate.qml
@@ -43,10 +43,11 @@ import Qt 4.7
Item {
id: delegate
- height: childrenRect.height + 20
+ height: column.height + 40
width: delegate.ListView.view.width
Column {
+ id: column
x: 20; y: 20
width: parent.width - 40
diff --git a/demos/declarative/snake/content/snake.js b/demos/declarative/snake/content/snake.js
index 4d05e33..0f0dbf7 100644
--- a/demos/declarative/snake/content/snake.js
+++ b/demos/declarative/snake/content/snake.js
@@ -150,7 +150,7 @@ function move() {
snake.push(newLink);
} else {
var lastLink = snake[snake.length-1];
- board[lastLink.row * numColumns + lastLink.column] = Undefined;
+ board[lastLink.row * numColumns + lastLink.column] = undefined;
}
if (waitForCookie > 0) {
@@ -186,7 +186,7 @@ function move() {
function isFree(row, column)
{
- return board[row * numColumns + column] == Undefined;
+ return board[row * numColumns + column] == undefined;
}
function isHead(row, column)
@@ -214,7 +214,7 @@ function moveSkull()
--linksToDie;
var link = snake.pop();
link.dying = true;
- board[link.row * numColumns + link.column] = Undefined;
+ board[link.row * numColumns + link.column] = undefined;
if (score > 0)
--score;
if (snake.length == 0) {
diff --git a/demos/qtdemo/menumanager.cpp b/demos/qtdemo/menumanager.cpp
index a2ceb0e..15561ab 100644
--- a/demos/qtdemo/menumanager.cpp
+++ b/demos/qtdemo/menumanager.cpp
@@ -369,10 +369,10 @@ void MenuManager::launchQmlExample(const QString &name)
dir = QDir(QLibraryInfo::location(QLibraryInfo::DemosPath));
else
dir = QDir(QLibraryInfo::location(QLibraryInfo::ExamplesPath));
- QFile file(dir.path() + "/" + dirName + "/" + fileName + "/" + fileName.split('/').last() + ".qml");
+ QFile file(dir.path() + "/" + dirName + "/" + fileName + "/" + "main.qml");
if(!file.exists()){
- //try main.qml as well
- file.setFileName(dir.path() + "/" + dirName + "/" + fileName + "/" + "main.qml");
+ //try dirname.qml as well
+ file.setFileName(dir.path() + "/" + dirName + "/" + fileName + "/" + fileName.split('/').last() + ".qml");
if(!file.exists()){
exampleError(QProcess::UnknownError);
return;
diff --git a/demos/qtdemo/qmlShell.qml b/demos/qtdemo/qmlShell.qml
index 5c5f96c..e15d33c 100644
--- a/demos/qtdemo/qmlShell.qml
+++ b/demos/qtdemo/qmlShell.qml
@@ -99,6 +99,7 @@ Item {
}
MouseArea{
anchors.fill: parent
+ acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
onClicked: loader.focus=true;/* and don't propogate to the 'exit' area*/
}
@@ -130,7 +131,7 @@ Item {
textFormat: Text.RichText
//Note that if loader is Error, it is because the file was found but there was an error creating the component
//This means either we have a bug in our demos, or the required modules (which ship with Qt) did not deploy correctly
- text: "The example has failed to load.<br />If you installed Qt's QML modules this is a bug!<br />"
+ text: "The example has failed to load.<br />If you installed all Qt's C++ and QML modules then this is a bug!<br />"
+ 'Report it at <a href="http://bugreports.qt.nokia.com">http://bugreports.qt.nokia.com</a>';
onLinkActivated: Qt.openUrlExternally(link);
}
@@ -145,6 +146,7 @@ Item {
z: 8
enabled: main.show
hoverEnabled: main.show //To steal focus from the buttons
+ acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
anchors.fill: parent
onClicked: main.show=false;
}