summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-07-11 13:47:51 +1000
committerQt by Nokia <qt-info@nokia.com>2011-07-12 06:38:09 +0200
commit4442dea01b9d4d45964228ac442166d89f091f9e (patch)
tree28ae20cb26967765a988b1ee522fc2d64d777671 /tools
parentb119220da60453ecf31898f7a57eda9d3c4e9225 (diff)
Extract all QtQuick 1 elements into a separate library/plugin.
Change-Id: I41a280de2739ee08202f4be2519e5012870090f2 Reviewed-on: http://codereview.qt.nokia.com/1391 Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlplugindump/main.cpp12
-rw-r--r--tools/qmlscene/main.cpp3
-rw-r--r--tools/qmlscene/qmlscene.pro2
-rw-r--r--tools/qmlviewer/qdeclarativetester.cpp4
-rw-r--r--tools/qmlviewer/qmlruntime.cpp2
-rw-r--r--tools/qmlviewer/qmlviewer.pro1
6 files changed, 11 insertions, 13 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index b78a68a691..ea82bc1b2e 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -42,7 +42,6 @@
#include <QtDeclarative/QtDeclarative>
#include <QtDeclarative/private/qdeclarativemetatype_p.h>
#include <QtDeclarative/private/qdeclarativeopenmetaobject_p.h>
-#include <QtDeclarative/QDeclarativeView>
#include <QtGui/QApplication>
@@ -537,19 +536,18 @@ int main(int argc, char *argv[])
}
}
- QDeclarativeView view;
- QDeclarativeEngine *engine = view.engine();
+ QDeclarativeEngine engine;
if (!pluginImportPath.isEmpty()) {
QDir cur = QDir::current();
cur.cd(pluginImportPath);
pluginImportPath = cur.absolutePath();
QDir::setCurrent(pluginImportPath);
- engine->addImportPath(pluginImportPath);
+ engine.addImportPath(pluginImportPath);
}
// find all QMetaObjects reachable from the builtin module
QByteArray importCode("import QtQuick 2.0\n");
- QSet<const QMetaObject *> defaultReachable = collectReachableMetaObjects(importCode, engine);
+ QSet<const QMetaObject *> defaultReachable = collectReachableMetaObjects(importCode, &engine);
// this will hold the meta objects we want to dump information of
QSet<const QMetaObject *> metas;
@@ -570,7 +568,7 @@ int main(int argc, char *argv[])
{
QByteArray code = importCode;
code += "QtObject {}";
- QDeclarativeComponent c(engine);
+ QDeclarativeComponent c(&engine);
c.setData(code, QUrl::fromLocalFile(pluginImportPath + "/typelist.qml"));
c.create();
@@ -581,7 +579,7 @@ int main(int argc, char *argv[])
}
}
- QSet<const QMetaObject *> candidates = collectReachableMetaObjects(importCode, engine);
+ QSet<const QMetaObject *> candidates = collectReachableMetaObjects(importCode, &engine);
candidates.subtract(defaultReachable);
// Also eliminate meta objects with the same classname.
diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp
index a4b3c9f312..1d3641b61e 100644
--- a/tools/qmlscene/main.cpp
+++ b/tools/qmlscene/main.cpp
@@ -45,7 +45,7 @@
#include <QtDeclarative/qdeclarative.h>
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
-#include <QtDeclarative/qdeclarativeview.h>
+#include <QtQuick1/qdeclarativeview.h>
#include <QtCore/qdir.h>
#include <QtGui/QFormLayout>
#include <QtGui/QComboBox>
@@ -55,7 +55,6 @@
#include <QtGui/QFileDialog>
#include <QtGui/QGraphicsView>
-#include <QtDeclarative/qdeclarativeitem.h>
#include <QtDeclarative/qdeclarativecontext.h>
#include <private/qdeclarativedebughelper_p.h>
diff --git a/tools/qmlscene/qmlscene.pro b/tools/qmlscene/qmlscene.pro
index a2da6ad982..8e252e589f 100644
--- a/tools/qmlscene/qmlscene.pro
+++ b/tools/qmlscene/qmlscene.pro
@@ -2,7 +2,7 @@ TEMPLATE = app
TARGET = qmlscene
DESTDIR= ../../bin
-QT += declarative declarative-private
+QT += declarative declarative-private qtquick1
target.path = $$[QT_INSTALL_BINS]
INSTALLS += target
diff --git a/tools/qmlviewer/qdeclarativetester.cpp b/tools/qmlviewer/qdeclarativetester.cpp
index 9700e40cb7..842c3a369d 100644
--- a/tools/qmlviewer/qdeclarativetester.cpp
+++ b/tools/qmlviewer/qdeclarativetester.cpp
@@ -42,7 +42,7 @@
#include <qdeclarativetester.h>
#include <QDebug>
#include <QApplication>
-#include <qdeclarativeview.h>
+#include <QtQuick1/qdeclarativeview.h>
#include <QFile>
#include <QDeclarativeComponent>
#include <QDir>
@@ -50,7 +50,7 @@
#include <private/qabstractanimation_p.h>
#include <QGraphicsObject>
#ifndef Q_OS_SYMBIAN
-#include <private/qdeclarativeitem_p.h>
+#include <QtQuick1/private/qdeclarativeitem_p.h>
#endif
QT_BEGIN_NAMESPACE
diff --git a/tools/qmlviewer/qmlruntime.cpp b/tools/qmlviewer/qmlruntime.cpp
index 1ace146490..55f0f4f2bc 100644
--- a/tools/qmlviewer/qmlruntime.cpp
+++ b/tools/qmlviewer/qmlruntime.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <qdeclarativeview.h>
+#include <QtQuick1/qdeclarativeview.h>
#ifdef hz
#undef hz
diff --git a/tools/qmlviewer/qmlviewer.pro b/tools/qmlviewer/qmlviewer.pro
index 87b5899fcc..e9edd605e6 100644
--- a/tools/qmlviewer/qmlviewer.pro
+++ b/tools/qmlviewer/qmlviewer.pro
@@ -1,6 +1,7 @@
TEMPLATE = app
CONFIG += qt uic
DESTDIR = ../../bin
+QT += declarative qtquick1 qtquick1-private
include(qml.pri)