aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/testlib/qmldir
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Remove testlogger.js from qmldirAlexandru Croitor2020-03-171-1/+0
| | | | | | | | Install it, without adding it as entry to the generated qmldir file. Change-Id: I0b63d4069767e2ad21afcf94741212d14ceb2745 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Fix QtQuick test import failure in testsAlexandru Croitor2020-03-161-0/+1
| | | | | | | | | | | | | | | | | | | testlogger.js was added to the generated qmldir file with a 6.0 version, and that failed qmltests that tried to import QtQuick with the following error invalid version 6.0.0, expected <major>.<minor> import QtTest 1.1 ^ Until pro2cmake is fixed not to look at QML_FILES in .qmake .pro files when generating the contents of the qmldir file, add the js file to the static qmldir file and regenerate the project. Change-Id: I71d2dc34441f53f05c4eb3a108819913e809eb50 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove double type registrationSimon Hausmann2019-09-161-1/+0
| | | | | | | | TestCase.qml is registered under version 1.0 and 1.2, but the latter is redundant. Change-Id: Ie05d91c884ec2e60ce40de90514810c95ea1ff88 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QuickTest: declare a missing QtQuick.Window dependencyJ-P Nurmi2018-02-211-0/+1
| | | | | | | | | Since fdb8226, TestCase.qml imports QtQuick.Window 2.0. The dependency must be explicitly declared in static builds. Change-Id: Ia7d3d19573e2c5b49a21d7b833830d29b5ea4f55 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* TestCase: add createTemporaryObject(), createTemporaryQmlObject()Mitch Curtis2016-12-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A typical pattern with QML tests is to dynamically create an item and then destroy it at the end of the test function: TestCase { id: testCase name: "MyTest" when: windowShown function test_click() { var item = Qt.createQmlObject("import QtQuick 2.0; Item {}", testCase); verify(item); // Test item... item.destroy(); } } The problem with this pattern is that any failures in the test function will cause the call to item.destroy() to be skipped, leaving the item hanging around in the scene until the test case has finished. This can result in interference with future tests; for example, by blocking input events or producing unrelated debug output that makes it difficult to follow the code's execution. By calling e.g. createTemporaryQmlObject() instead, the object is guaranteed to be destroyed at the end of the test function: TestCase { id: testCase name: "MyTest" when: windowShown function test_click() { var item = createTemporaryObject("import QtQuick 2.0; Item {}", testCase); verify(item); // Test item... // Don't need to worry about destroying "item" here. } } [ChangeLog][TestCase] Added createTemporaryObject() and createTemporaryQmlObject() functions that can be used to ensure that dynamically created objects are destroyed at the end of each test function. Change-Id: I483342052462aa86464c86bf2082892712dceb58 Task-number: QTBUG-56361 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Add classnames for QML import plugins.Morten Johan Sørvig2013-10-141-0/+1
| | | | | | | | | Needed for static builds. qmlimportscanner will read the "plugin" and "classname" entries. Change-Id: I31939451366ad3e771d516ac426525c8bcdba57d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add .qmltypes filesKai Koehne2012-09-121-0/+1
| | | | | | | | | | | | | | | | | | | | .qmltypes files are used by e.g. Qt Creator to provide code completion etc for QML types defined in plugins. The added files where generated with qmlplugindump, e.g. qmlplugindump QtQuick.Particles 2.0 > plugins.qmltypes (ideally make qmltypes would do the same, but it's not working as expected right now). The exception is the QtQuick plugin: Here the file is generated with qmlplugindump -builtins > plugins.qmltypes and contains also the types registered in the qml library itself. Change-Id: I1a6b6641cb5ec3ecffe08e8926d8c1bc082ae6de Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* Implement strict mode for qmldir modulesMatthew Vogt2012-07-311-0/+1
| | | | | | | | | | | | | | | Allow a module's qmldir to contain a module directive, which when present specifies 'strict mode' import processing. In strict mode, type registrations are only permitted into the namespace identified in the qmldir file's module directive. In addition, any type registrations to that namespace originating from other modules are treated as error conditions. Task-number: QTBUG-26551 Change-Id: I081bde2d3b83d3f28524440177fb2cd1ccee34ad Reviewed-by: Chris Adams <christopher.adams@nokia.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Integrate QtQuickTest into QtCharles Yin2011-05-201-0/+3
Change-Id: I558821c0dec9166ea1d0d2e1e2f889553c436316 Task-number:QTBUG-16082