aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/testlib
diff options
context:
space:
mode:
authorMatthew Vogt <matthew.vogt@nokia.com>2012-02-16 14:43:03 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-24 04:51:31 +0100
commitb855240b782395f94315f43ea3e7e182299fac48 (patch)
treebc594c04449be8cd14cd0ab0bb72dafc2be0ffb2 /src/imports/testlib
parent6a42a6e0a9a1abdda0d07a5a20b4ac7e45348684 (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/imports/testlib')
-rw-r--r--src/imports/testlib/main.cpp28
-rw-r--r--src/imports/testlib/signalspy.h6
-rw-r--r--src/imports/testlib/testcase.h6
-rw-r--r--src/imports/testlib/testlib.pro6
4 files changed, 23 insertions, 23 deletions
diff --git a/src/imports/testlib/main.cpp b/src/imports/testlib/main.cpp
index 672de10639..8ab745a7d2 100644
--- a/src/imports/testlib/main.cpp
+++ b/src/imports/testlib/main.cpp
@@ -39,15 +39,15 @@
**
****************************************************************************/
-#include <QtDeclarative/qdeclarativeextensionplugin.h>
-#include <QtDeclarative/qdeclarative.h>
-#include <QtDeclarative/qjsvalue.h>
-#include <QtDeclarative/qjsengine.h>
+#include <QtQml/qqmlextensionplugin.h>
+#include <QtQml/qqml.h>
+#include <QtQml/qjsvalue.h>
+#include <QtQml/qjsengine.h>
#include "QtQuickTest/private/quicktestresult_p.h"
#include "QtQuickTest/private/quicktestevent_p.h"
#include "private/qtestoptions_p.h"
#include "QtQuick/qquickitem.h"
-#include <QtDeclarative/private/qdeclarativeengine_p.h>
+#include <QtQml/private/qqmlengine_p.h>
QML_DECLARE_TYPE(QuickTestResult)
QML_DECLARE_TYPE(QuickTestEvent)
@@ -81,15 +81,15 @@ Q_SIGNALS:
void wrapperChanged();
public Q_SLOTS:
- QDeclarativeV8Handle typeName(const QVariant& v) const
+ QQmlV8Handle typeName(const QVariant& v) const
{
QString name(v.typeName());
//qDebug() << "type:" << name << " string value:" << v.toString() << " value:" << v;
if (v.canConvert<QObject*>()) {
- QDeclarativeType *type = 0;
+ QQmlType *type = 0;
const QMetaObject *mo = v.value<QObject*>()->metaObject();
while (!type && mo) {
- type = QDeclarativeMetaType::qmlType(mo);
+ type = QQmlMetaType::qmlType(mo);
mo = mo->superClass();
}
if (type) {
@@ -97,22 +97,22 @@ public Q_SLOTS:
}
}
- return QDeclarativeV8Handle::fromHandle(v8::String::New(name.toUtf8()));
+ return QQmlV8Handle::fromHandle(v8::String::New(name.toUtf8()));
}
bool compare(const QVariant& act, const QVariant& exp) const {
return act == exp;
}
- QDeclarativeV8Handle callerFile(int frameIndex = 0) const
+ QQmlV8Handle callerFile(int frameIndex = 0) const
{
v8::Local<v8::StackTrace> stacks = v8::StackTrace::CurrentStackTrace(10, v8::StackTrace::kDetailed);
int count = stacks->GetFrameCount();
if (count >= frameIndex + 1) {
v8::Local<v8::StackFrame> frame = stacks->GetFrame(frameIndex + 1);
- return QDeclarativeV8Handle::fromHandle(frame->GetScriptNameOrSourceURL());
+ return QQmlV8Handle::fromHandle(frame->GetScriptNameOrSourceURL());
}
- return QDeclarativeV8Handle();
+ return QQmlV8Handle();
}
int callerLine(int frameIndex = 0) const
{
@@ -132,7 +132,7 @@ QML_DECLARE_TYPE(QuickTestUtil)
QT_BEGIN_NAMESPACE
-class QTestQmlModule : public QDeclarativeExtensionPlugin
+class QTestQmlModule : public QQmlExtensionPlugin
{
Q_OBJECT
public:
@@ -144,7 +144,7 @@ public:
qmlRegisterType<QuickTestUtil>(uri,1,0,"TestUtil");
}
- void initializeEngine(QDeclarativeEngine *, const char *)
+ void initializeEngine(QQmlEngine *, const char *)
{
}
};
diff --git a/src/imports/testlib/signalspy.h b/src/imports/testlib/signalspy.h
index 6b5166d8e0..6542203ce4 100644
--- a/src/imports/testlib/signalspy.h
+++ b/src/imports/testlib/signalspy.h
@@ -44,20 +44,20 @@
// This is a dummy header for defining the interface of "SignalSpy.qml" to qdoc.
-#include <QtDeclarative/qdeclarativeitem.h>
+#include <QtQuick/qquickitem.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-class SignalSpy : public QDeclarativeItem
+class SignalSpy : public QQuickItem
{
Q_OBJECT
Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged)
Q_PROPERTY(QString signalName READ signalName WRITE signalName NOTIFY signalNameChanged)
Q_PROPERTY(int count READ count countChanged)
public:
- SignalSpy(QDeclarativeItem *parent) : QDeclarativeItem(parent) {}
+ SignalSpy(QQuickItem *parent) : QQuickItem(parent) {}
~SignalSpy()
QObject *target() const;
diff --git a/src/imports/testlib/testcase.h b/src/imports/testlib/testcase.h
index 1793cca0f2..e7758ec9df 100644
--- a/src/imports/testlib/testcase.h
+++ b/src/imports/testlib/testcase.h
@@ -44,13 +44,13 @@
// This is a dummy header for defining the interface of "TestCase.qml" to qdoc.
-#include <QtDeclarative/qdeclarativeitem.h>
+#include <QtQuick/qquickitem.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-class TestCase : public QDeclarativeItem
+class TestCase : public QQuickItem
{
Q_OBJECT
Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
@@ -60,7 +60,7 @@ class TestCase : public QDeclarativeItem
Q_PROPERTY(bool running READ running NOTIFY runningChanged)
Q_PROPERTY(bool windowShown READ windowShown NOTIFY windowShownChanged)
public:
- TestCase(QDeclarativeItem *parent) : QDeclarativeItem(parent) {}
+ TestCase(QQuickItem *parent) : QQuickItem(parent) {}
~TestCase()
QString name() const;
diff --git a/src/imports/testlib/testlib.pro b/src/imports/testlib/testlib.pro
index 3b8a5bf75e..a4cb03466e 100644
--- a/src/imports/testlib/testlib.pro
+++ b/src/imports/testlib/testlib.pro
@@ -4,12 +4,12 @@ include(../qimportbase.pri)
CONFIG += qt plugin
-QT += declarative quick qmltest qmltest-private v8-private declarative-private core-private testlib
+QT += qml quick qmltest qmltest-private v8-private qml-private core-private testlib
SOURCES += main.cpp
HEADERS +=
-DESTDIR = $$QT.declarative.imports/$$TARGETPATH
+DESTDIR = $$QT.qml.imports/$$TARGETPATH
target.path += $$[QT_INSTALL_IMPORTS]/QtTest
OTHER_IMPORT_FILES = \
@@ -23,7 +23,7 @@ otherImportFiles.files += $$OTHER_IMPORT_FILES
otherImportFiles.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
copy2build.input = OTHER_IMPORT_FILES
-copy2build.output = $$QT.declarative.imports/$$TARGETPATH/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
+copy2build.output = $$QT.qml.imports/$$TARGETPATH/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
INSTALLS += target otherImportFiles