aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlan Alpert <aalpert@rim.com>2013-02-18 21:07:15 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-05 22:37:25 +0100
commitdfefcba06efc0ad239cb7f9ad5d9a5f9540841db (patch)
tree5e0bd8c615d672a2bac10a3dc22c970d5f1e3215 /tests
parent23b7579e4d82e2c0a840b55adf7817ffb6b4389c (diff)
Add core application functionality to Qt.application in QML
This exposes some information to QML which is available on the QCoreApplication instance. A future change should make it possible to restrict this for use in scripting environments (which should not have access to the QCoreApplication). That has been left out of this change because proper support for such restrictions is not yet in place. Change-Id: Ica144fcfb0b42fa6df8d0cb1c7c03eb97282b489 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qqmlglobal/tst_qqmlglobal.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/auto/qml/qqmlglobal/tst_qqmlglobal.cpp b/tests/auto/qml/qqmlglobal/tst_qqmlglobal.cpp
index 293eccbf64..793da64734 100644
--- a/tests/auto/qml/qqmlglobal/tst_qqmlglobal.cpp
+++ b/tests/auto/qml/qqmlglobal/tst_qqmlglobal.cpp
@@ -54,7 +54,7 @@ private slots:
void initTestCase();
void colorProviderWarning();
- void guiProviderWarning();
+ void noGuiProviderWarning();
};
void tst_qqmlglobal::initTestCase()
@@ -68,11 +68,9 @@ void tst_qqmlglobal::colorProviderWarning()
QQml_colorProvider();
}
-void tst_qqmlglobal::guiProviderWarning()
+void tst_qqmlglobal::noGuiProviderWarning()
{
- const QLatin1String expected("Warning: QQml_guiProvider: no GUI provider has been set! ");
- QTest::ignoreMessage(QtWarningMsg, expected.data());
- QQml_guiProvider();
+ QVERIFY(QQml_guiProvider()); //No GUI provider, so a default non-zero application instance is returned.
}
QTEST_MAIN(tst_qqmlglobal)