aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp
Commit message (Collapse)AuthorAgeFilesLines
* qqmlapplicationengine: Handle errors during component creationMaximilian Goldstein2021-03-041-0/+18
| | | | | | | | | | | Previously QQmlApplicationEngine did not handle any errors that occurred during object creation (i.e. failures to initialize required properties) which lead to QObject::connect errors and to the error messages not getting printed among other issues. Change-Id: I69bc566a6d349c786cae82a963a621388684c8f5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 890cb4cb236333fd5b112fffc0e9088ecb43f2df) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-031-1/+2
|\ | | | | | | | | | | | | | | Conflicts: src/qmlmodels/qqmltableinstancemodel.cpp src/qmlmodels/qqmltableinstancemodel_p.h Change-Id: I89339b1cb41ba27fe30c79530859a1c2bfbecc69
| * Escape url.toString() before passing it to QRegularExpressionDmitry Shachnev2020-02-201-1/+2
| | | | | | | | | | | | | | Otherwise the test fails when path contains special characters like ‘+’. Change-Id: I461d9755436148ce979284be31ef8d204235c8a4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Add Qt.uiLanguage and QJSEngine::uiLanguage propertiesSimon Hausmann2020-01-231-0/+23
|/ | | | | | | | | | | | | | [ChangeLog][QtQml] Added Qt.uiLanguage and QJSEngine::uiLanguage properties These properties mirror the same value in QML and C++ and can be used freely. They also provide API symmetry to Qt for MCUs. QQmlApplicationEngine binds to this property and applies translations accordingly by constructing a QLocale with the value and using QTranslator::load(locale). Change-Id: Id87d6ee64679b07ff3cb47844594e8eeebd8c8b6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Christian Kamm <mail@ckamm.de>
* Emit QQmlEngine::warnings when load failsFabian Kosmale2020-01-061-0/+16
| | | | | | | | | This uses the existing infrastructure for reporting QML errors, instead of simply using qWarning. Fixes: QTBUG-81093 Change-Id: Ie18656a57f28fa9dfe922936fd05b44ebe1281e2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Introduce functions to set properties during creationFabian Kosmale2019-08-191-0/+18
| | | | | Change-Id: Idd4c8ab9e34b9bc3e00f21d7cf1e4f1a70586e7f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix tst_qqmlapplicationengine failures for AndroidJan Arve Sæther2019-07-191-0/+6
| | | | | | | The tests doesn't make much sense on Android so we just skip them Change-Id: Ie93858f7041657d6e6d05229454f970a761efc0b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix for loading translations automatically from resourcesTasuku Suzuki2019-06-011-0/+27
| | | | | | | | When qml file is in resources, translations under i18n was not loaded Task-number: QTBUG-76085 Change-Id: I75315ceb6a1e6ab10309634a3c445a82476d525c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Connect quit() and exit() signals with queued connectionsMichal Policht2019-02-131-11/+33
| | | | | | | | | | | | | | | | | | Class QQmlApplicationEngine connects QQmlApplicationEngine::quit() signal to QCoreApplication::quit() and QQmlApplicationEngine::exit() signal to QCoreApplication::exit(), but it does so with AutoConnection. This causes in some circumstances problems, which are described in Qt documentation (see QCoreApplication::exit()). This change modifies type of connections to queued connections. [ChangeLog][QtQml][QQmlApplicationEngine] QQmlApplicationEngine connects quit() and exit() signals with queued connections to avoid problems with AutoConnection, when connecting to QCoreApplication slots. Task-number: QTBUG-73649 Change-Id: Ib27738b5af2f879efee8862b1ca01613a2e8dc4e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlApplicationEngine: Fix using invalid pointersRainer Keller2017-04-261-0/+19
| | | | | | | | | | When a root object was deleted before QQmlApplicationEngine the invalid pointers stayed in the list of root objects leading to crashes when destructing QQmlApplicationEngine. Root objects are watched for destruction and removed from the list. Change-Id: I1babab54dbb7d7b16ed883ada5b3e420ca8690cb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-131-0/+2
|\ | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlimport.cpp Change-Id: I26f8d18fe8af664ee8573116f182fe12b71e089a
| * Fix building with -no-feature-processUlf Hermann2017-03-021-0/+2
| | | | | | | | | | | | | | | | Drop an unused include, don't try to build qmlplugindump in this case, and add some guards around QProcess includes and usages. Change-Id: I6ce5985a8dd1967f146016a7acd1ea31fb3bda2a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QQmlApplicationEngine: Yet another fix after QUrl behavior changes in QtBaseRobin Burchell2017-01-161-0/+24
|/ | | | | | | | | | | | | | | | | | | | Picture the following application: QQmlApplication qAppEngine("main.qml"); With main.qml: ... AComponentInTheSameDirectory { } ... This was failing, with the error: file:main.qml:13 AComponentInTheSameDirectory is not a type Which is wrong, but also reveals the root cause in that the original filename was not a fully resolved path. Change-Id: Ifc5557cc43f4bb92fd121ea9f7a37f09b3b38a9b Reviewed-by: David Faure <david.faure@kdab.com>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-3/+3
| | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Make tst_qqmlapplicationengine pass when JIT is not availableDmitry Shachnev2016-10-111-1/+1
| | | | | | | | | When the platform does not have JIT, a warning about this is printed into the process stderr, so the test fails. Change-Id: I67c605bd09659c444d0a05f476314e9c7fc2ce6d Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Updated license headersJani Heikkinen2016-01-201-17/+12
| | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I04760a0801837cfc516d1c7c02d4f503f6bb70b6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-6/+6
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* tst_qqmlapplicationengine: clear $QT_MESSAGE_PATTERNDavid Faure2014-07-301-1/+2
| | | | | | | | The test fails if it's set, because it looks at the output from testapp and compares it with expected output. Change-Id: Idc82e2f9024b72cb8be919c2d1bfa4efb4957e4e Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Fixed qqmlapplicationengine autotest build for QT_NO_PROCESSOliver Wolff2014-03-101-0/+4
| | | | | Change-Id: Ie5993fac36a29a7d7edcadf5030dc2b5bf95b506 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* Add the features of QLoggingCategory to QML's debugging methods.Giorgos Tsiapaliokas2014-03-071-1/+1
| | | | | | | | | | It is now possible to modify the output of QML's debugging methods. Also the prefix of "qml" makes it possible to capture the output from the QML files using qInstallMessageHandler. This commit depends on qtbase/4967c7106568d5df0be4d40bf793583c7c6bdb69 Change-Id: I2c7a2cb96a0b91fd3249dc2dacbab63e6ac68243 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Prefer to use normalised signal/slot signaturesSergio Ahumada2014-03-031-1/+1
| | | | | | Change-Id: I9856c110399c4b6b1ea6aba2d92392cecff04656 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix MSVC-warning about unused variable in tst_qqmlapplicationengine.cppFriedemann Kleint2014-01-241-17/+16
| | | | | Change-Id: I808e56db47d3967f4361cb8b96644834fafb533a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix Qt.application.xxx notifier signalsJ-P Nurmi2013-07-041-0/+13
| | | | | | | QCoreApplication now provides change notifications. Change-Id: Icd7e1247426f4b5ad124d6d9b72a2ba99225ee08 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Add Qt.application.organization/domainJ-P Nurmi2013-06-291-0/+16
| | | | | | Change-Id: Ic4a161b59d51e621e13c960f104d1a3be2ee64f8 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Stabilize TestAlan Alpert2013-04-101-4/+2
| | | | | | | | Use QProcess::waitForFinished over a signal spy. Has a chance of stabilizing the test, but also cleans up the code. Change-Id: I888c3b9da6d44d11516227c085bcc12a5ccb5e8a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QQmlApplicationEngineAlan Alpert2013-03-201-0/+162
This helper class exposes QML application functionality that QML-only applications want to have, but QML-using applications may not. Change-Id: If91c3f55ffa2a4aecdd9d6cc62f6ad09fd35b0dd Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>