diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-02-16 14:43:03 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-24 04:51:31 +0100 |
commit | b855240b782395f94315f43ea3e7e182299fac48 (patch) | |
tree | bc594c04449be8cd14cd0ab0bb72dafc2be0ffb2 /src/qmltest | |
parent | 6a42a6e0a9a1abdda0d07a5a20b4ac7e45348684 (diff) |
Rename QDeclarative symbols to QQuick and QQml
Symbols beginning with QDeclarative are already exported
by the quick1 module.
Users can apply the bin/rename-qtdeclarative-symbols.sh
script to modify client code using the previous names of the
renamed symbols.
Task-number: QTBUG-23737
Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/qmltest')
-rw-r--r-- | src/qmltest/qmltest.pro | 2 | ||||
-rw-r--r-- | src/qmltest/quicktest.cpp | 18 | ||||
-rw-r--r-- | src/qmltest/quicktestevent.cpp | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/qmltest/qmltest.pro b/src/qmltest/qmltest.pro index 39b7dc8a3f..d2e90c2b5d 100644 --- a/src/qmltest/qmltest.pro +++ b/src/qmltest/qmltest.pro @@ -7,7 +7,7 @@ CONFIG += module CONFIG += dll warn_on declarative_debug MODULE_PRI += ../../modules/qt_qmltest.pri -QT += testlib-private declarative testlib quick widgets widgets-private gui +QT += testlib-private qml testlib quick widgets widgets-private gui DEFINES += QT_BUILD_QUICK_TEST_LIB QT_NO_URL_CAST_FROM_STRING load(qt_module_config) diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp index 19acfaf6f0..e6c27eec00 100644 --- a/src/qmltest/quicktest.cpp +++ b/src/qmltest/quicktest.cpp @@ -44,15 +44,15 @@ #include <QtTest/qtestsystem.h> #include "qtestoptions_p.h" #include <QApplication> -#include <QtDeclarative/qdeclarative.h> -#include <QtDeclarative/qdeclarativeengine.h> -#include <QtDeclarative/qdeclarativecontext.h> +#include <QtQml/qqml.h> +#include <QtQml/qqmlengine.h> +#include <QtQml/qqmlcontext.h> #if defined(QML_VERSION) && QML_VERSION >= 0x020000 #include <QtQuick/qquickview.h> #define QUICK_TEST_SCENEGRAPH 1 #endif -#include <QtDeclarative/qjsvalue.h> -#include <QtDeclarative/qjsengine.h> +#include <QtQml/qjsvalue.h> +#include <QtQml/qjsengine.h> #include <QtGui/qopengl.h> #include <QtCore/qurl.h> #include <QtCore/qfileinfo.h> @@ -107,7 +107,7 @@ static inline QString stripQuotes(const QString &s) template <class View> void handleCompileErrors(const QFileInfo &fi, const View &view) { // Error compiling the test - flag failure in the log and continue. - const QList<QDeclarativeError> errors = view.errors(); + const QList<QQmlError> errors = view.errors(); QuickTestResult results; results.setTestCaseName(fi.baseName()); results.startLogging(); @@ -117,7 +117,7 @@ template <class View> void handleCompileErrors(const QFileInfo &fi, const View & QTextStream str(&message); str << "\n " << QDir::toNativeSeparators(fi.absoluteFilePath()) << " produced " << errors.size() << " error(s):\n"; - foreach (const QDeclarativeError &e, errors) { + foreach (const QQmlError &e, errors) { str << " "; if (e.url().isLocalFile()) { str << e.url().toLocalFile(); @@ -129,7 +129,7 @@ template <class View> void handleCompileErrors(const QFileInfo &fi, const View & str << ": " << e.description() << '\n'; } str << " Working directory: " << QDir::toNativeSeparators(QDir::current().absolutePath()) << '\n'; - if (QDeclarativeEngine *engine = view.engine()) { + if (QQmlEngine *engine = view.engine()) { str << " View: " << view.metaObject()->className() << ", import paths:\n"; foreach (const QString &i, engine->importPathList()) str << " '" << QDir::toNativeSeparators(i) << "'\n"; @@ -254,7 +254,7 @@ int quick_test_main(int argc, char **argv, const char *name, quick_test_viewport } // Scan through all of the "tst_*.qml" files and run each of them - // in turn with a QDeclarativeView. + // in turn with a QQuickView. #ifdef QUICK_TEST_SCENEGRAPH if (qtQuick2) { QQuickView view; diff --git a/src/qmltest/quicktestevent.cpp b/src/qmltest/quicktestevent.cpp index 4dee9bee77..f996adbeca 100644 --- a/src/qmltest/quicktestevent.cpp +++ b/src/qmltest/quicktestevent.cpp @@ -41,7 +41,7 @@ #include "quicktestevent_p.h" #include <QtTest/qtestkeyboard.h> -#include <QtDeclarative/qdeclarative.h> +#include <QtQml/qqml.h> #if defined(QML_VERSION) && QML_VERSION >= 0x020000 #include <QtQuick/qquickitem.h> #include <QtQuick/qquickcanvas.h> @@ -279,7 +279,7 @@ QWindow *QuickTestEvent::eventWindow() #endif return 0; /* - QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(parent()); + QQuickItem *item = qobject_cast<QQuickItem *>(parent()); if (!item) return 0; QGraphicsScene *s = item->scene(); |