From 470f8fc2b0fe6820d74098807d887284abcf2d62 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 8 Mar 2019 12:09:17 +0100 Subject: Document since versions for QUICK_TEST_MAIN_WITH_SETUP functions - qmlEngineAvailable() 5.11 c260d3062de83d7f051e531007771455915285e5 - applicationAvailable() 5.12 ef06a6ba7bfb5e38b1bef2e21a764ec74479b158 - cleanupTestCase() 5.12 7bf8d4d3772959f06d4dd0168af7774adde29d76 Change-Id: I7b6b699121248c5ad35a7ee2c99eb3f3c77fd01f Reviewed-by: Paul Wicking --- src/qmltest/doc/src/qtquicktest-index.qdoc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/qmltest/doc/src/qtquicktest-index.qdoc') diff --git a/src/qmltest/doc/src/qtquicktest-index.qdoc b/src/qmltest/doc/src/qtquicktest-index.qdoc index dfd15b706b..f7c1ca4911 100644 --- a/src/qmltest/doc/src/qtquicktest-index.qdoc +++ b/src/qmltest/doc/src/qtquicktest-index.qdoc @@ -150,11 +150,13 @@ \header \li Name \li Purpose + \li Since \row \li void applicationAvailable() \li Called right after the QApplication object was instantiated. Use this function to setup everything that is not related to QML directly. + \li Qt 5.12 \row \li void qmlEngineAvailable(QQmlEngine*) \li Called when the QML engine is available. @@ -162,10 +164,12 @@ \l {QQmlEngine::addPluginPath}{plugin paths}, and \l {QQmlFileSelector::setExtraSelectors}{extra file selectors} will have been set on the engine by this point. + \li Qt 5.11 \row \li void cleanupTestCase() \li Called right after the test execution has finished. Use this function to clean up before everything will start to be destructed. + \li Qt 5.12 \endtable Each function will be called once for each \c tst_*.qml file, so any -- cgit v1.2.3 From 8ed74406c0c2bf9a8d82f95a300013403ae44488 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 8 Mar 2019 12:18:58 +0100 Subject: Doc: improve QUICK_TEST_MAIN_WITH_SETUP function descriptions Change-Id: I83c8a3cb8d125df83deaefdbb08b4271eda8a5b4 Reviewed-by: Paul Wicking --- src/qmltest/doc/src/qtquicktest-index.qdoc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/qmltest/doc/src/qtquicktest-index.qdoc') diff --git a/src/qmltest/doc/src/qtquicktest-index.qdoc b/src/qmltest/doc/src/qtquicktest-index.qdoc index f7c1ca4911..bee160f6e8 100644 --- a/src/qmltest/doc/src/qtquicktest-index.qdoc +++ b/src/qmltest/doc/src/qtquicktest-index.qdoc @@ -154,8 +154,8 @@ \row \li void applicationAvailable() \li Called right after the QApplication object was instantiated. - Use this function to setup everything that is not related - to QML directly. + Use this function to perform setup that does not require a + \l QQmlEngine instance. \li Qt 5.12 \row \li void qmlEngineAvailable(QQmlEngine*) @@ -164,6 +164,11 @@ \l {QQmlEngine::addPluginPath}{plugin paths}, and \l {QQmlFileSelector::setExtraSelectors}{extra file selectors} will have been set on the engine by this point. + + This function can be used to \l {Choosing the Correct Integration + Method Between C++ and QML}{register QML types} and + \l {QQmlEngine::addImportPath()}{add import paths}, + amongst other things. \li Qt 5.11 \row \li void cleanupTestCase() -- cgit v1.2.3 From b2fd2b664212344eb82b44f916c849314d5e02fb Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Tue, 9 Apr 2019 18:32:50 +0200 Subject: Doc: correct the info about when each Qt Quick Test function is called Only qmlEngineAvailable() is called for each QML test file; the rest are called once for the entire test application. Change-Id: I293c5a2491da75ddad68e7fb89bcd32b770fccf5 Reviewed-by: Paul Wicking --- src/qmltest/doc/src/qtquicktest-index.qdoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/qmltest/doc/src/qtquicktest-index.qdoc') diff --git a/src/qmltest/doc/src/qtquicktest-index.qdoc b/src/qmltest/doc/src/qtquicktest-index.qdoc index bee160f6e8..4fad21e080 100644 --- a/src/qmltest/doc/src/qtquicktest-index.qdoc +++ b/src/qmltest/doc/src/qtquicktest-index.qdoc @@ -165,6 +165,10 @@ and \l {QQmlFileSelector::setExtraSelectors}{extra file selectors} will have been set on the engine by this point. + This function is called once for each QML test file, + so any arguments are unique to that test. For example, this + means that each QML test file will have its own QML engine. + This function can be used to \l {Choosing the Correct Integration Method Between C++ and QML}{register QML types} and \l {QQmlEngine::addImportPath()}{add import paths}, @@ -177,10 +181,6 @@ \li Qt 5.12 \endtable - Each function will be called once for each \c tst_*.qml file, so any - arguments are unique to that test. For example, this means that each QML - test file will have its own QML engine. - The following example demonstrates how the macro can be used to set context properties on the QML engine: -- cgit v1.2.3