summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-08-31 08:55:16 +0200
committerGunnar Sletta <gunnar.sletta@nokia.com>2011-08-31 08:55:16 +0200
commit71478352376022faa9be6d79f2a760c289945ff5 (patch)
tree0f8ff4a88c1b033367337a93d23a329d145ee903 /tools
parentc38efcb67cf93ba3e91e184c3b891efef4ef75a3 (diff)
parent05daa9bfe1a03ffe1cc580b6cfd88e093e2493c0 (diff)
Merge branch 'master' into refactor
Conflicts: src/3rdparty/v8 src/declarative/declarative.pro src/declarative/items/qsgcanvas.cpp src/declarative/items/qsgshadereffectsource_p.h src/declarative/items/qsgview.cpp src/declarative/particles/qsgcustomparticle.cpp src/imports/gestures/gestures.pro src/imports/particles/particles.pro src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro src/qtquick1/qtquick1.pro tests/auto/declarative/examples/examples.pro tests/auto/declarative/qsglistview/qsglistview.pro tests/auto/qtquick1/qdeclarativeviewer/qdeclarativeviewer.pro Change-Id: I423344f83e1835116cad531b877fde6e68a8849a
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlplugindump/main.cpp13
-rw-r--r--tools/qmlplugindump/qmlplugindump.pro2
-rw-r--r--tools/qmlscene/main.cpp11
-rw-r--r--tools/qmlviewer/qml.pri2
4 files changed, 23 insertions, 5 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index c553070123..c53fd3c7fd 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -540,6 +540,19 @@ int main(int argc, char *argv[])
engine.addImportPath(pluginImportPath);
}
+ // load the QtQuick 1 plugin
+ {
+ QByteArray code("import QtQuick 1.0\nQtObject {}");
+ QDeclarativeComponent c(&engine);
+ c.setData(code, QUrl::fromLocalFile(pluginImportPath + "/loadqtquick1.qml"));
+ c.create();
+ if (!c.errors().isEmpty()) {
+ foreach (const QDeclarativeError &error, c.errors())
+ qWarning() << error.toString();
+ return EXIT_IMPORTERROR;
+ }
+ }
+
// find all QMetaObjects reachable from the builtin module
QSet<const QMetaObject *> defaultReachable = collectReachableMetaObjects();
QList<QDeclarativeType *> defaultTypes = QDeclarativeMetaType::qmlTypes();
diff --git a/tools/qmlplugindump/qmlplugindump.pro b/tools/qmlplugindump/qmlplugindump.pro
index 0ac3a70c14..49134a05ab 100644
--- a/tools/qmlplugindump/qmlplugindump.pro
+++ b/tools/qmlplugindump/qmlplugindump.pro
@@ -2,7 +2,7 @@ TEMPLATE = app
CONFIG += qt uic console
DESTDIR = $$QT.declarative.bins
-QT += declarative declarative-private core-private
+QT += declarative declarative-private qtquick1 core-private
TARGET = qmlplugindump
diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp
index 0139f591a6..cd40ea5f8c 100644
--- a/tools/qmlscene/main.cpp
+++ b/tools/qmlscene/main.cpp
@@ -321,6 +321,7 @@ static void checkAndAdaptVersion(const QUrl &url)
}
QRegExp quick1("^\\s*import +QtQuick +1\\.");
+ QRegExp quick2("^\\s*import +QtQuick +2\\.");
QRegExp qt47("^\\s*import +Qt +4\\.7");
QString envToWrite;
@@ -328,16 +329,20 @@ static void checkAndAdaptVersion(const QUrl &url)
QTextStream stream(&f);
bool codeFound= false;
- while (!codeFound && envToWrite.isEmpty()) {
+ while (!codeFound) {
QString line = stream.readLine();
if (line.contains("{"))
codeFound = true;
- if (quick1.indexIn(line) >= 0) {
+ if (envToWrite.isEmpty() && quick1.indexIn(line) >= 0) {
envToWrite = QLatin1String("quick1");
compat = QLatin1String("QtQuick 1.0");
- } else if (qt47.indexIn(line) >= 0) {
+ } else if (envToWrite.isEmpty() && qt47.indexIn(line) >= 0) {
envToWrite = QLatin1String("qt");
compat = QLatin1String("Qt 4.7");
+ } else if (quick2.indexIn(line) >= 0) {
+ envToWrite.clear();
+ compat.clear();
+ break;
}
}
diff --git a/tools/qmlviewer/qml.pri b/tools/qmlviewer/qml.pri
index f5d3f80feb..e84dfb5c9b 100644
--- a/tools/qmlviewer/qml.pri
+++ b/tools/qmlviewer/qml.pri
@@ -1,4 +1,4 @@
-QT += core-private gui-private declarative-private network sql
+QT += core-private gui-private v8-private declarative-private network sql
contains(QT_CONFIG, opengl) {
QT += opengl
DEFINES += GL_SUPPORTED