diff options
author | Rainer Keller <Rainer.Keller@qt.io> | 2018-06-12 09:11:17 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-06-25 10:39:21 +0000 |
commit | ef06a6ba7bfb5e38b1bef2e21a764ec74479b158 (patch) | |
tree | 6ddef3e36231adafd0eb9b15f14470fabf6226a9 /src/qmltest/quicktest.cpp | |
parent | 362cd43a04d8b551816b1643a1e25b20c76047fa (diff) |
Add test init function for C++ parts
This allows to start other processes as counterparts using QProcess.
In the constructor of the setup class it is not possible because no
QApplication object has been instantiated yet.
[ChangeLog][QtQml] Add test init function to be called when application
object is available.
Change-Id: Id24395eca41921c743062522a4aeb6231f9bdf09
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/qmltest/quicktest.cpp')
-rw-r--r-- | src/qmltest/quicktest.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp index a54b93f72b..53d223678c 100644 --- a/src/qmltest/quicktest.cpp +++ b/src/qmltest/quicktest.cpp @@ -359,6 +359,11 @@ int quick_test_main_with_setup(int argc, char **argv, const char *name, const ch } } + if (setup) { + // Don't check the return value; it's OK if it doesn't exist. + QMetaObject::invokeMethod(setup, "applicationAvailable"); + } + // Look for QML-specific command-line options. // -import dir Specify an import directory. // -plugins dir Specify a directory where to search for plugins. |