aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest
Commit message (Collapse)AuthorAgeFilesLines
* Split CompiledData::CompilationUnit in twoUlf Hermann2019-05-161-3/+8
| | | | | | | | We need a CompilationUnit that only holds the data needed for compilation and another one that is executable by the runtime. Change-Id: I704d859ba028576a18460f5e3a59f210f64535d3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-181-4/+4
|\ | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlimport.cpp Change-Id: I6add6267297ea50a646d43d212027a168dca8916
| * Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta3Qt Forward Merge Bot2019-04-151-4/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/masm/assembler/LinkBuffer.h src/qmltest/doc/src/qtquicktest-index.qdoc tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp Change-Id: I7d83ad95cf489dda794dd7a0a33bad3ef3b05609
| | * Doc: correct the info about when each Qt Quick Test function is calledMitch Curtis2019-04-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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 <paul.wicking@qt.io>
* | | Remove unused includes of qv8engine_p.hUlf Hermann2019-04-091-1/+0
| | | | | | | | | | | | | | | Change-Id: Ic135a863581d29a3afb9c6c7f070d2630b3913b4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-262-7/+18
|\| | | | | | | | | | | Change-Id: Iaaf9749a812c21c065ded0374ce0aa07de7752cf
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-252-7/+18
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qmltest/quicktest.cpp tests/auto/qml/qmlcachegen/qmlcachegen.pro Change-Id: I70e96e8817d59647f876b8b77b30cdeede8f0662
| | * Doc: improve QUICK_TEST_MAIN_WITH_SETUP function descriptionsMitch Curtis2019-03-211-2/+7
| | | | | | | | | | | | | | | Change-Id: I83c8a3cb8d125df83deaefdbb08b4271eda8a5b4 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * Document since versions for QUICK_TEST_MAIN_WITH_SETUP functionsMitch Curtis2019-03-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | - qmlEngineAvailable() 5.11 c260d3062de83d7f051e531007771455915285e5 - applicationAvailable() 5.12 ef06a6ba7bfb5e38b1bef2e21a764ec74479b158 - cleanupTestCase() 5.12 7bf8d4d3772959f06d4dd0168af7774adde29d76 Change-Id: I7b6b699121248c5ad35a7ee2c99eb3f3c77fd01f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * Don't warn if invokable test setup function doesn't existMitch Curtis2019-03-211-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was never the intention (as the code comments imply), but it was never tested. This is a cherry-pick of 50f234df500829a0023ed5d396c486f995ad71ef because it went to dev (5.13) when it should have originally went to 5.12. Change-Id: I8df0b3702129b1f1d086df73117d3ddb721317cb Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> (cherry picked from commit 50f234df500829a0023ed5d396c486f995ad71ef) Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * QUICK_TEST_MAIN_WITH_SETUP: fix qmlEngineAvailable() being called too lateMitch Curtis2019-03-211-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I added the macro, I wasn't aware that TestCaseCollector was a thing. TestCaseCollector loads each QML file without running the tests (i.e. creates a QQmlComponent from the file without creating an object from that component). Since it still executes imports, the test can fail if types are registered or import paths added in qmlEngineAvailable(), since it's called too late. So, call it earlier. This should have no adverse effect on user code, as nothing of importance to the user will be skipped, and the documentation already details what can be expected by the time qmlEngineAvailable() is called. Change-Id: Ibd3a4b728bc87b90f89cc310fddf668c5879ad83 Fixes: QTBUG-74160 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Support QRegularExpression on the same level as QRegExpUlf Hermann2019-03-201-6/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRegularExpression is the recommended way to do regular expressions nowadays. Support assignment of JavaScript regular expressions to QRegularExpression properties of QObjects and the other way around. QJSValue::toVariant() will create a QRegularExpression from a JavaScript RegExp by default now. [ChangeLog][QtQml][Important Behavior Changes] QRegularExpression is now supported the same way QRegExp is in QML. QJSValue::toVariant() creates a QRegularExpression variant rather than a QRegExp one from a JavaScript regular expression now. Fixes: QTBUG-73429 Change-Id: I301a02771cd17903406c2bc5c7aaeca6cce629f0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-132-1/+5
|\| | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4codegen.cpp src/qml/animations/qsequentialanimationgroupjob.cpp Change-Id: I8b76e509fd7c8599d4cef25181d790ee28edab54
| * Doc: Fix link issuesNico Vertriest2019-02-281-1/+1
| | | | | | | | | | Change-Id: I0e08820a6d25996fe27118f05214ff63d695d24e Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * qtlite: Fix build the source code with -no-feature-shortcutMikhail Svetkin2019-02-271-0/+4
| | | | | | | | | | | | Change-Id: I7b1b3fc60eb40e799c6622ea1d4ad14baa0fe269 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Properly revision new TestResult slotsKai Koehne2019-03-071-2/+2
| | | | | | | | | | | | | | | | | | | | Make sure the slots added in 028617688b0f86ac are only available with import QtTest 1.13 Change-Id: I93aa6ff6595ddc4c4583f1785bd19d489793a5f8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-141-1/+5
|\| | | | | | | Change-Id: I2842f4a8096c4555e29f08e65b88b77b841441cb
| * Defer QML testing until event loop has startedTor Arne Vestbø2019-02-121-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Executing the event loop means we get various things set up properly, such as runloop auto-release pools on macOS. If not, the whole test suite will be run as a result of the setWindowShown call. Change-Id: Ie217d803208134c5be7db0ee04fbfab86702b521 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-101-1/+1
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I6b2539bf17d3e9bc66d96b53c1bce95680113ed8
| * quicktest: winrt: Use qml files from resource system by defaultOliver Wolff2019-01-101-1/+1
| | | | | | | | | | | | | | | | Similar to how it is done for Android, winrt should use qml files from qrc by default. Change-Id: I4cd0def2467f764155302fccc393c355907be744 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Doc: Fix Qt Quick Test documentationMitch Curtis2018-12-147-52/+297
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add qtquicktest-cppapi.qdoc for the C++ API landing page. - Add qtquicktest.qdoc for the QQuickTest namespace. - Add qtquicktest-qmltypes.qdoc for the QML types landing page. - Add ../../imports/testlib to the sourcedirs variable so that the QML files can be found. - Add a "Reference" section to qtquicktest-index.qdoc that has links to the QML and C++ pages. - Add more targets so that we can reliably link to them while keeping the nice short section names. - Fix minor issues in existing documentation. - Link to the QML API docs from the C++ API docs. Change-Id: I5fc3c90105b095d9ea84c3f76e6c7ba0a47c2695 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-121-1/+2
|\| | | | | | | | | | | | | Conflicts: tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp Change-Id: Ic1dace832ad4b29023d24808b8617b5dcc915eb5
| * Doc: fix QUICK_TEST_MAIN_WITH_SETUP function tableMitch Curtis2018-12-101-1/+2
| | | | | | | | | | Change-Id: I2dc0ba8ba99a1447e44c558843a162a40930b7b9 Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
* | TestCase: add isPolishScheduled() and waitForItemPolished()Mitch Curtis2018-12-102-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were introduced to the C++ QQuickTest namespace in 40d6072b and 7a3cad06, respectively. QML-only tests should also have access to them. [ChangeLog][QtQuickTest][TestCase] Added isPolishScheduled() function to allow checking if updatePolish() has been called on an item since the last call to its polish() function. This is useful to verify that a polish has been scheduled. [ChangeLog][QtQuickTest][TestCase] Added waitForItemPolished() for verifying that updatePolish() was called on an item. Change-Id: I3e3a488197e74546358e2d5b0da7a902793c1954 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Don't warn if invokable test setup function doesn't existMitch Curtis2018-12-101-13/+21
| | | | | | | | | | | | | | | | This was never the intention (as the code comments imply), but it was never tested. Change-Id: I8df0b3702129b1f1d086df73117d3ddb721317cb Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Doc: fix \relates command for qIsPolishScheduled()Mitch Curtis2018-12-071-1/+1
| | | | | | | | | | | | Change-Id: Ifa59cae9fd682e9884b40cd0be0da59f5e725ffd Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Compile-fix (g++ 8): move #include of mocs outside namespaceEdward Welbourne2018-11-291-2/+2
| | | | | | | | | | Change-Id: I4f0e59cdcbef249bd86bc46886d8d43c8c03249c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-171-1/+1
|\| | | | | | | Change-Id: Ic5a0c02ab45aac18c218dbeb8cd4b4cd3b609eb6
| * Merge remote-tracking branch 'origin/5.12.0' into 5.12Qt Forward Merge Bot2018-11-161-1/+1
| |\ | | | | | | | | | Change-Id: I7623438dde316ae1e97802f91991f2e7ccc205a5
| | * Move xmllistmodel to xmlpatternsv5.12.0-beta4Frederik Gladhorn2018-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Latest changes moved to xmlpatterns: e08f9393acc6417598f328d7f4b7b082c5d57afa Change-Id: I7e3054a3f0f11833053746294e3b2b958047394d Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-162-0/+12
|\| | | | | | | | | | | Change-Id: I34aa0c2eb178862b40e63b62c6daa056e5e204c6
| * | Qt Quick Test: support tags filter on tests runKirill Burtsev2018-11-152-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Implemented logic for filtering tests with 'case::function:tag' run syntax. Fixes: QTBUG-71645 Change-Id: I9243636b098b4e9ccb4c74d08679bbbb9f3e8a65 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-091-0/+11
|\| | | | | | | | | | | Change-Id: I2ed93c9d5fa8ec9b075112618a2535535591a0e8
| * | QUICK_TEST_MAIN_WITH_SETUP: improve documentationMitch Curtis2018-11-071-0/+11
| |/ | | | | | | | | | | | | | | | | - Explain how the moc include works. - Add missing Q_OBJECT macro to example. Change-Id: I2bacdc45721bb6022f030ff4bc89c95132e35e60 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Doc: explain why QQuickTest::qIsPolishScheduled() is usefulMitch Curtis2018-10-311-0/+18
| | | | | | | | | | Change-Id: I2df4b18b46f9b532e956a64e4be656a338de7a22 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Add QQuickTest::qWaitForItemPolished()Mitch Curtis2018-10-312-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Verifying that an item was polished is quite common in Qt's auto tests: - The Qt Quick auto tests have a util function for it in visualtestutil.h (line 103). - "git grep polishScheduled -- tests/auto | wc -l" says that there are 269 usages of polishScheduled in Qt Quick auto tests, almost all of which look like this: QTRY_COMPARE(QQuickItemPrivate::get(item)->polishScheduled, false); - QQuickTableView's auto tests have their own function: #define WAIT_UNTIL_POLISHED \ QVERIFY(tableViewPrivate->polishScheduled); \ QTRY_VERIFY(!tableViewPrivate->polishScheduled) - More recently, QQuickMenu started requiring it (see menuutil.h). QQuickItem::polish() and QQuickItem::updatePolish() are both public functions, so the notion of polishing in Qt Quick is not new or hidden. This means that any user applications that have custom items that make use of the polish() => updatePolish() system will benefit from having a reliable method of testing their behavior. In addition, anyone wanting to simulate interaction with items in e.g. QQuickMenu will need this API if they don't want to use unreliable qWait() calls. With this in mind, this and the previous patch aim to standardise/ simplify the various private API checks and utility functions, and provide public API for users so that they can benefit from more reliable tests. When used together, the code will look like this: QVERIFY(QQuickTest::qIsPolishScheduled(item)); QVERIFY(QQuickTest::qWaitForItemPolished(item)); [ChangeLog][QtQuickTest][QQuickTest] Added QQuickTest::qWaitForItemPolished() for verifying that updatePolish() was called on an item. Fixes: QTBUG-71224 Change-Id: I8841910212e7f1a431ba845cae8a1ba7b4f4da67 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Add QQuickTest::qIsPolishScheduled()Mitch Curtis2018-10-313-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Verifying that an item was polished is quite common in Qt's auto tests: - The Qt Quick auto tests have a util function for it in visualtestutil.h (line 103). - "git grep polishScheduled -- tests/auto | wc -l" says that there are 269 usages of polishScheduled in Qt Quick auto tests, almost all of which look like this: QTRY_COMPARE(QQuickItemPrivate::get(item)->polishScheduled, false); - QQuickTableView's auto tests have their own function: #define WAIT_UNTIL_POLISHED \ QVERIFY(tableViewPrivate->polishScheduled); \ QTRY_VERIFY(!tableViewPrivate->polishScheduled) - More recently, QQuickMenu started requiring it (see menuutil.h). QQuickItem::polish() and QQuickItem::updatePolish() are both public functions, so the notion of polishing in Qt Quick is not new or hidden. This means that any user applications that have custom items that make use of the polish() => updatePolish() system will benefit from having a reliable method of testing their behavior. In addition, anyone wanting to simulate interaction with items in e.g. QQuickMenu will need this API if they don't want to use unreliable qWait() calls. With this in mind, this and the follow-up patch aim to standardise/ simplify the various private API checks and utility functions, and provide public API for users so that they can benefit from more reliable tests. When used together, the code will look like this: QVERIFY(QQuickTest::qIsPolishScheduled(item)); QVERIFY(QQuickTest::qWaitForItemPolished(item)); The follow up patch adds auto tests. [ChangeLog][QtQuickTest][QQuickTest] Added qIsPolishScheduled() function to allow checking if updatePolish() has been called on an item since the last call to its polish() function. This is useful to verify that a polish has been scheduled. Task-number: QTBUG-71224 Change-Id: I856a40321945c0070e4679e11e4812e0d7adc1f9 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Remove GPU_BLACKLIST infrastructureEdward Welbourne2018-10-122-9/+0
|/ | | | | | | | | | The feature is nowhere actually exercised. This is a partial revert of d05f1d8ead078a0b93e0de63f74e7b3c71105a9d. As discussed at (and following): https://lists.qt-project.org/pipermail/development/2018-August/033352.html Change-Id: I3ca1097d43b7a3d95f0ddb1803149a09714e011a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Clarify that BC does not apply to Qt Quick TestPaul Wicking2018-10-101-0/+5
| | | | | | Task-number: QTBUG-17531 Change-Id: I6ec35005800dd84d9d2a2c36c0ead97c573c9792 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add test cleanup function for C++ partsRainer Keller2018-09-242-0/+8
| | | | | | | | | | | | | | | | | | | | This allows to do cleanup in C++ before other parts being destructed. It QtOpcUa we need to destruct a subprocess. Until now it was done in the destructor of the setup class. When the destructor is called the eventloop already died but the process is still sending output when being terminated. In the windows event handling a nullptr is being dereferenced in this case, see QTBUG-70641. When terminating this process somewhat earlier, when the eventloop is still available, the event dispatcher is able to handle those events without crashing. Another reason to have this function is because there is applicationAvailable() being called to initialize C++ code and there should be an equivalent function for cleaning up. [ChangeLog][QtQml][QtTest] Add cleanupTestCase() to be called before starting destruction Change-Id: I24f7a51ec5276a449892609f5b2cfe7957c27668 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Encapsulate access to CompiledData::Object and CompiledData::ImportSimon Hausmann2018-07-311-2/+2
| | | | | | | | This will make it easier to move the data out of CompiledData::Unit and into a separate data structure. Change-Id: I32e6233a66f2279b44cc06ef7c3505db4a565f98 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QuickTestEvent: keep pressed mouse buttons constant during move eventsShawn Rutledge2018-07-312-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After qtbase b3e91b66b9175c1c3ff5f73f3ac231f74f9bf932 and predecessors, as stated, "Qt platform plugins are now responsible for sending explicit mouse button type and state information; qtestlib should take full responsibility now as well." In QML tests we have not yet had this memory of which buttons are pressed, until now. Change caa45b4fe8b63f4be87b63b33595f65a0f44230e made Flickable sensitive to buttons: it refuses to flick in response to mouse events in which no button is being held. This broke tests in qtquickcontrols2 which assume that in a QML test sequence like mousePress(tumbler, tumbler.width / 2, tumbler.height / 2, Qt.LeftButton) mouseMove(tumbler, tumbler.width / 2, y, 1) mouseRelease(tumbler, tumbler.width / 2, tumbler.height / 4, Qt.LeftButton) the mouse moves will include the pressed left button because it was pressed and not released. So we have to fulfill the assumption to avoid needing to change those tests. When the function bool mouseMove(QObject *item, qreal x, qreal y, int delay, int buttons); is called from QML, if that last parameter is omitted, it defaults to zero, so we can't tell whether the test is explicitly passing Qt.NoButton or just omitted it. Task-number: QTBUG-69704 Change-Id: Ife0f7d0e9cb0d39788e8d9961d8872c9e913431e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Encapsulate the unit data in CompilationUnitSimon Hausmann2018-07-311-2/+2
| | | | | | | | This allows updating the constants table when the unit data is set / changes and removes the tie to the engine. Change-Id: Ice553650390589e30e18421c4e55422a55d0df89 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add test init function for C++ partsRainer Keller2018-06-252-0/+10
| | | | | | | | | | | | 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>
* Exit test executable with failure if specified test functions are not foundKari Oikarinen2018-06-211-3/+14
| | | | | | | | | | | | | | | | | | | | | | If QtQuickTest test executable was given filters that didn't match in any of the qml files run, it exited successfully. In combination with a Coin bug when the test function name contains a space, this allowed failing tests to pass the CI. If the test function fails, the repeat attempts would pass two arguments to the executable. Neither of those hit, but that wasn't considered a problem. Check that all of the test functions named on the command line are actually executed during the whole run and otherwise exit with a non-zero exit code. I assume there's no duplicates in the whole names of test functions scoped with testcase names. Task-number: QTBUG-68197 Change-Id: Icf7fe263945403f02920522dfd187aeb76b7cb3c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kalle Viironen <kalle.viironen@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* qtestoptions_p: Restore compatibility with older QtRobin Burchell2018-05-251-1/+5
| | | | | | | | | | This isn't mandatory to keep forever, but having the ability to run newer qtdeclarative against older qtbase is nice, if there haven't been gigantic changes, e.g. for bisecting's sake or partial upgrades. Change-Id: Ia4de4b0cc5092619e2d9f661bb7f43da690a0fdf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-151-2/+6
|\ | | | | | | | | | | | | Conflicts: src/qml/qml/qqmltypeloader.cpp Change-Id: If9874faf23e813b05ee4cf042133a528d73ba72a
| * Fix TestCaseCollector fails to initialize component from resourcesChristoph Keller2018-05-131-2/+6
| | | | | | | | | | | | Change-Id: I9f1e20653776bbdf1a8a41a631636ec61ddd08b6 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Clean up manual reference of QQmlTypeData and QQmlPropertyCacheSimon Hausmann2018-04-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a few places in the type loader where we do adventurous manual reference counting, where getType() returns a raw pointer that has been addref()'ed and then sometimes somehow we call release() later. Commit 0b394e30bba4f6bb7e6f7dbe5585a2e15aa0f21d is an example of where this can easily go wrong. As a consequence and also in preparation for future work on the type loader, this patch starts replacing the manual reference counting there. Changing the return type from QQmlTypeData *getType() to a QQmlRefPointer<> itself is not sufficient though, as the implicit operator T*() will still allow the caller to store the result as a raw pointer. Therefore this patch removes the "unsafe" implicit extraction operator. As a result of that change, other types that are sometimes stored in QQmlRefPointer are also affected and their usage needs to be adapted to QQmlRefPointer usage or manual raw pointer extraction with .data(). Change-Id: I18fd40634047f13196a237f4e6766cbef3bfbea2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-181-0/+9
|\| | | | | | | Change-Id: I4a9c7802c180757e70fa4dd16df3287104a088bc