From 438639f9c40311b51a57b501428d2650f21615cf Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Fri, 26 Aug 2011 10:47:13 +0200 Subject: qmlplugindump: Load QtQuick 1 plugin. This allows the QtQuick1 types to be dumped with --builtin and to be skipped when dumping other plugins that use them. Change-Id: I23ecba5cea7c11e998861746f1c7056e8911abf3 Reviewed-on: http://codereview.qt.nokia.com/3650 Reviewed-by: Erik Verbruggen --- tools/qmlplugindump/main.cpp | 13 +++++++++++++ tools/qmlplugindump/qmlplugindump.pro | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index 46d31739ee..1fdfb2e83d 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 defaultReachable = collectReachableMetaObjects(); QList 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 -- cgit v1.2.3 From e71904e231e27e6f6f88b35c4a7e2d7cf8ba2640 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Tue, 16 Aug 2011 14:00:13 +0200 Subject: Remove V8 submodule from QtDeclarative QtDeclarative should now link against the QtV8 library from qtbase. The patch files have been moved to qtbase as well. Applications that use the QtDeclarative private headers may need to add the following to their .pro file: QT += v8-private This ensures that is found, which is (indirectly) included by many QtDeclarative private headers. Task-number: QTBUG-20963 Change-Id: I31e973a6fcc0c416d3b258a61c26564cee3dcd4b Reviewed-on: http://codereview.qt.nokia.com/3093 Reviewed-by: Qt Sanity Bot Reviewed-by: Kent Hansen --- tools/qmlviewer/qml.pri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') 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 -- cgit v1.2.3 From 809ee66b67ce70dba89a04b92daccc9445af2e75 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 6 Jul 2011 13:43:47 +1000 Subject: More efficient type name cache Instead of creating completely separate hashes for all the types used by every QML file, we simply link to the QDeclarativeTypeModule. This uses much less memory, and is faster to construct at startup. Change-Id: I28bc2807074f9c6f38096d6e4ce8be744159d023 Reviewed-on: http://codereview.qt.nokia.com/3741 Reviewed-by: Roberto Raggi --- tools/qmlscene/main.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp index e6603adbd8..ed2512c1f4 100644 --- a/tools/qmlscene/main.cpp +++ b/tools/qmlscene/main.cpp @@ -358,6 +358,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; @@ -365,16 +366,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; } } -- cgit v1.2.3