aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlconsole
Commit message (Collapse)AuthorAgeFilesLines
* Correct license for test filesLucie Gérard2024-02-277-7/+7
| | | | | | | | | | | | | | According to QUIP-18 [1], all test files should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I26d72e8de04d4c7c57b3b7838af5d033265de5ba Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Kai Köhne <kai.koehne@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QtQml: Use correct logging category in console.trace()Ulf Hermann2024-02-231-0/+9
| | | | | | | Pick-to: 6.7 Fixes: QTBUG-108673 Change-Id: I5a267bbb52d9ba2d50ad63d29025eeae5796b093 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* tst_qqmlconsole: Clean up memory managementAmanda Hamblin-Trué2023-08-011-15/+9
| | | | | | Task-number: QTBUG-115222 Change-Id: I067154627be93091c11b064d35cced0d6a5d6cd0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Make qml tests standalone projectsAlexandru Croitor2023-07-051-0/+6
| | | | | | | | | | | | | | | | | Add the boilerplate standalone test prelude to each test, so that they can be opened with an IDE without the qt-cmake-standalone-test script, but directly with qt-cmake or cmake. Boilerplate was added using the follow script: https://git.qt.io/alcroito/cmake_refactor Manual adjustments were made where the code was inserted in the wrong location. Task-number: QTBUG-93020 Change-Id: Ia68c9d263e7454f0c4a26c29b10f1c535d08e2f6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
* Retire the qt_parse_all_argumentsAmir Masoud Abdol2023-01-201-2/+2
| | | | | | Task-number: QTBUG-99238 Change-Id: Ia11c9cbd7c06347319ab3674ec0cd8da0214747e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-09-071-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: Id89ed14990804a5024183e75382cc539d4293da1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Don't use PUBLIC_LIBRARIES for tests and test helpersAlexandru Croitor2022-07-281-1/+1
| | | | | Change-Id: I1cd769f85d5f82c43639d6787d98e536619249e6 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-081-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I72c89a98c42bbc9234d8495e9e503bec81d11037 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-117-214/+28
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* INTEGRITY: Fix some test cases from core/qml foldersKimmo Ollila2022-03-031-0/+4
| | | | | | | | | | | | | -Add dummy_imports.qml to TESTDATA -Let qmlimportscanner handle plugin import -Skip cases that depend on mounted filesystem Task-number: QTBUG-99123 Pick-to: 6.3 6.2 Change-Id: I99e21e423f2114c4c4ee1e24bdf9bb85af51baf7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* QQmlLoggingCategory: Avoid unnecessary warnings from settersIvan Tkachenko2021-11-025-30/+44
| | | | | | | | | | | | | | | Assigning same value should be a no-op, especially because such assignments may happen without explicit user/developer intent. For example, it can be triggered with QQmlEngine::retranslate() call on 5.15 and early 6.x branches. Since the recent optimizations to retranslate() which now only forces to re-evaluate what's really dependent on qsTr, it became harder, but still possible to pull it off. Fixes: QTBUG-97717 Pick-to: 5.15 6.2 Change-Id: I60ca8e36ed98a15ea5f3c15290865cec27084fbc Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Consolidate test helpers into private librariesMitch Curtis2021-09-132-5/+3
| | | | | | | | | | | | | | | | | | | | Previously each test would include and build sources from the shared folder. Now we make those sources a library, build it once, then have each test link to it instead. We also take the opportunity to move some helpers that qtquickcontrols2 had added into the quicktestutils library where it makes sense, and for the helpers that don't make sense to be there, move them into quickcontrolstestutils. We add the libraries to src/ so that they are internal modules built as part of Qt, rather than tests. That way we can use them in a standalone test outside of qtdeclarative. Task-number: QTBUG-95621 Pick-to: 6.2 Change-Id: I0a2ab3976fdbff2e4414df7bdc0808f16453b80a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Equalize signal handlers between runtime and AOT compilationAndrei Golubev2021-03-021-14/+23
| | | | | | | | | | | | | | | | | | | | QQmlTypeCompiler was doing some signal handler transformations which were incompatible with qmlcachegen logic. This resulted in different compilation units between the compilation modes, which is hard to support, so instead just drop that pass Pros: + Less differences in compilation units + Less code in QQmlTypeCompiler Cons: - With runtime compilation: compilation unit becomes slightly larger in cases with "onSignal: function() {}" but this is now aligned with qmlcachegen anyway Task-number: QTBUG-84368 Change-Id: If9e3b12e6999f3e2fd0012acaeee8cb5c08f80d8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove the qmake project filesFabian Kosmale2021-01-151-11/+0
| | | | | | | | | Remove all qmake project files, except for examples which are used to test that qmake continues to work. Change-Id: Ic4abb72dc2dcd75df7a797c56056b6b3c5fe62ac Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-10-061-3/+3
| | | | | | | | Modify special case locations to use the new API as well. Task-number: QTBUG-86815 Change-Id: I3b964e3baf0cc7040830156dac30358ea1152801 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Fix QtQml after QMetaType/QVariant changes in Qt CoreLars Knoll2020-08-281-1/+0
| | | | | Change-Id: I2a983cf8188e88d80d3b7726208d821427eb8f3c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Update Apple platform defines after rename in qtbaseTor Arne Vestbø2020-03-171-2/+2
| | | | | Change-Id: Ia0a075e3199eab735f9b289873beeb8730ebc47e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Regenerate qtdeclarativeAlexandru Croitor2020-02-121-2/+1
| | | | | | | Change-Id: I48d7fd306f3d1b161a8e73029282ee591b1ef612 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* Regenerate all projects with new CMake API versionAlexandru Croitor2019-11-151-3/+3
| | | | | | Change-Id: Ie0db35f674137c229eaf049616f38f8e818f7092 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Regenerate testsAlexandru Croitor2019-11-141-11/+2
| | | | | | Change-Id: I67a6c8f1659e7b471a4fcb92a2699292cf4eea81 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-142-5/+7
|\ | | | | | | | | | | | | Removed dependencies.yaml because we don't use it yet in wip/cmake. Fixed conflict in qmlcachegen.cpp. Change-Id: Ie1060c737bee1daa85779903598e5b6d5020d922
| * tst_qqmlconsole: avoid setContextPropertyFabian Kosmale2019-10-072-5/+7
| | | | | | | | | | Change-Id: I18fe554e6f8bb2e17da6ce194f24a597098294be Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add QtDeclarative Test CoverageLeander Beernaert2019-08-141-0/+47
|/ | | | | | | | | | | | | | | | | | | | | | All tests compile and run on a developer build. These tests are failing: tst_qqmlsqldatabase Fails due to missing sql driver tst_qqmlsqldatabase Fails in wip/qt6 tst_ququicklayouts Fails in wip/qt6 tst_flickableinterop Fails in wip/qt6 tst_qquickpinchandler Fails in wip/qt6 tst_qquickflickable Fails in wip/qt6 tst_qquickgridview Fails in wip/qt6 tst_qquickimage Fails due to missing jpeg plugin tst_qquicklistview Fails in wip/qt6 tst_qquicktext Fails in wip/qt6 tst_qquickcanvasitem Fails in wip/qt6 tst_scenegraph Fails due to missing jpeg plugin tst_TestFiltering Fails in wip/qt6 Change-Id: I4b9d69c118e23c095cb72ad5a67653fc30943bb1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Improve logging of nested arraysUlf Hermann2019-01-032-0/+2
| | | | | | | | | | | | Nested arrays should be printed with nested '[' and ']', rather than flattened. [ChangeLog][QML] Nested arrays are not flattened anymore when printed through console.log() and friends. Change-Id: Ic27e58047fd78bc146e1179585fd0cb2c60a1144 Fixes: QTBUG-71931 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Use custom debug stream operator in console.logMårten Nordheim2018-11-082-0/+15
| | | | | | | | | | | Fallback for string-conversion was previously using hard-coded string template mimicing QVariant. Just use QVariant's debug stream operator which may include data from the contained type. Change-Id: I8243ba6b04d842a895ac3234bb54f6a4eed849f1 Fixes: QTBUG-60057 Done-With: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix a bunch of test failures for Function.prototype.toString()Lars Knoll2018-08-011-1/+1
| | | | | Change-Id: I36f642e8db7f88698b25eed9e8a64ac2c5896b10 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add defaultLogLevel to LoggingCategoryTomasz Olszak2018-06-252-3/+24
| | | | | | | | | | | | | Add possibility to define default logging category log level. Just like in QLoggingCategory constructor. [ChangeLog][QML Elements][LoggingCategory] Added defaultLogLevel property. It is possible to define default log level that LoggingCategory is enabled for. Task-number: QTBUG-67094 Change-Id: I12557dfb7c228c40b325d0dccde4c525acae0300 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Print function identifier when calling toString() on a functionMitch Curtis2018-05-231-1/+1
| | | | | | Task-number: QTBUG-50669 Change-Id: Ia0e9491b12ca1db1da2bfa8eb5ca8bbe4658f699 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix console.log for sequence types such as QStringListSimon Hausmann2018-05-022-2/+9
| | | | | | | | | | The output should be the same as if we were printing an array, with brackets. Task-number: QTBUG-67776 Change-Id: I942df66a2908f82ea8ba1ce65676413569cf6f02 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-6/+6
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Added Logging Category support to QMLDominik Holland2016-08-102-0/+101
| | | | | | | | | | | | | | | | New Logging Categories can be defined by using the LoggingCategory type and define a name for the category When the id of a valid LoggingCategory is provided as the first argument to console.log and friends the LoggingCategory is used instead of the default "qml" LoggingCategory [ChangeLog][QML Elements] Added a LoggingCategory type and added support for it to the console object Change-Id: Ifaeed5f71de6ea6d8172d8c838d6e7789c4d6b9d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Updated license headersJani Heikkinen2016-01-206-102/+72
| | | | | | | | | | | | 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>
* Fixed qtdeclarative tests to pass with updated license headerJani Heikkinen2016-01-201-8/+8
| | | | | Change-Id: I3c826a7b3ee9ff66fac89a7a3d6f0e7057f03eed Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Remove CONFIG += parallel_test.Friedemann Kleint2015-09-051-2/+0
| | | | | | | The keyword no longer has a meaning for the new CI. Change-Id: I699f2881e291cce02a6a608a8710638886e38daa Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Remove QT_DISABLE_DEPRECATED_BEFORE=0 from tests not using deprecated API.Friedemann Kleint2015-09-031-1/+0
| | | | | Change-Id: I691b8ddff60b5f16f06d32b379c76e87f44f84a9 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Don't call the test method assertLars Knoll2015-08-091-2/+2
| | | | | | | | Mac OS X apparently uses a macro for assert(), completely breaking compilation of this file Change-Id: I51379da6e0c702e4d021dcd9a84af39889d24c2d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-126-42/+42
| | | | | | | | | 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>
* Redirect console.info to new QtInfoMsgKai Koehne2015-01-151-1/+1
| | | | | Change-Id: I6f4560a3baae16dd6db090d51a577060689825ef Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-256-122/+74
| | | | | | | | | - 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>
* Add the features of QLoggingCategory to QML's debugging methods.Giorgos Tsiapaliokas2014-03-071-0/+6
| | | | | | | | | | 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>
* Infrastructure for supporting multiple profilers in qqmlprofilerserviceUlf Hermann2014-02-131-1/+1
| | | | | | | | | The concepts of "global" and "engine" profilers are introduced. Profilers can either be attached to specific QML engines and run in their threads or they can be unspecific global profilers running in arbitrary threads. Change-Id: I3862fc65c07ccb33a1ca08cd2425e4079d3ffc02 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Make sure that profiling can only be started if debugging is enabled.Ulf Hermann2014-01-151-2/+2
| | | | | | | | | | | Enabling the profiler doesn't make much sense if there is no debug service as the messages can't be sent anywhere then. Furthermore, the profiler instance is only properly initialized if debugging is enabled and thus enabling profiling without debugging being enabled can cause problems. Change-Id: I784a110126d45a9a2bc9d9e14d9a22e2980c3a42 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Fix the console autotestsLars Knoll2013-06-171-10/+10
| | | | | Change-Id: I8936c6baa274e673c23c65637fa199a6140e0a15 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-106-6/+6
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-236-148/+148
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* doc: fix some typos in .qml filesSergio Ahumada2012-09-071-1/+1
| | | | | Change-Id: Ice5d60b06ec9ab81fbd98fd1679c8834f3018938 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Console API: Print JS objectAurindam Jana2012-08-282-5/+7
| | | | | | | | | Calling console.log(), console.debug(), print() etc would only print out "Object" if a JS Object was passed as an argument. This patch calls the toString() on the object. Change-Id: Iadf8b4d1fe81c3e2c7bd65e3c153a930fd994bef Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-011-0/+1
| | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I6988c2360e9d88916311374a0c910bfc5b607439 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add gui-private to testsGirish Ramakrishnan2012-06-221-1/+1
| | | | | | | QWindowSystemInterface will be marked as QPA API. Change-Id: Id174a24f8432219adf1425efe1eb59cf67d48bb9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Changed qml tests to work from install directoryKurt Korbatits2012-03-071-3/+1
| | | | | | | | | | - Changed tests to use TESTDATA - moved qqmlcontext to private test as it contains private header - added check for cross_compile option to skip when sources not available Change-Id: I0f68f58ffcb1b41b8e40a9851e3e003fe72ee2f9 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>