diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-03-02 08:25:43 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-20 03:15:43 +0100 |
commit | ab1e510121c8a679fdaca12ccd30e0f7ac12a26b (patch) | |
tree | 68c377ba468a667c43211f005ead5b49b16e49f3 /tests/auto/quick/qquickapplication | |
parent | b143d3fb589e7ce7171c9975679fa47181a6a10f (diff) |
Migrate gui dependencies from QtQml to QtQuick.
Ensure that users of declarative that have no need for functionality
provided by the Qt Gui module do not have to link against it.
Any use of QtGui functionality is delegated to providers that can
be installed by another library; QtQuick adds default providers
for this functionality when linked against QtQml.
Task-number: QTBUG-24559
Change-Id: I5e6a58a4198732dc2f8f52f71abfa1152b871aa7
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tests/auto/quick/qquickapplication')
-rw-r--r-- | tests/auto/quick/qquickapplication/tst_qquickapplication.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/auto/quick/qquickapplication/tst_qquickapplication.cpp b/tests/auto/quick/qquickapplication/tst_qquickapplication.cpp index 61675d980d..4dd7688f6a 100644 --- a/tests/auto/quick/qquickapplication/tst_qquickapplication.cpp +++ b/tests/auto/quick/qquickapplication/tst_qquickapplication.cpp @@ -69,7 +69,15 @@ tst_qquickapplication::tst_qquickapplication() void tst_qquickapplication::active() { QQmlComponent component(&engine); - component.setData("import QtQuick 2.0; Item { property bool active: Qt.application.active }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 2.0; " + "Item { " + " property bool active: Qt.application.active; " + " property bool active2: false; " + " Connections { " + " target: Qt.application; " + " onActiveChanged: active2 = Qt.application.active; " + " } " + "}", QUrl::fromLocalFile("")); QQuickItem *item = qobject_cast<QQuickItem *>(component.create()); QVERIFY(item); QQuickView view; @@ -77,6 +85,7 @@ void tst_qquickapplication::active() // not active QVERIFY(!item->property("active").toBool()); + QVERIFY(!item->property("active2").toBool()); QCOMPARE(item->property("active").toBool(), QGuiApplication::activeWindow() != 0); // active @@ -86,6 +95,7 @@ void tst_qquickapplication::active() QEXPECT_FAIL("", "QTBUG-21573", Abort); QTRY_COMPARE(view.status(), QQuickView::Ready); QCOMPARE(item->property("active").toBool(), QGuiApplication::activeWindow() != 0); + QCOMPARE(item->property("active2").toBool(), QGuiApplication::activeWindow() != 0); #if 0 // QGuiApplication has no equivalent of setActiveWindow(0). QTBUG-21573 @@ -128,6 +138,9 @@ void tst_qquickapplication::layoutDirection() void tst_qquickapplication::inputPanel() { + const QLatin1String expected("Qt.application.inputPanel is deprecated, use Qt.inputMethod instead "); + QTest::ignoreMessage(QtWarningMsg, expected.data()); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; Item { property variant inputPanel: Qt.application.inputPanel }", QUrl::fromLocalFile("")); QQuickItem *item = qobject_cast<QQuickItem *>(component.create()); |