aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2011-09-16 12:07:14 +0200
committerQt by Nokia <qt-info@nokia.com>2011-09-16 15:08:15 +0200
commitd1b1ee0271c7b73aef33b5bcb24e6d3e4cc6670d (patch)
treea324c706d0bf492b3b56082401f1b26c33cc9fdd
parent5eab92e9a3017067fe3e4c84832661c8213245f4 (diff)
Get rid of autotests dependencies on QtWidgets
Change-Id: I19936b7f8173eff9fc0bc3e19b0a61830dc5a440 Reviewed-on: http://codereview.qt-project.org/5097 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
-rw-r--r--tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativetranslation/tst_qdeclarativetranslation.cpp12
5 files changed, 10 insertions, 10 deletions
diff --git a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
index 3effd68b39..d2581bcb96 100644
--- a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
+++ b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
@@ -188,7 +188,7 @@ void tst_qdeclarativebinding::deletedObject()
QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create());
QVERIFY(rect != 0);
- QApplication::sendPostedEvents(0, QEvent::DeferredDelete);
+ QGuiApplication::sendPostedEvents(0, QEvent::DeferredDelete);
//don't crash
rect->setProperty("activateBinding", true);
diff --git a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp
index 41486877d6..b53a92c6bb 100644
--- a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp
+++ b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp
@@ -143,7 +143,7 @@ int main(int argc, char *argv[])
char arg[] = "-qmljsdebugger=port:13770";
_argv[_argc - 1] = arg;
- QApplication app(_argc, _argv);
+ QGuiApplication app(_argc, _argv);
tst_QDeclarativeDebugClient tc;
return QTest::qExec(&tc, _argc, _argv);
delete _argv;
diff --git a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
index d849ad2a79..011bd40cbc 100644
--- a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
+++ b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
@@ -190,7 +190,7 @@ int main(int argc, char *argv[])
char arg[] = "-qmljsdebugger=port:13769";
_argv[_argc - 1] = arg;
- QApplication app(_argc, _argv);
+ QGuiApplication app(_argc, _argv);
tst_QDeclarativeDebugService tc;
return QTest::qExec(&tc, _argc, _argv);
delete _argv;
diff --git a/tests/auto/declarative/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp b/tests/auto/declarative/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp
index d202a79eb9..0e4eebb349 100644
--- a/tests/auto/declarative/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp
+++ b/tests/auto/declarative/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp
@@ -1211,7 +1211,7 @@ int main(int argc, char *argv[])
char arg[] = "-qmljsdebugger=port:3768";
_argv[_argc - 1] = arg;
- QApplication app(_argc, _argv);
+ QGuiApplication app(_argc, _argv);
tst_QDeclarativeEngineDebug tc;
return QTest::qExec(&tc, _argc, _argv);
delete _argv;
diff --git a/tests/auto/declarative/qdeclarativetranslation/tst_qdeclarativetranslation.cpp b/tests/auto/declarative/qdeclarativetranslation/tst_qdeclarativetranslation.cpp
index 109b98bdc4..4f47b80fdd 100644
--- a/tests/auto/declarative/qdeclarativetranslation/tst_qdeclarativetranslation.cpp
+++ b/tests/auto/declarative/qdeclarativetranslation/tst_qdeclarativetranslation.cpp
@@ -70,7 +70,7 @@ void tst_qdeclarativetranslation::translation()
{
QTranslator translator;
translator.load(QLatin1String("qml_fr"), QLatin1String(SRCDIR) + QLatin1String("/data"));
- QApplication::installTranslator(&translator);
+ QCoreApplication::installTranslator(&translator);
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, TEST_FILE("translation.qml"));
@@ -86,7 +86,7 @@ void tst_qdeclarativetranslation::translation()
QCOMPARE(object->property("singular").toString(), QLatin1String("1 canard"));
QCOMPARE(object->property("plural").toString(), QLatin1String("2 canards"));
- QApplication::removeTranslator(&translator);
+ QCoreApplication::removeTranslator(&translator);
delete object;
}
@@ -94,7 +94,7 @@ void tst_qdeclarativetranslation::idTranslation()
{
QTranslator translator;
translator.load(QLatin1String("qmlid_fr"), QLatin1String(SRCDIR) + QLatin1String("/data"));
- QApplication::installTranslator(&translator);
+ QCoreApplication::installTranslator(&translator);
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, TEST_FILE("idtranslation.qml"));
@@ -104,7 +104,7 @@ void tst_qdeclarativetranslation::idTranslation()
QCOMPARE(object->property("idTranslation").toString(), QLatin1String("bonjour tout le monde"));
QCOMPARE(object->property("idTranslation2").toString(), QLatin1String("bonjour tout le monde"));
- QApplication::removeTranslator(&translator);
+ QCoreApplication::removeTranslator(&translator);
delete object;
}
@@ -112,7 +112,7 @@ void tst_qdeclarativetranslation::translationInQrc()
{
QTranslator translator;
translator.load(":/qml_fr.qm");
- QApplication::installTranslator(&translator);
+ QCoreApplication::installTranslator(&translator);
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, QUrl("qrc:/translation.qml"));
@@ -128,7 +128,7 @@ void tst_qdeclarativetranslation::translationInQrc()
QCOMPARE(object->property("singular").toString(), QLatin1String("1 canard"));
QCOMPARE(object->property("plural").toString(), QLatin1String("2 canards"));
- QApplication::removeTranslator(&translator);
+ QCoreApplication::removeTranslator(&translator);
delete object;
}