diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/testlib/TestCase.qml | 24 | ||||
-rw-r--r-- | src/imports/testlib/main.cpp | 2 | ||||
-rw-r--r-- | src/imports/testlib/testlib.pro | 4 | ||||
-rw-r--r-- | src/quicktestlib/qdeclarativetest.h | 2 | ||||
-rw-r--r-- | src/quicktestlib/qdeclarativetestresult_p.h | 2 | ||||
-rw-r--r-- | src/quicktestlib/quicktestglobal.h | 16 | ||||
-rw-r--r-- | src/quicktestlib/quicktestlib.pro | 8 | ||||
-rw-r--r-- | src/quicktestlib/quicktestlib_dep.pri | 6 |
8 files changed, 32 insertions, 32 deletions
diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml index 4e03e51..37a6e66 100644 --- a/src/imports/testlib/TestCase.qml +++ b/src/imports/testlib/TestCase.qml @@ -39,8 +39,8 @@ ** ****************************************************************************/ -import Qt 4.7 -import QtTest 1.0 +import QtQuick 1.0 +import QtQuickTest 1.0 import "testlogger.js" as TestLogger Item { @@ -65,7 +65,7 @@ Item { // Property that is set to true when the main window is shown. // We need to set the property value in an odd way to handle - // both qmlviewer and the QtTest module test wrapper. + // both qmlviewer and the QtQuickTest module test wrapper. property bool windowShown: Qt.qtest_wrapper ? qtest.windowShown : false // Internal private state @@ -79,14 +79,14 @@ Item { if (!msg) msg = ""; results.fail(msg, Qt.qtest_caller_file(), Qt.qtest_caller_line()) - throw new Error("QtTest::fail") + throw new Error("QtQuickTest::fail") } function verify(cond, msg) { if (!msg) msg = ""; if (!results.verify(cond, msg, Qt.qtest_caller_file(), Qt.qtest_caller_line())) - throw new Error("QtTest::fail") + throw new Error("QtQuickTest::fail") } function compareInternal(actual, expected) { @@ -129,7 +129,7 @@ Item { if (!msg) msg = "" if (!results.compare(success, msg, act, exp, Qt.qtest_caller_file(), Qt.qtest_caller_line())) - throw new Error("QtTest::fail") + throw new Error("QtQuickTest::fail") } function tryCompare(obj, prop, value, timeout) { @@ -147,21 +147,21 @@ Item { var exp = formatValue(value) var success = compareInternal(actual, value) if (!results.compare(success, "property " + prop, act, exp, Qt.qtest_caller_file(), Qt.qtest_caller_line())) - throw new Error("QtTest::fail") + throw new Error("QtQuickTest::fail") } function skip(msg) { if (!msg) msg = "" results.skipSingle(msg, Qt.qtest_caller_file(), Qt.qtest_caller_line()) - throw new Error("QtTest::skip") + throw new Error("QtQuickTest::skip") } function skipAll(msg) { if (!msg) msg = "" results.skipAll(msg, Qt.qtest_caller_file(), Qt.qtest_caller_line()) - throw new Error("QtTest::skip") + throw new Error("QtQuickTest::skip") } function expectFail(tag, msg) { @@ -170,7 +170,7 @@ Item { if (!msg) msg = "" if (!results.expectFail(tag, msg, Qt.qtest_caller_file(), Qt.qtest_caller_line())) - throw new Error("QtTest::expectFail") + throw new Error("QtQuickTest::expectFail") } function expectFailContinue(tag, msg) { @@ -179,7 +179,7 @@ Item { if (!msg) msg = "" if (!results.expectFailContinue(tag, msg, Qt.qtest_caller_file(), Qt.qtest_caller_line())) - throw new Error("QtTest::expectFail") + throw new Error("QtQuickTest::expectFail") } function warn(msg) { @@ -213,7 +213,7 @@ Item { testCaseResult = testCase[prop](arg) } catch (e) { testCaseResult = [] - if (e.message.indexOf("QtTest::") != 0) { + if (e.message.indexOf("QtQuickTest::") != 0) { // Test threw an unrecognized exception - fail. fail(e.message) } diff --git a/src/imports/testlib/main.cpp b/src/imports/testlib/main.cpp index 0d65027..d04bccf 100644 --- a/src/imports/testlib/main.cpp +++ b/src/imports/testlib/main.cpp @@ -103,7 +103,7 @@ class QTestQmlModule : public QDeclarativeExtensionPlugin public: virtual void registerTypes(const char *uri) { - Q_ASSERT(QLatin1String(uri) == QLatin1String("QtTest")); + Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuickTest")); qmlRegisterType<QDeclarativeTestResult>(uri,1,0,"TestResult"); } void initializeEngine(QDeclarativeEngine *engine, const char *) diff --git a/src/imports/testlib/testlib.pro b/src/imports/testlib/testlib.pro index b3b91c9..f1ae659 100644 --- a/src/imports/testlib/testlib.pro +++ b/src/imports/testlib/testlib.pro @@ -21,8 +21,8 @@ qdeclarativesources.files += \ TestCase.qml \ testlogger.js -qdeclarativesources.path += $$[QT_INSTALL_IMPORTS]/QtTest -target.path += $$[QT_INSTALL_IMPORTS]/QtTest +qdeclarativesources.path += $$[QT_INSTALL_IMPORTS]/QtQuickTest +target.path += $$[QT_INSTALL_IMPORTS]/QtQuickTest INSTALLS += qdeclarativesources target include(../../quicktestlib/quicktestlib_dep.pri) diff --git a/src/quicktestlib/qdeclarativetest.h b/src/quicktestlib/qdeclarativetest.h index b76eb72..f89868d 100644 --- a/src/quicktestlib/qdeclarativetest.h +++ b/src/quicktestlib/qdeclarativetest.h @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE typedef QWidget *(*qtest_create_viewport)(); -Q_TEST_QUICK_EXPORT int qtest_quick_main(int argc, char **argv, const char *name, qtest_create_viewport createViewport, const char *sourceDir); +Q_QUICK_TEST_EXPORT int qtest_quick_main(int argc, char **argv, const char *name, qtest_create_viewport createViewport, const char *sourceDir); #ifdef QTEST_QUICK_SOURCE_DIR diff --git a/src/quicktestlib/qdeclarativetestresult_p.h b/src/quicktestlib/qdeclarativetestresult_p.h index bb55a78..776a77a 100644 --- a/src/quicktestlib/qdeclarativetestresult_p.h +++ b/src/quicktestlib/qdeclarativetestresult_p.h @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE class QDeclarativeTestResultPrivate; -class Q_TEST_QUICK_EXPORT QDeclarativeTestResult : public QObject +class Q_QUICK_TEST_EXPORT QDeclarativeTestResult : public QObject { Q_OBJECT Q_ENUMS(FunctionType) diff --git a/src/quicktestlib/quicktestglobal.h b/src/quicktestlib/quicktestglobal.h index cfdad78..0c71b5c 100644 --- a/src/quicktestlib/quicktestglobal.h +++ b/src/quicktestlib/quicktestglobal.h @@ -44,7 +44,7 @@ #include <QtCore/qglobal.h> -QT_LICENSED_MODULE(QtTestQuick) +QT_LICENSED_MODULE(QtQuickTest) #if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) # if defined(QT_NODLL) # undef QT_MAKEDLL @@ -53,20 +53,20 @@ QT_LICENSED_MODULE(QtTestQuick) # if defined(QT_DLL) # undef QT_DLL # endif -# if defined(QT_BUILD_TEST_QUICK_LIB) -# define Q_TEST_QUICK_EXPORT Q_DECL_EXPORT +# if defined(QT_BUILD_QUICK_TEST_LIB) +# define Q_QUICK_TEST_EXPORT Q_DECL_EXPORT # else -# define Q_TEST_QUICK_EXPORT Q_DECL_IMPORT +# define Q_QUICK_TEST_EXPORT Q_DECL_IMPORT # endif # elif defined(QT_DLL) /* use a Qt DLL library */ -# define Q_TEST_QUICK_EXPORT Q_DECL_IMPORT +# define Q_QUICK_TEST_EXPORT Q_DECL_IMPORT # endif #endif -#if !defined(Q_TEST_QUICK_EXPORT) +#if !defined(Q_QUICK_TEST_EXPORT) # if defined(QT_SHARED) -# define Q_TEST_QUICK_EXPORT Q_DECL_EXPORT +# define Q_QUICK_TEST_EXPORT Q_DECL_EXPORT # else -# define Q_TEST_QUICK_EXPORT +# define Q_QUICK_TEST_EXPORT # endif #endif diff --git a/src/quicktestlib/quicktestlib.pro b/src/quicktestlib/quicktestlib.pro index bd29bdf..1ca306e 100644 --- a/src/quicktestlib/quicktestlib.pro +++ b/src/quicktestlib/quicktestlib.pro @@ -1,5 +1,5 @@ TEMPLATE = lib -TARGET = QtTestQuick$${QT_LIBINFIX} +TARGET = QtQuickTest$${QT_LIBINFIX} CONFIG += dll warn_on QT += declarative DESTDIR = ../../lib @@ -38,13 +38,13 @@ HEADERS += $$PRIVATE_HEADERS include(testlib/testlib.pri) -DEFINES += QT_BUILD_TEST_QUICK_LIB +DEFINES += QT_BUILD_QUCIK_TEST_LIB !symbian { target.path += $$[QT_INSTALL_LIBS] INSTALLS += target - install_headers.path = $$[QT_INSTALL_HEADERS]/QtTestQuick + install_headers.path = $$[QT_INSTALL_HEADERS]/QtQuickTest install_headers.files = $$PUBLIC_HEADERS INSTALLS += install_headers } else { @@ -58,7 +58,7 @@ DEFINES += QT_BUILD_TEST_QUICK_LIB for(entry, entries) { exists($$entry) { contains(PUBLIC_HEADERS, $$basename(entry)) { - BLD_INF_RULES.prj_exports += "$$entry $$MW_LAYER_PUBLIC_EXPORT_PATH(QtTestQuick/$$basename(entry))" + BLD_INF_RULES.prj_exports += "$$entry $$MW_LAYER_PUBLIC_EXPORT_PATH(QtQuickTest/$$basename(entry))" } } } diff --git a/src/quicktestlib/quicktestlib_dep.pri b/src/quicktestlib/quicktestlib_dep.pri index a615cd3..9f60c4a 100644 --- a/src/quicktestlib/quicktestlib_dep.pri +++ b/src/quicktestlib/quicktestlib_dep.pri @@ -5,14 +5,14 @@ INCLUDEPATH += $$PWD LIBS += -L../../lib -L../../bin win32:CONFIG(debug, debug|release) { - LIBS += -lQtTestQuick$${QT_LIBINFIX}d + LIBS += -lQtQuickTest$${QT_LIBINFIX}d } else { - LIBS += -lQtTestQuick$${QT_LIBINFIX} + LIBS += -lQtQuickTest$${QT_LIBINFIX} } # Locate the "lib" directory in the build tree and put it before # the Qt "lib" directory in the library path so that we link -# against the libQtTestQuick.so in our build tree, not the Qt one. +# against the libQtQuickTest.so in our build tree, not the Qt one. FIND_TOP=.. for(i,forever) { exists($$_PRO_FILE_PWD_/$$FIND_TOP/qtest-qml.pro):break() |