aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix unnecessary evaluation of dependent bindingsSimon Hausmann2018-03-083-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Given two simple bindings in this order property int firstVar: secondVar property int secondVar: ... then the binding expression for "secondVar" ends up being evaluated twice at run-time. The first time happens when enabling the binding expression for "firstVar", which results in the engine detecting that there is a dependency onto another binding that has not been enabled yet. This is when QQmlData::flushPendingBinding(Impl) enables the expression for secondVar and does an initial evaluation. Afterwards the QQmlObjectCreator continues enabling the next binding in ::finalize(), which will end up evaluating secondVar a second time, unnecessarily. We can detect this case inside setEnabled and only call update() if we transition from disabled to enabled state. This should also cover the case of bindings created and assigned dynamically through QtQuick PropertyChanges / States, as those call setEnabled(false) before removing the binding (to replace it with something else) and setEnabled(true) when reverting the state (in QQmlPropertyPrivate::setBinding). Change-Id: I447432891eabff2c4393f5abfee1092992746fa0 Task-number: QTBUG-66945 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix group property bindings for aliases that point to id objectsSimon Hausmann2018-03-082-0/+26
| | | | | | | | | | | | | | | | | | When declaring bindings within a group property and that group property itself is a locally declared alias, then by the time we try to determine property caches for the group property we will fail as the aliases haven't been resolved yet. To fix this we can keep track of such group property declarations (encapsulated in the QQmlInstantiatingBindingContext that has all we need) and after we've resolved the aliases (added them to the property caches), we can go back and fill in the entries in the propertyCaches array for the group properties. Task-number: QTBUG-51043 Change-Id: I5613513db3977934bcc51a3df530de47d57326f9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Fix calling Qt.createComponent() from QQmlEngine::evaluate()Simon Hausmann2018-03-081-0/+12
| | | | | | | | | | | | | If we're run from a top-level evaluate() call from the JS engine, then let's assume that any created components are top-level components that belong to the root QML engine context. This is not quite a typical use-case, but our API allows for this and this seems like an easy and sensible solution. Task-number: QTBUG-66792 Change-Id: Ic1c9171c257e8e60c0b2c43f9194bd038744ed2d Reviewed-by: Oleg Yadrov <oleg.yadrov@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Fix regression involving aliases on case-insensitive file systemsMitch Curtis2018-03-082-0/+21
| | | | | | | | | | | | | | When initializing a QQmlProperty with the following syntax: QQmlProperty property(root, "testType.objectName", QQmlEngine::contextForObject(root)); only try to look up types (for each token after splitting on the '.') if the token starts with an uppercase letter, as 1e350a8c now enforces that type names begin with an uppercase letter. Task-number: QTBUG-66715 Change-Id: Iab64be1deb971dca256fc65d358c773837222a57 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* tests: refactor and un-blacklist tst_QQuickMouseArea::pressedMultipleButtonsGatis Paeglis2018-03-082-85/+72
| | | | | | | | | | | | | | | | | It seems that qtestlib has never really supported mouse state handling for multiple buttons (see QTBUG-64030). And the current implementation of this test relied on QGuiApplication to generate mouse releases when necessary. Since a37785ec7638e7485112b87dd7e767881fecc114, qtestlib does not rely on QGuiApplication to deduce mouse button state, but requires explicit mouse press/release events via QTest::mouse* APIs, thus causing this auto test to fail. Refactor the auto test to use QTest::mouse* APIs. This change depends on a fix for QTBUG-64030. Task-number: QTBUG-63786 Change-Id: Id24526714ec9716a0126e8288e5e8974074ebc9e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* stabilize tst_QQuickFramebufferObject::testInvalidateShawn Rutledge2018-03-022-4/+1
| | | | | | Task-number: QTBUG-64470 Change-Id: I78b789caa653883f2776d6c2d8dd303c1a756de3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* stabilize tst_TouchMouse::touchButtonOnFlickableShawn Rutledge2018-03-021-1/+1
| | | | | | | | | | | | FAIL! : tst_TouchMouse::touchButtonOnFlickable() Compared values are not the same Actual (eventItem2->touchUngrabCount): 0 Expected (1) : 1 tst_touchmouse.cpp(673) : failure location Task-number: QTBUG-66278 Change-Id: I20ed910091b7c894aeaf6639d738105022730940 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Add testcase for how align-to-pixel affects size hint normalizationJan Arve Sæther2018-03-021-0/+17
| | | | | Change-Id: I404b06daa5202f6cca887dc63dc4c86d432dd1e5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Manual test: combinations of DragHandler and TapHandler on FlickableJan Arve Saether2018-03-029-4/+628
| | | | | | | | | | | | | | | We already had a manual test using a slider, but that has only one combination of DragHandler and TapHandler. This test aims to test all possible combinations of DragHandler and TapHandler together (as siblings, in different parts of the hierarcy, with a Flickable beneath...) We also show the current grabbers as an overlay over this entire collection of manual tests. Change-Id: Ic634d36d14f7456170f43b077fa72b03fb65bc18 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Fix flaky test - wait for the LayoutRequest to arriveJan Arve Sæther2018-03-011-0/+1
| | | | | Change-Id: I5fb8419bc86f0355ca19957456d2a3ebba3c9ef3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix: Do not read texture files when backend is not openglEirik Aavitsland2018-03-014-23/+25
| | | | | | | | | | | | The software backend would assert for the compressed GL texture files. Autotests updated for this functionality. Moved tests of the optional texture-file support out of qmltest (where it did not belong) and into tst_qquickimage, side by side with the tests of the optional svg format. Change-Id: I98c407093ccebeb70ba5a93ff0882dbd0b8060d5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move test for ignoreMessage to the topJan Arve Sæther2018-02-281-62/+60
| | | | | | | This should make it more robust to changes in line numbers Change-Id: I8394fce060e05226d02af0dad5f7d8d9552bc63b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* rename containsMask to containmentMaskShawn Rutledge2018-02-271-1/+1
| | | | | | | | | It was pointed out that containsMask sounds like it ought to be a boolean property. Change-Id: I2b56823b60d64f9903b0d5108c6428e691c09ed0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* AnimatedSprite: set implicit size based on implicit frame sizeMitch Curtis2018-02-261-0/+39
| | | | | | | | | | | | | | By doing so, users no longer need to set an implicit or explicit size for AnimatedSprite. [ChangeLog][QtQuick][AnimatedSprite] AnimatedSprite's implicitWidth and implicitHeight are now based on frameWidth and frameHeight, respectively. This means it is no longer necessary to explicitly size AnimatedSprite. Task-number: QTBUG-36341 Change-Id: I3eb87e9b1c6bb93b3c667123c345341f34e2eee8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* tst_qquickanimatedsprite: use QScopedPointerMitch Curtis2018-02-261-17/+10
| | | | | Change-Id: Ib0e0cccef197fb8c5fa163c7a57f096e8fcb8c25 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix QQmlEngine::retranslate() with PropertyChangesSimon Hausmann2018-02-263-3/+19
| | | | | | | | | When changing the language, we need to re-apply the state of items and re-run the translations if present. Task-number: QTBUG-66541 Change-Id: I83a542af033990ef9a0f92801c5f52d3a5ec722c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* init variables where they are declared when possible (clang-tidy)Shawn Rutledge2018-02-2623-140/+94
| | | | | | | | clang-tidy -p compile_commands.json $file -checks='-*,modernize-use-default-member-init,readability-redundant-member-init' -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' -header-filter='qtdeclarative' -fix Change-Id: I705f3235ff129ba68b0d8dad54a083e29fcead5f Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-26129-3281/+3281
| | | | | | | | | | | | | 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>
* tests: Wrap qWaitForWindow{Active,Exposed} in QVERIFYv5.11.0-beta1Kari Oikarinen2018-02-2318-164/+164
| | | | | | | | | | | The functions are marked Q_REQUIRED_RESULT, so they give compilation warnings when not handling the bool return value. Failing the test early at an unexpected event is also better behavior anyway. Task-number: QTBUG-66559 Change-Id: I6c4db29379ec01528208c3e4ee54346b4230616c Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Blacklist a flaky event propagation test on ubuntuVille Voutilainen2018-02-231-0/+3
| | | | | | | | | | | See also QTBUG-53916 Grafana: https://testresults.qt.io/grafana/dashboard/db/coin-single-test-details?orgId=1&var-project=qt%2Fqtdeclarative&var-testcase=tests%2Fauto%2Fquick%2Fqquickwindow&var-testfunction=touchEvent_propagation&var-branch=5.10&var-branch=5.11&var-branch=5.9&var-branch=dev&var-inter=24h Task-number: QTBUG-66216 Change-Id: If59784e789a30ce92d2fab486c86ee56e07ada0c Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix tst_qquickwindow::unloadSubWindowKari Oikarinen2018-02-231-2/+4
| | | | | | | | | | | The transient window was never shown. The window was never visible, but the test passed anyway because the return value of qWaitForWindowExposed() was not checked. Change-Id: If1c9212d0f0bd2047bfa2ca24159f27f6186d191 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Make sure we can call properties of constantsErik Verbruggen2018-02-231-1/+12
| | | | | | | | | This might not be the most useful thing to have, but it's part of JS, so we better handle it. Task-number: QTBUG-66027 Change-Id: Ib40c90515a3ffd1d065d962d6c79a5e3960e2703 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Disallow the use of id properties with value type group propertiesSimon Hausmann2018-02-223-0/+9
| | | | | | | | | | | While it is valid to assign an id to group properties that are QObjects, it is not possible to support this with group properties that are value types, as we do not have QObject instances and id references are limited to those. Change-Id: I7601d0fe00d1261dd711e34f45550db797773f9a Task-number: QTBUG-51525 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Fix ListModel.get(idx) == ListModel.get(idx)Simon Hausmann2018-02-221-0/+1
| | | | | | | | | | | | | | | | | This is a regression introduced with commit 4876ea6a18ccdfd72014582aa5d50ab9f6b6ec9e. Where we previously always returned the same JS object, we would afterwards return a new JS object for every invocation, which breaks reference comparison. As we store the JS wrapper for the list element in the QQmlData->jsWrapper we can avoid repeated allocations. In order for that wrapper to keep working after modifications (insertion, etc.) to the list model, we have to replace the static element index with a reference to the node model meta-object, which also has an element index that however is kept up-to-date by the list model itself. Change-Id: I4368de6b6d86687fe96fbf73bd60b80b69d7b058 Task-number: QTBUG-52017 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Allow setting values in value type group properties in "on" assignmentsSimon Hausmann2018-02-222-0/+28
| | | | | | | | | | | | | Assigning to a group property inside a property value source or interceptor as part of an "on assignment" is perfectly valid. That is because while "color" is a value type property, the on assignment means we're actually setting easing.type (in the example and test) on the property value source, not the color, and that one is a QObject. The same goes for interceptors. Change-Id: I505a658977a578894d6dfb00bf5c65b41e42b12f Task-number: QTBUG-56600 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Fix flakiness of tst_QQuickGridView::currentIndexKari Oikarinen2018-02-221-1/+2
| | | | | | | | | | | Highlight item is moved with an animation, so the test may need to wait for the animation to finish until the y coordinates of the current item and the highlight item match. Task-number: QTBUG-66549 Change-Id: Id8e329c4a6647ee946da702b489c6f7ea0b7260f Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Fix draghandler to respect axis constraintsJan Arve Sæther2018-02-211-0/+86
| | | | | | | | | | | | | | | | | | | | | | | ..while its (ancestor) coordinate system has changed during the drag. For example, ensure that a DragHandler-based Slider keeps its knob centered. If the Slider is used on a Flickable which you are flicking with a second finger, then the coordinate system is changing underneath the Slider. The problem was that DragHandler stored the initial drag position of the target when the target item was pressed, and used that throughout the whole drag operation. Unfortunately if the target item was inside a Flickable that got flicked during a drag operation, that initial position was not updated (and thus, incorrect). Instead of storing the initial target position in scene coordinates, we now store the position that got pressed in local target coordinates, and ensure that in any further updates the touchpoint have the same local position (by moving the target). Task-number: QTBUG-64852 Change-Id: I25012d34d88f45c7eb9c711db0037d530cf10854 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Image: respect aspect ratio of an SVG when width or height is zeroAndy Shaw2018-02-211-0/+5
| | | | | | | | This amends f42f1366dcd4b070c69c9e7fe42a704ef23da14d Task-number: QTBUG-65789 Change-Id: I1db05259f0aeb3310bbaf5ea03be52cbd243d115 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* test_defaultPropertyAliasCrash(): fix anchor warningsMitch Curtis2018-02-201-1/+0
| | | | | | | | The item was trying to center itself within a layout for some reason. Change-Id: I7a4bdf0fdce91cd1dad6ec9c5ae27a5fbe07408f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Layout: improve warning message when anchors are detectedMitch Curtis2018-02-201-1/+2
| | | | | | | | | | - Use the more explicit term "manage" to make it clear that the warning only applies to items that are direct children of a layout type. - Instruct users towards the proper way to position items within a layout: Layout.alignment. Change-Id: Id13af95457a689e41aeaead1f9a0f958f095fca9 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Correctly set this object when calling scope/context functionsErik Verbruggen2018-02-202-0/+25
| | | | | | | | | | | | | When a function is called that is in a QML scope or a QML context, set the 'this' object to the QML scope. This is done by introducing two new interpreter instructions, which get the context passed in. Note: this patch is 5.11 specific. 5.9 had a similair issue, but the implementation is quite different, so that was fixed separately. Task-number: QTBUG-66432 Change-Id: Ie43150cdd26360025895df28d31264985abf1c15 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Only warn about actual *anchors* in layout childrenJan Arve Sæther2018-02-191-0/+61
| | | | | | | | | | | Do not warn if they don't actually pose a problem, such as having just anchors.margins: 42 in a layout child item (as demonstrated by the test) Change-Id: I01e4515e91d7d0df3ae6bf9061cebe5c51802998 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Add test for detecting invalid mouse button cancel eventSami Nurmenniemi2018-02-193-0/+116
| | | | | | | | | Commit e0c30279ec1fad88346ed3fb483bc3c672fdd01b has already fixed the issue tested by this change. Task-number: QTBUG-60123 Change-Id: I0e378a7b1586f4e6c43246fca9d12719f62b3275 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-184-1/+44
|\ | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp Change-Id: I7feb9772fc35066f56b7c073482b53ca8c86c70b
| * Fix memory leak with JS importsSimon Hausmann2018-02-093-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Strictly speaking this is a regression introduced with commit e22b624d9ab1f36021adb9cdbfa9b37054282bb8, making the QQmlContextData objects reference counted, especially from the V4 QML context wrapper objects. That change (correct as it is) introduced an accidental circular dependency in the simple scenario of importing a .js file in a .qml file: Each time the type in the .qml file is instantiated, we create a dedicated QQmlContextData for the .js file. If the .js file has no imports itself, that new context will get the same ctx->importedScripts JS array as the QML context of the .qml file. That is a strong reference via QV4::PersistentValue. That array in turn contains the QV4::QmlContextWrapper that belongs to the imported script, which in turn holds a strong reference (via refcount) to the script's context. This patch breaks the circular reference when we perform context invalidation, as the least intrusive measure. For the auto-test to work, we must also clear the qmlContext persistent of the QV4::Script that's used to evaluate the .js file. In subsequent imports that persistent will be initialized to new values, so it will only hold a strong reference to the last import, but strictly speaking that is still a leak - hence also part of this fix. Change-Id: I3e543c946e5e683425072dc3df7e49ca0e0c0215 Task-number: QTBUG-66189 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * tst_qquickflickable: fix compiler warningMitch Curtis2018-02-081-1/+1
| | | | | | | | | | | | | | | | | | tst_qquickflickable.cpp:822:47: warning: ignoring return value of ‘bool QTest::qWaitForWindowActive(QWindow*, int)’, declared with attribute warn_unused_result [-Wunused-result] Change-Id: I39be58a1032e36f650ce2e008026faaf368cca3f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Fix "Expression depends on non-NOTIFYable properties" regressionMitch Curtis2018-02-172-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONSTANT properties are by nature non-NOTIFYable. The issue behind the regression is caused by the fact that we were capturing a property regardless of whether or not it was const. There were two states that captureRequired was expressing: true: We're reading the property of a QObject, and we're not quite sure where the QObject comes from or what it is. So, when reading that property at run-time, make sure that we capture where we read that property so that if it changes we can re-evaluate the entire expression. false: We're reading the property of a QObject, and we know that it's the scope object or context object, which we know very well. Instead of registering a property capture every time, we can do that ahead of time and then register all those captures in one shot in registerQmlDependencies(). There is a third state that is only relevant when captureRequired is false: We're reading a property from the scope or context object, but it's a CONSTANT property, so we don't need to register a dependency at all. This patch adds replaces captureRequired with the PropertyCapturePolicy enum, which accounts for the third state and, as a bonus, makes the code easier to understand. Task-number: QTBUG-66361 Change-Id: I6cef1deb76538fbdacf1324b4467403dd40dd7de Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.10.1' into 5.11" into ↵Qt Forward Merge Bot2018-02-1528-21/+1375
|\ \ | | | | | | | | | refs/staging/5.11
| * \ Merge remote-tracking branch 'origin/5.10.1' into 5.11Qt Forward Merge Bot2018-02-151-0/+14
| |\ \ | | | | | | | | | | | | Change-Id: I64bf7d183bbd8af7282270097809d14a54ba0188
| | * | Make sure passive grabbers are cleared on releaseJan Arve Saether2018-02-021-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This got regressed by change e6d4df156e9aec62054740dc99ab8ba2855eaafc. Before that change, we always cleared both the exclusive and passive grabbers. Task-number: QTBUG-66152 Change-Id: I93d2568bd2a23ddd55a5294d544f978a50a5543e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | Merge "Merge remote-tracking branch 'origin/5.10' into 5.11" into ↵Simon Hausmann2018-02-1527-21/+1361
| |\ \ \ | | | | | | | | | | | | | | | refs/staging/5.11
| | * \ \ Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-1227-21/+1361
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/shapes/qquickshape.cpp src/imports/shapes/qquickshape_p_p.h src/qml/compiler/qqmlpropertycachecreator_p.h src/qml/jsruntime/qv4value_p.h src/quick/items/qquickloader_p.h tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp tools/qmlprofiler/qmlprofilerapplication.cpp Change-Id: Iafc66ae84bf78630ed72a986acb678e9d19e3a69
| | | * \ \ Merge remote-tracking branch 'origin/5.9' into 5.105.10Liang Qi2018-02-073-6/+23
| | | |\ \ \ | | | | | |/ | | | | |/| | | | | | | Change-Id: I3b250545e334f50dcef1a75acdef51820d34079a
| | | | * | touchEvent_propagation: remove some QWaitsShawn Rutledge2018-02-051-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I doubt it will make the test any less flaky, but may be an improvement. Task-number: QTBUG-53916 Change-Id: I3901ab26107abfd1420947392232243ad8c40ead Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | | | * | QML: Collapse all NaNs into one single (encoded) NaNErik Verbruggen2018-02-052-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea of NaN boxing is to use one single NaN as a "true" NaN, and all others as a boxed value. So when encoding some NaN, be sure to use that one "true" NaN. Otherwise, it will be interpreted as an encoded value. Task-number: QTBUG-65998 Change-Id: Ia6e4641be180f3d626c40a57b473f181358e04db Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | * | | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-02-052-1/+223
| | | |\| | | | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp Change-Id: I64f7c1d776fab3cad4530f291b93afd2a8fb8533
| | | | * Add QQuickWindow synthMouseFromTouch testShawn Rutledge2018-02-031-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the one for QQuickWidget, it tests the effect of AA_SynthesizeMouseForUnhandledTouchEvents and verifies the source() of the synthesized mouse event. Change-Id: Ib706b5cc7b9a374850f3197ca6ce2c3aed4d1ba2 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | | | * add tst_qquickwidget::synthMouseFromTouch testShawn Rutledge2018-02-031-2/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure events are delivered as expected and that synth-mouse events have the right source(). Task-number: QTBUG-64241 Change-Id: I95a073ce0faea2111c8e1aca42fa44c1b529a6ec Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-02-0210-2/+302
| | | |\| | | | | | | | | | | | | | | | Change-Id: I41ca9120a470a905c2f5c168c1de4cf970fa0fff
| | | | * If Loader loads Window, set its transient parent to the Loader's windowShawn Rutledge2018-02-023-0/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>