From c3ceba4b806f4931a27af8c3af31eedac8e985df Mon Sep 17 00:00:00 2001 From: Alessandro Portale <alessandro.portale@nokia.com> Date: Mon, 13 Sep 2010 18:29:46 +0200 Subject: [PATCH] Added test app and test scenarios for the new qml app wizard --- .../wizards/qmlstandaloneapp.cpp | 10 +- .../wizards/qmlstandaloneapp.h | 2 +- tests/manual/qmlstandalone/main.cpp | 106 ++++++++++++++++++ .../qmlimportscenario_01/myqmlapp.qml | 31 +++++ .../qmlimportscenario_01/myqmlapp.qmlproject | 14 +++ .../qmlproject01/QmlProject01.qml | 16 +++ .../qmlproject01/apple.svg | 16 +++ .../qmlproject01/qmlproject01.qmlproject | 14 +++ .../qmlproject02/QmlProject02.qml | 16 +++ .../qmlproject02/qmlproject02.qmlproject | 14 +++ .../qmlproject02/tomato.svg | 16 +++ .../qmlimportscenario_02/myqmlapp.qmlproject | 17 +++ .../subfolder1/myqmlapp.qml | 31 +++++ .../trolltech/QmlModule01/QmlComponent01.qml | 16 +++ .../no/trolltech/QmlModule01/apple.svg | 16 +++ .../no/trolltech/QmlModule01/qmldir | 1 + .../com/nokia/QmlModule02/QmlComponent02.qml | 16 +++ .../subfolder3/com/nokia/QmlModule02/qmldir | 1 + .../com/nokia/QmlModule02/tomato.svg | 16 +++ tests/manual/qmlstandalone/qmlstandalone.pro | 11 ++ 20 files changed, 375 insertions(+), 5 deletions(-) create mode 100644 tests/manual/qmlstandalone/main.cpp create mode 100644 tests/manual/qmlstandalone/qmlimportscenario_01/myqmlapp.qml create mode 100644 tests/manual/qmlstandalone/qmlimportscenario_01/myqmlapp.qmlproject create mode 100644 tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject01/QmlProject01.qml create mode 100644 tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject01/apple.svg create mode 100644 tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject01/qmlproject01.qmlproject create mode 100644 tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject02/QmlProject02.qml create mode 100644 tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject02/qmlproject02.qmlproject create mode 100644 tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject02/tomato.svg create mode 100644 tests/manual/qmlstandalone/qmlimportscenario_02/myqmlapp.qmlproject create mode 100644 tests/manual/qmlstandalone/qmlimportscenario_02/subfolder1/myqmlapp.qml create mode 100644 tests/manual/qmlstandalone/qmlimportscenario_02/subfolder2/no/trolltech/QmlModule01/QmlComponent01.qml create mode 100644 tests/manual/qmlstandalone/qmlimportscenario_02/subfolder2/no/trolltech/QmlModule01/apple.svg create mode 100644 tests/manual/qmlstandalone/qmlimportscenario_02/subfolder2/no/trolltech/QmlModule01/qmldir create mode 100644 tests/manual/qmlstandalone/qmlimportscenario_02/subfolder3/com/nokia/QmlModule02/QmlComponent02.qml create mode 100644 tests/manual/qmlstandalone/qmlimportscenario_02/subfolder3/com/nokia/QmlModule02/qmldir create mode 100644 tests/manual/qmlstandalone/qmlimportscenario_02/subfolder3/com/nokia/QmlModule02/tomato.svg create mode 100644 tests/manual/qmlstandalone/qmlstandalone.pro diff --git a/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.cpp b/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.cpp index 710572ded31..118275bd334 100644 --- a/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.cpp +++ b/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.cpp @@ -273,8 +273,8 @@ QString QmlStandaloneApp::path(Path path) const const QString qmlSubDir = QLatin1String("qml/") + (useExistingMainQml() ? m_mainQmlFile.dir().dirName() : m_projectName) + QLatin1Char('/'); - const QString originsRootQmlApp = templatesRoot(QLatin1String("qmlapp/")); - const QString originsRootShared = templatesRoot(QLatin1String("shared/")); + const QString originsRootQmlApp = templatesRoot() + QLatin1String("qmlapp/"); + const QString originsRootShared = templatesRoot() + QLatin1String("shared/"); const QString appViewerTargetSubDir = appViewerOriginsSubDir; const QString qmlExtension = QLatin1String(".qml"); const QString mainCppFileName = QLatin1String("main.cpp"); @@ -534,10 +534,12 @@ bool QmlStandaloneApp::addExternalModule(const QString &name, const QFileInfo &d } #ifndef CREATORLESSTEST -QString QmlStandaloneApp::templatesRoot(const QString &dirName) +// The definition of QmlStandaloneApp::templatesRoot() for +// CREATORLESSTEST is in tests/manual/qmlstandalone/main.cpp +QString QmlStandaloneApp::templatesRoot() { return Core::ICore::instance()->resourcePath() - + QLatin1String("/templates/") + dirName; + + QLatin1String("/templates/"); } static Core::GeneratedFile file(const QByteArray &data, const QString &targetFile) diff --git a/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.h b/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.h index 83627fe429a..03deb386c21 100644 --- a/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.h +++ b/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.h @@ -179,7 +179,7 @@ private: QByteArray generateMainCpp(const QString *errorMessage) const; QByteArray generateProFile(const QString *errorMessage) const; QByteArray generateDesktopFile(const QString *errorMessage) const; - static QString templatesRoot(const QString &dirName); + static QString templatesRoot(); bool addExternalModule(const QString &uri, const QFileInfo &dir, const QFileInfo &contentDir); bool addCppPlugins(QmlModule *module); diff --git a/tests/manual/qmlstandalone/main.cpp b/tests/manual/qmlstandalone/main.cpp new file mode 100644 index 00000000000..68dc4b342c5 --- /dev/null +++ b/tests/manual/qmlstandalone/main.cpp @@ -0,0 +1,106 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "qmlstandaloneapp.h" +#include <QtCore> + +using namespace Qt4ProjectManager::Internal; + +static bool writeFile(const QByteArray &data, const QString &targetFile) +{ + const QFileInfo fileInfo(targetFile); + QDir().mkpath(fileInfo.absolutePath()); + QFile file(fileInfo.absoluteFilePath()); + file.open(QIODevice::WriteOnly); + Q_ASSERT(file.isOpen()); + return file.write(data) != -1; +} + +bool QmlStandaloneApp::generateFiles(QString *errorMessage) const +{ + return writeFile(generateFile(QmlAppGeneratedFileInfo::MainCppFile, errorMessage), path(MainCpp)) + && writeFile(generateFile(QmlAppGeneratedFileInfo::AppProFile, errorMessage), path(AppPro)) + && (useExistingMainQml() ? true : writeFile(generateFile(QmlAppGeneratedFileInfo::MainQmlFile, errorMessage), path(MainQml))) + && writeFile(generateFile(QmlAppGeneratedFileInfo::AppViewerPriFile, errorMessage), path(AppViewerPri)) + && writeFile(generateFile(QmlAppGeneratedFileInfo::AppViewerCppFile, errorMessage), path(AppViewerCpp)) + && writeFile(generateFile(QmlAppGeneratedFileInfo::AppViewerHFile, errorMessage), path(AppViewerH)) + && writeFile(generateFile(QmlAppGeneratedFileInfo::SymbianSvgIconFile, errorMessage), path(SymbianSvgIcon)) + && writeFile(generateFile(QmlAppGeneratedFileInfo::MaemoPngIconFile, errorMessage), path(MaemoPngIcon)); +} + +QString QmlStandaloneApp::templatesRoot() +{ + return QLatin1String("../../../share/qtcreator/templates/"); +} + +int main(int argc, char *argv[]) +{ + QString errorMessage; + + const QString projectPath = QLatin1String("testprojects"); + + { + QmlStandaloneApp sAppNew; + sAppNew.setProjectPath(projectPath); + sAppNew.setProjectName(QLatin1String("new_qml_app")); + if (!sAppNew.generateFiles(&errorMessage)) + return 1; + } + + { + QmlStandaloneApp sAppImport01; + sAppImport01.setProjectPath(projectPath); + sAppImport01.setProjectName(QLatin1String("imported_scenario_01")); + sAppImport01.setMainQmlFile(QLatin1String("../qmlstandalone/qmlimportscenario_01/myqmlapp.qml")); + if (!sAppImport01.generateFiles(&errorMessage)) + return 1; + } + + { + const QString rootPath = QLatin1String("../qmlstandalone/qmlimportscenario_02/"); + QmlStandaloneApp sAppImport02; + sAppImport02.setProjectPath(projectPath); + sAppImport02.setProjectName(QLatin1String("imported_scenario_02")); + sAppImport02.setMainQmlFile(rootPath + QLatin1String("subfolder1/myqmlapp.qml")); + QStringList moduleNames; + moduleNames.append(QLatin1String("no.trolltech.QmlModule01")); + moduleNames.append(QLatin1String("com.nokia.QmlModule02")); + QStringList importPaths; + importPaths.append(rootPath + QLatin1String("subfolder2/")); + importPaths.append(rootPath + QLatin1String("subfolder3/")); + if (!sAppImport02.setExternalModules(moduleNames, importPaths)) { + qDebug() << sAppImport02.error(); + return 2; + } + if (!sAppImport02.generateFiles(&errorMessage)) + return 1; + } + + return 0; +} diff --git a/tests/manual/qmlstandalone/qmlimportscenario_01/myqmlapp.qml b/tests/manual/qmlstandalone/qmlimportscenario_01/myqmlapp.qml new file mode 100644 index 00000000000..4092d011115 --- /dev/null +++ b/tests/manual/qmlstandalone/qmlimportscenario_01/myqmlapp.qml @@ -0,0 +1,31 @@ +import Qt 4.7 +import "qmlproject01" +import "qmlproject02" + +Rectangle { + width: 200 + height: 200 + color: "#ddddff" + + Text { + id: title + text: "main" + } + + Column { + anchors.fill: parent + anchors.margins: title.height + 2 + + QmlProject01 { + anchors.top: parent.top + height: parent.height / 2 + width: parent.width + } + + QmlProject02 { + anchors.bottom: parent.bottom + height: parent.height / 2 + width: parent.width + } + } +} diff --git a/tests/manual/qmlstandalone/qmlimportscenario_01/myqmlapp.qmlproject b/tests/manual/qmlstandalone/qmlimportscenario_01/myqmlapp.qmlproject new file mode 100644 index 00000000000..de5c8fbb56e --- /dev/null +++ b/tests/manual/qmlstandalone/qmlimportscenario_01/myqmlapp.qmlproject @@ -0,0 +1,14 @@ +import QmlProject 1.0 + +Project { + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + // No import pathes, here. +} diff --git a/tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject01/QmlProject01.qml b/tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject01/QmlProject01.qml new file mode 100644 index 00000000000..58056ec9582 --- /dev/null +++ b/tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject01/QmlProject01.qml @@ -0,0 +1,16 @@ +import Qt 4.7 + +Rectangle { + color: "#ddffdd" + + Image { + source: "apple.svg" + anchors.right: parent.right + anchors.bottom: parent.bottom + } + + Text { + text: "QmlProject01" + font.pointSize: 14 + } +} diff --git a/tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject01/apple.svg b/tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject01/apple.svg new file mode 100644 index 00000000000..31288ecce45 --- /dev/null +++ b/tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject01/apple.svg @@ -0,0 +1,16 @@ +<svg height="100%" version="1.1" viewBox="0 0 50 50" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg"> + <defs> + </defs> + <metadata> + <rdf:RDF> + <cc:Work rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:title/> + </cc:Work> + </rdf:RDF> + </metadata> + <path d="m22.7,3.84c-1.06,3.24-1.17,7.42-0.191,12.7" fill="none" stroke="#830" stroke-width="2.5"/> + <path d="m36.8,12.9c6.24,3.02,11.1,9.74,10.3,16.9-0.548,5.22-3.35,10.1-7.3,13.5-3.99,2.83-7.36-0.79-11.9-0.037-4.75,0.587-8.68,3.8-13.3,1.88-8.57-3.18-12.1-6.91-12.2-16.4,0.0813-6.01,2.05-12,7.75-14.6,2.95-1.03,8.83-0.118,12,0.363,4.83-3.24,9.26-3.55,14.6-1.61z" fill="#3A0"/> + <path d="m14,16.1c0.683,1.19-1.08,1.56-2.56,3.1-1.48,1.53-2.28,4.13-3.78,3.92-1.5-0.21-0.485-4.18,1.47-5.74,1.95-1.56,4.19-2.47,4.87-1.28z" fill="#FFF" opacity="0.5"/> +</svg> \ No newline at end of file diff --git a/tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject01/qmlproject01.qmlproject b/tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject01/qmlproject01.qmlproject new file mode 100644 index 00000000000..de5c8fbb56e --- /dev/null +++ b/tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject01/qmlproject01.qmlproject @@ -0,0 +1,14 @@ +import QmlProject 1.0 + +Project { + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + // No import pathes, here. +} diff --git a/tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject02/QmlProject02.qml b/tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject02/QmlProject02.qml new file mode 100644 index 00000000000..7a348db668f --- /dev/null +++ b/tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject02/QmlProject02.qml @@ -0,0 +1,16 @@ +import Qt 4.7 + +Rectangle { + color: "#ffdddd" + + Image { + source: "tomato.svg" + anchors.right: parent.right + anchors.bottom: parent.bottom + } + + Text { + text: "QmlProject02" + font.pointSize: 14 + } +} diff --git a/tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject02/qmlproject02.qmlproject b/tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject02/qmlproject02.qmlproject new file mode 100644 index 00000000000..de5c8fbb56e --- /dev/null +++ b/tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject02/qmlproject02.qmlproject @@ -0,0 +1,14 @@ +import QmlProject 1.0 + +Project { + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + // No import pathes, here. +} diff --git a/tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject02/tomato.svg b/tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject02/tomato.svg new file mode 100644 index 00000000000..c0df58c20bb --- /dev/null +++ b/tests/manual/qmlstandalone/qmlimportscenario_01/qmlproject02/tomato.svg @@ -0,0 +1,16 @@ +<svg height="100%" id="svg2" version="1.1" viewBox="0 0 50 50" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg"> + <defs id="defs14"> + </defs> + <metadata id="metadata4"> + <rdf:RDF> + <cc:Work rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:title/> + </cc:Work> + </rdf:RDF> + </metadata> + <path d="M24.7,5.65c-2.7,2.23-3.2,5.65-2.2,10.8" fill="none" stroke="#080" stroke-width="2.5"/> + <path d="m41.6,16.9c6.71,7.89,3.30,18.5-2.42,23.6-5.73,5.11-16.2,6.50-26.6,1.84-10.4-4.7-13.1-21.3-3.65-27,9.45-5.68,26-6.29,32.6,1.6z" fill="#F00"/> + <path d="m15.6,15.3c0.683,1.19-1.88,1.16-4.97,4.10-2.95,2.8-2.64,6.7-4.14,6.5-1.50-0.2,0.72-7,2.67-8.5,1.95-1.56,5.80-3.27,6.48-2.08z" fill="#FFF" opacity="0.5"/> +</svg> \ No newline at end of file diff --git a/tests/manual/qmlstandalone/qmlimportscenario_02/myqmlapp.qmlproject b/tests/manual/qmlstandalone/qmlimportscenario_02/myqmlapp.qmlproject new file mode 100644 index 00000000000..1040b01e313 --- /dev/null +++ b/tests/manual/qmlstandalone/qmlimportscenario_02/myqmlapp.qmlproject @@ -0,0 +1,17 @@ +import QmlProject 1.0 + +Project { + QmlFiles { + directory: "subfolder1" + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + importPaths: [ + "subfolder2", + "subfolder3" + ] +} diff --git a/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder1/myqmlapp.qml b/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder1/myqmlapp.qml new file mode 100644 index 00000000000..b1ae6c9320a --- /dev/null +++ b/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder1/myqmlapp.qml @@ -0,0 +1,31 @@ +import Qt 4.7 +import no.trolltech.QmlModule01 1.0 +import com.nokia.QmlModule02 1.0 + +Rectangle { + width: 200 + height: 200 + color: "#ddddff" + + Text { + id: title + text: "main" + } + + Column { + anchors.fill: parent + anchors.margins: title.height + 2 + + QmlComponent01 { + anchors.top: parent.top + height: parent.height / 2 + width: parent.width + } + + QmlComponent02 { + anchors.bottom: parent.bottom + height: parent.height / 2 + width: parent.width + } + } +} diff --git a/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder2/no/trolltech/QmlModule01/QmlComponent01.qml b/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder2/no/trolltech/QmlModule01/QmlComponent01.qml new file mode 100644 index 00000000000..7fc3078c5aa --- /dev/null +++ b/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder2/no/trolltech/QmlModule01/QmlComponent01.qml @@ -0,0 +1,16 @@ +import Qt 4.7 + +Rectangle { + color: "#ddffdd" + + Image { + source: "apple.svg" + anchors.right: parent.right + anchors.bottom: parent.bottom + } + + Text { + text: "QmlComponent01" + font.pointSize: 14 + } +} diff --git a/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder2/no/trolltech/QmlModule01/apple.svg b/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder2/no/trolltech/QmlModule01/apple.svg new file mode 100644 index 00000000000..31288ecce45 --- /dev/null +++ b/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder2/no/trolltech/QmlModule01/apple.svg @@ -0,0 +1,16 @@ +<svg height="100%" version="1.1" viewBox="0 0 50 50" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg"> + <defs> + </defs> + <metadata> + <rdf:RDF> + <cc:Work rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:title/> + </cc:Work> + </rdf:RDF> + </metadata> + <path d="m22.7,3.84c-1.06,3.24-1.17,7.42-0.191,12.7" fill="none" stroke="#830" stroke-width="2.5"/> + <path d="m36.8,12.9c6.24,3.02,11.1,9.74,10.3,16.9-0.548,5.22-3.35,10.1-7.3,13.5-3.99,2.83-7.36-0.79-11.9-0.037-4.75,0.587-8.68,3.8-13.3,1.88-8.57-3.18-12.1-6.91-12.2-16.4,0.0813-6.01,2.05-12,7.75-14.6,2.95-1.03,8.83-0.118,12,0.363,4.83-3.24,9.26-3.55,14.6-1.61z" fill="#3A0"/> + <path d="m14,16.1c0.683,1.19-1.08,1.56-2.56,3.1-1.48,1.53-2.28,4.13-3.78,3.92-1.5-0.21-0.485-4.18,1.47-5.74,1.95-1.56,4.19-2.47,4.87-1.28z" fill="#FFF" opacity="0.5"/> +</svg> \ No newline at end of file diff --git a/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder2/no/trolltech/QmlModule01/qmldir b/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder2/no/trolltech/QmlModule01/qmldir new file mode 100644 index 00000000000..3a36c143306 --- /dev/null +++ b/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder2/no/trolltech/QmlModule01/qmldir @@ -0,0 +1 @@ +QmlComponent01 1.0 QmlComponent01.qml \ No newline at end of file diff --git a/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder3/com/nokia/QmlModule02/QmlComponent02.qml b/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder3/com/nokia/QmlModule02/QmlComponent02.qml new file mode 100644 index 00000000000..ebbfb454874 --- /dev/null +++ b/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder3/com/nokia/QmlModule02/QmlComponent02.qml @@ -0,0 +1,16 @@ +import Qt 4.7 + +Rectangle { + color: "#ffdddd" + + Image { + source: "tomato.svg" + anchors.right: parent.right + anchors.bottom: parent.bottom + } + + Text { + text: "QmlComponent02" + font.pointSize: 14 + } +} diff --git a/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder3/com/nokia/QmlModule02/qmldir b/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder3/com/nokia/QmlModule02/qmldir new file mode 100644 index 00000000000..33f694a57e4 --- /dev/null +++ b/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder3/com/nokia/QmlModule02/qmldir @@ -0,0 +1 @@ +QmlComponent02 1.0 QmlComponent02.qml \ No newline at end of file diff --git a/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder3/com/nokia/QmlModule02/tomato.svg b/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder3/com/nokia/QmlModule02/tomato.svg new file mode 100644 index 00000000000..c0df58c20bb --- /dev/null +++ b/tests/manual/qmlstandalone/qmlimportscenario_02/subfolder3/com/nokia/QmlModule02/tomato.svg @@ -0,0 +1,16 @@ +<svg height="100%" id="svg2" version="1.1" viewBox="0 0 50 50" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg"> + <defs id="defs14"> + </defs> + <metadata id="metadata4"> + <rdf:RDF> + <cc:Work rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:title/> + </cc:Work> + </rdf:RDF> + </metadata> + <path d="M24.7,5.65c-2.7,2.23-3.2,5.65-2.2,10.8" fill="none" stroke="#080" stroke-width="2.5"/> + <path d="m41.6,16.9c6.71,7.89,3.30,18.5-2.42,23.6-5.73,5.11-16.2,6.50-26.6,1.84-10.4-4.7-13.1-21.3-3.65-27,9.45-5.68,26-6.29,32.6,1.6z" fill="#F00"/> + <path d="m15.6,15.3c0.683,1.19-1.88,1.16-4.97,4.10-2.95,2.8-2.64,6.7-4.14,6.5-1.50-0.2,0.72-7,2.67-8.5,1.95-1.56,5.80-3.27,6.48-2.08z" fill="#FFF" opacity="0.5"/> +</svg> \ No newline at end of file diff --git a/tests/manual/qmlstandalone/qmlstandalone.pro b/tests/manual/qmlstandalone/qmlstandalone.pro new file mode 100644 index 00000000000..df5b8a33277 --- /dev/null +++ b/tests/manual/qmlstandalone/qmlstandalone.pro @@ -0,0 +1,11 @@ +CREATORSOURCEDIR = ../../../ + +DEFINES += \ + CREATORLESSTEST +APPSOURCEDIR = $$CREATORSOURCEDIR/src/plugins/qt4projectmanager/wizards +HEADERS += \ + $$APPSOURCEDIR/qmlstandaloneapp.h +SOURCES += \ + $$APPSOURCEDIR/qmlstandaloneapp.cpp \ + main.cpp +INCLUDEPATH += $$APPSOURCEDIR -- GitLab