aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickloader/data
Commit message (Collapse)AuthorAgeFilesLines
* Loader: Actually clear initial properties when changing sourceFabian Kosmale2019-10-242-0/+24
| | | | | | Fixes: QTBUG-79435 Change-Id: Ic99a3b1a9d64426a64117b90a3e11fe99af0d260 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* When deactivating a loader, do not immediately clear its contextErik Verbruggen2018-03-161-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 2eb2d6386da304cd1164264ae0bff685c796d89c, deactivating/clearing the loader would now prevent any subsequent bindings from being evaluated. The problem there was that the item created by the loader wouldn't have a parent item (among things) anymore, so references to it in the bindings would result in errors. The way to prevent it was done by invalidating the context of the item, which in turn would detach it from the root context. This is a problem if objects in the root context are referenced after deactivating/clearing the loader: onSomethingChanged: { loader.source = "" objectInRootContext.doIt() } This would result in a ReferenceError when resolving objectInRootContext and break the behavior present before the fix mentioned above. The correct way is to recursively clear the context set on all bindings, but leave everything in place. This way, no subsequent bindings will be evaluated, but the currently "running" scripts will still be able to reach the root context. Task-number: QTBUG-66822 Change-Id: Ic9c2ab0a752093a26967da4783cb4c29cf83d2ca Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-02-022-0/+49
|\ | | | | | | Change-Id: I41ca9120a470a905c2f5c168c1de4cf970fa0fff
| * If Loader loads Window, set its transient parent to the Loader's windowShawn Rutledge2018-02-022-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the Item { Loader { sourceComponent: Window { } } } case consistent with the Item { Window { } } case: the inner Window is transient for the outer Window. It works even if the Loader's Window has a visible: true declaration: in that case, until now, the Loader's Window would become visible at component creation time, before the outer Item became visible. So the test to check whether it had a transient parent did not work. We now change the delayed-visibility mechanism in QQuickWindowQmlImpl to wait for the parent Item to acquire a window of its own rather than waiting for the transient-parent-if-any to become visible. It should still take care of all the old cases too, e.g. in the Window { Window { } } case, the inner Window's QObject parent is actually the QQuickRootItem. (Amends 701255c76f671f100338a799f0194bf10e26c9d1) [ChangeLog][QtQuick][QQuickWindow] When a Window is declared inside another Item or Window, the window will not be created until the parent window is created. This allows it to have the correct transientParent and be managed as a transient window. Task-number: QTBUG-52944 Change-Id: Iaf4aafbd696f6e8dd0eec1d02db8bd181483bd07 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Prevent errors when unloading LoaderMichael Brasser2018-01-052-0/+118
|/ | | | | | | | | | | Invalidate the context of the object so that destruction is signaled and bindings no longer run. Task-number: QTBUG-47321 Task-number: QTBUG-51995 Task-number: QTBUG-60344 Change-Id: I194a2fefe4e769a58c9ce022d39fe76cbe230de7 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Fix import with qualifier of remote directory with qmldirArnaud Vrac2016-08-101-1/+0
| | | | | | | | | | Do not skip qmldir loading when using an import qualifier and the resolved uri is remote. This makes the import behavior the same in all cases. Task-number: QTBUG-55002 Change-Id: I99d68be02ddd062e387d36946e730df076e80a8d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Prospective fix for flakey "network" related QML testsv5.4.2Simon Hausmann2015-04-251-1/+2
| | | | | | | Replace hard-coded server ports with dynamically allocated ports. Change-Id: Iab8f9a88343a9f2c49af3cd700c954c13c3bf121 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Fix crash in QQuickLoader when source component is garbage collectedSimon Hausmann2013-12-062-0/+10
| | | | | | | | | | It may happen that the QQuickLoader is the last entity left in the system holding a reference to the QQmlComponent *sourceComponent. We have to let the garbage collector know about that by keeping a persistent value for it. Task-number: QTBUG-35334 Change-Id: I715864440378fd9dd4f2d5ef8ff2f171c81ed7ef Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QQuickLoader: fix the recursion guard for size updatesJ-P Nurmi2013-03-171-0/+12
| | | | | | | | Task-number: QTBUG-30183 Change-Id: Ic8720e1e35bf2f349d74d2021dd202849da67852 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Improve timer dependent tests.Frederik Gladhorn2013-03-111-5011/+2
| | | | | | | | | | | | | | | | | | tst_QQuickLoader::loadedSignal depended on sharing the engine with simultaneousSyncAsync and that function being run before it. After each test run call clearComponentCache() as that is important for caching of the network tests. The test server would send the item after 500ms. Sometimes the CI would be faster or slower. Instead of relying on timing, simply call a function when the reply should be sent. Change-Id: Ifb0447041197e1cba103570597a62a2510d31aab Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Use unique port numbers for http servers in auto tests.Andrew den Exter2012-07-051-1/+1
| | | | | | | Prevents conflicts when tests are run in parallel. Change-Id: Ic1652d963da291c7c41b31e2621874824fa575cb Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* Decode directory separators in source URLsMatthew Vogt2012-06-251-0/+5
| | | | | | | | | URLs with encoded directory-separator characters are not correctly processed by QUrl. Task-number: QTBUG-25981 Change-Id: I78173ef44c4850774b56753335bea34db04c0735 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-114-0/+92
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qqmlprofilerservice_p.h src/qml/qml/qqmlboundsignal.cpp src/qml/qml/v4/qv4bindings.cpp src/quick/items/qquickshadereffect.cpp src/quick/particles/qquickcustomparticle.cpp src/quick/qtquick2.cpp Change-Id: Ia9c6517035ae912fa75e77473a452bd3383def56
| * Fix erroneous signal emission in LoaderChris Adams2012-04-053-0/+87
| | | | | | | | | | | | | | | | | | | | | | Previously, the incubator wasn't cleared when a Loader was deactivated. This commit clears it on deactivate, and also ensures that the loadedSignal isn't emitted on error. Finally, it re-enables a network-loading-related unit test. Change-Id: I5dac92aead2c221c5d45011accf59077f7c9b402 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Size loaded item before bindings are evaluatedMartin Jones2012-03-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | If the Loader size is set explicitly we can set the item size before the bindings are run, and avoiding an additional anchor layout. Also ensure item implict size changes are propagated/notified in the Loader. Change-Id: Ie22b018b22be8457ccf30b907a26e44260b9cef7 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* | Merge master into api_changesKent Hansen2012-03-193-0/+703
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qqmlenginedebugservice.cpp src/qml/qml/v8/qv8qobjectwrapper.cpp src/quick/util/qquickimageprovider.cpp tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp Change-Id: Ie78ba2fabd32f4812bcae9dbdd66ed289dc11dcb
| * Allow threaded compilation in an async LoaderMartin Jones2012-03-153-0/+703
| | | | | | | | | | | | | | Enables threaded compilation for a Loader "source". Change-Id: I2d60a3ace07aab58f3b8f069e45a2864178c959f Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* | Improve support for var propertiesChris Adams2012-03-051-1/+1
|/ | | | | | | | | | | | | | | | | | | | | This commit changes the semantics of function assignment in QML. Previously, function assignment was interpreted as binding assignment. Now, function assignment is interpreted as function assignment, and therefore fails for all property types other than "var" properties. To support imperative binding assignment, a new function was added to the Qt object: Qt.binding(function) which takes a single function parameter and returns a function object which will be interpreted as an assignable binding expression by the QML engine. Finally, this commit also slightly changes the semantics of var properties in that the "special" JavaScript values of null and undefined may be assigned to var properties, rather than being interpreted as reset requests. Task-number: QTBUG-21842 Change-Id: Iee99a878b9badf0fb76e983da7ebfa493f55ceb5 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-2453-0/+5745
Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>