aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Don't set childMode on a StateMachineUlf Hermann2019-05-271-14/+18
| | | | | | | | | | | This leads to invalid state machines and is rejected since cfdbfcebbda5f26b89c70df6b191b17ef242e9d7 in qtbase. Rather, add a separate state in between to set the ParallelStates mode. Change-Id: Ia08b286da4c60a26d3043179250f81fb4328864f Fixes: QTBUG-75976 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-05-261-0/+4
|\ | | | | | | Change-Id: I73d323b65c628166ac2d422f7e8af2062200d53c
| * Blacklist tst_QQuickListView::currentIndex() on macOS 10.12Ulf Hermann2019-05-221-0/+4
| | | | | | | | | | | | Task-number: QTBUG-75960 Change-Id: I3321bf54a11c1daf8d4e1818c5b860359c34fdec Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Manual test, TableView: improve test with syncView functionalityRichard Moe Gustavsen2019-05-232-26/+132
| | | | | | | | | | | | | | | | Add some more TableViews and buttons that can be used to test the new syncView functionality. Change-Id: I0ad649598ef2ff08487c9a0b450861c27535c62c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Move valueAsNumber into ExecutableCompilationUnitUlf Hermann2019-05-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | This reduces our dependence on QV4::Value in the devtools. Change-Id: I4b3f937bc08c16f7e2543fdc5cc34c0cfb121f8f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QQuickTableView: don't recalculate content width while flickingRichard Moe Gustavsen2019-05-151-72/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are now three mechanisms in TableView that works together to ensure that the table ends up edge-to-edge with the content view. They are applied in the following order: 1. Adjust the content size, based on the predicted size of the table. 2. Adjust the origin and endExtend on the fly, if the content size is wrong. 3. Move the table directly to where it should be, in case we don't have time to wait for the origin to change. We could have, strictly speaking, setteled with just one of them, but choose to use them all at the same time for best flicking experience. Still, 1. and 2. sometimes step on each others feet when they both detect that something is a bit off, and adjust. So rather than adjusting the size of the content view every time we load a new row or column, we just keep the first prediction. And then we leave all later ajustments to 2. and 3. This turns out to be a more stable, and will avoid some glitches that occur when flicking using a scrollbar, if several mechanisms kick in at the same time. Change-Id: Ib551a0bf8f6ee59ac9b3556b9462c91adb9cc80b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Restore value bindings when disabling a Binding elementErik Verbruggen2019-05-174-0/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We previously only restored script bindings that were replaced by a Binding. Now we handle both. [ChangeLog] QML Binding elements now support restoring previous values of the bound property when the binding is disabled. This will be the default behavior in Qt 5.15. Reliance on the old behavior of only restoring binding, not literal values results in a warning now. Fixes: QTBUG-33444 Change-Id: I833403b0645c08eee486fbd4acf5d3c7de2ef73a Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | Add snapMode to DragHandlerJan Arve Sæther2019-05-163-0/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes snap behavior slightly. Basically, it does not snap anymore if the target() item is an ancestor of the parentItem(). In addition, we add a property that enables users to change the behavior. (SnapIfPressedOutsideTarget has the old behavior) [ChangeLog][QtQuick][Event Handlers] Added DragHandler.snapMode which can be used to configure under which conditions the dragged item is snapped to be below the cursor. The default mode is SnapAuto. The old behavior can be obtained through the SnapIfPressedOutsideTarget mode. Fixes: QTBUG-75661 Change-Id: Ibc00e8fbe31b779f8e817af1505e76425467d27a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Split CompiledData::CompilationUnit in twoUlf Hermann2019-05-166-28/+40
| | | | | | | | | | | | | | | | 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-05-167-1/+180
|\| | | | | | | Change-Id: I192cb06f3b92869699cb3e072f2c6c1e8dbb1ef4
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-167-1/+180
| |\ | | | | | | | | | Change-Id: Ia93dc734ce25b3134b0f905f473a0c30777ceaf1
| | * Do not synthesize a double click event if the event point moved too farJan Arve Sæther2019-05-151-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | We need to respect QPlatformTheme::TouchDoubleTapDistance Fixes: QTBUG-75770 Change-Id: I2adc7097bb29cb93beb2609a8a806a666856a0c8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * TextEdit: use I-beam cursor by default, pointing cursor for linksShawn Rutledge2019-05-152-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | But do not interfere with any custom cursor that user code sets: remember and restore it when the mouse is no longer hovering a link. Task-number: QTBUG-14769 Fixes: QTBUG-50482 Change-Id: Ia4633c22d0ad42d07203d4dc3e330b90a5f94a7c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Add test for cached getter lookupMichal Klocek2019-05-092-0/+31
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-75335 Change-Id: I14480018f2429eb5ec744a50640642eee09ce3f3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * Don't overwrite states if role is assigned after a stateJan Arve Sæther2019-05-092-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | We therefore need to keep track of which states have been explicitly set or not in order to know which ones should get initialized with their defaults. Change-Id: I49fdae82288f04ea4f50d45735a93434ac02abec Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | QQuickTableView: change implementation of enforceTableAtOrigin()Richard Moe Gustavsen2019-05-111-0/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We set the size of the content view to be the size of the complete table. The problem is that the exact size will always be just a prediction, since we would otherwise need to iterate over all rows and column up front, to be able calculate the exact size. This is not acceptable when using non-trival table models. A side effect of this, is that is will be possible to flick the viewport further out than the actual end of the table, if the content view turns out to be larger than the table itself. From before we used to just move the whole table back into the viewport when that happened, which could be seen as a sudden jump of the table to a new position. This change will improve this logic so that we can avoid most visual jumps. Instead of moving the table around, QQuickFlickable supports moving the origin instead. So when we see that the table is not in sync with the content view, we simple move the origin to the edge of the table. The effect is that any flicking or ongoing momentum animation in QQuickFlickable will continue as if nothing happened. This is also the same logic used by QQuickListView. Change-Id: I6060b7e84b9489c8fa569e6ff41b958e3871f8e7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | QQuickTableView: sync viewport rect with syncView when rebuildingRichard Moe Gustavsen2019-05-091-3/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | When moving contentX/Y, we also need to ensure that the viewport rect reflects the change. Otherwise we'll end up loading rows and columns somewhere else then under the viewport. Change-Id: Ifbd3d66b9b3a822414aefde9b5bd088274dfa2ad Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-05-092-3/+61
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmlirbuilder.cpp Change-Id: I2cfda470515e2df778ad3c89105c07344af07c6d
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-082-3/+61
| |\| | | | | | | | | | Change-Id: I3eb5d1affe64b6ae709d1154cc37de91db3816b6
| | * Accessibility: Make sure StaticText is marked read-onlyFrederik Gladhorn2019-05-072-3/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test more of the text properties. This is still very incomplete, but a small step forward. Also make sure that editable text reports the editable state. Fixes: QTBUG-75002 Change-Id: I9e43c980d8fa91671acb4e40e5d9162854884ee7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Register QObject along with QQmlComponent as basic type of the languageUlf Hermann2019-05-083-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently we need it somewhere. Before the restructuring of imports all QtQml types were automatically registered on QQmlEnginePrivate::init(). We don't do this anymore, so we need to register the basic building blocks of the language separately now. Fixes: QTBUG-75645 Change-Id: I77fe23f709304586cd16986650b0056ea87bcd45 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Move workerscript to its own moduleUlf Hermann2019-05-061-1/+1
| | | | | | | | | | | | | | | Change-Id: I778cfe842ddf1c600a837d8f2061a338887eed95 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Autotest: add syncView tests for QQuickTableViewRichard Moe Gustavsen2019-05-032-7/+372
| | | | | | | | | | | | | | | Change-Id: I0c311a4cc7d0765e234739c005cb68a60cfee129 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Move model types into their own libraryUlf Hermann2019-05-0226-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The model types are not part of the core QML runtime and should only be loaded if you explicitly import them. We cannot enforce that in Qt5 as some of them are available from the QtQml import, but we can change it in Qt6. Change-Id: I1e49e84d748e352537ec2d4af901c034c91d038f Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-05-022-0/+38
|\| | | | | | | | | | | Change-Id: I5d2c3da38df35922b2147c3c0bc55c6c3bae2fe5
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-012-0/+38
| |\| | | | | | | | | | Change-Id: Ic008bf9223a9ac293c925044355ff218f7ed7f78
| | * Yarr: Reject quantifiers larger than 16MUlf Hermann2019-04-301-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Nobody needs those and we run into integer overflows later on if we accept them. Fixes: QTBUG-74048 Change-Id: Ib8ccd05e4bd6f662c38fbe95bf1350f81982e1b8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * Skip block context within call contexts when searching for parametersUlf Hermann2019-04-291-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only the call context contains the signal parameters. However, there can be any number of nested block contexts in a function. This manifests itself when the function needs an execution context. The simplest way to trigger this is attaching a debugger. Fixes: QTBUG-75393 Change-Id: Iabdc06a9fe7bf88204525d6940b626575fee1579 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Make JavaScript execution interruptibleUlf Hermann2019-04-301-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an atomic isInterrupted flag to BaseEngine and check that in addition to the hasException flag on checkException(). Add some more exception checks to cover all possible infinite loops. Also, remove the writeBarrierActive member from QV4::EngineBase. It isn't used. Fixes: QTBUG-49080 Change-Id: I86b3114e3e61aff3e5eb9b020749a908ed801c2b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Remove tracing JIT infrastructureUlf Hermann2019-04-293-334/+0
| | | | | | | | | | | | | | | | | | | | | | | | The tracing JIT won't be finished. Therefore, remove the parts that have already been integrated. Change-Id: If72036be904bd7fc17ba9bcba0a317f8ed6cb30d Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
* | | Merge "Merge remote-tracking branch 'origin/5.13' into dev" into ↵Ulf Hermann2019-04-296-3/+46
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-296-3/+46
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4compilercontext.cpp src/qml/qml/qqmlmetatype.cpp Change-Id: I02e0216961b92ff68a3f91a70edc33fe9e8db147
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-274-0/+36
| | |\| | | | | | | | | | | | | Change-Id: I552629813ea8100d04ea19e51fe7198931082e19
| | | * Allow creation of variants from non-singleton QQmlTypeWrappersUlf Hermann2019-04-262-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I don't see any reason why this should be prohibited. Change-Id: I4a54c55eff4b9151691d0587627efad4a06485f1 Fixes: QTBUG-74815 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | * Blacklist tst_qquickwindow::openglContextCreatedSignal on opensuseUlf Hermann2019-04-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-75454 Change-Id: I46453da06553de7be721b921b085a015741ada5f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | | * Blacklist tst_qquickwidget::tabKey() on opensuseUlf Hermann2019-04-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-75171 Change-Id: I68ef40cd9fe47d26cd4c83064367c2a3272efe0f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-252-3/+10
| | |\| | | | | | | | | | | | | Change-Id: I2fea101de38922d34088c6eca0e256ec167ad118
| | | * Use resource path for test data on Android and iOSMitch Curtis2019-04-242-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/mkspecs/features/testcase.prf already generates a .qrc file containing the files in TESTDATA, so instead of trying to copy QML files to the device, we can just use the existing resources. This fixes the following failure, which affects all tests using util.pri: I/QTestLib( 7143): FAIL! : tst_qquickapplication::initTestCase() 'QDir::setCurrent(m_directory)' returned FALSE. (Could not chdir to :/) Change-Id: Iddfd227c402dbe80aeaa9742a52690d3d8049e46 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | add "json" manual TableModel testMitch Curtis2019-04-294-0/+366
|/ / / | | | | | | | | | | | | | | | | | | This covers the use case of fetching and showing data from a web API. Change-Id: I9e9cd6a17f409383ba71bc32f0f9d63a45213784 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Stabilize tst_QQuickWheelHandler's activeChangedSpy checksShawn Rutledge2019-04-272-3/+5
| | | | | | | | | | | | | | | Change-Id: I9fa36d12347f0311728dc14ab4b8405bf0550505 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Add WheelHandlerShawn Rutledge2019-04-2710-47/+730
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can be used to change any qreal property of its target Item in response to wheel rotation, or it can be used in other ways that involve bindings but without a target item. [ChangeLog][QtQuick][Event Handlers] Added WheelHandler, which handles mouse wheel rotation by modifying arbitrary Item properties. Fixes: QTBUG-68119 Change-Id: I247e2325ee993cc1b91a47fbd6c4ba0ffde7ad49 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | fakeFlickable manual test: put the slider in a drawerShawn Rutledge2019-04-273-24/+127
| | | | | | | | | | | | | | | | | | | | | | | | The main reason is that the drawer also demonstrates a different use of the BoundaryRule (limiting drags, with springy endstops). Change-Id: I958af65a857fda1b5b8dc1b135414799261afc1f Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Add BoundaryRuleShawn Rutledge2019-04-274-0/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Qt Labs Animation] Added the BoundaryRule QML type, a PropertyValueInterceptor that restricts the range of values a numeric property can have, applies "resistance" when the value is overshooting, and provides the ability to animate it back within range. Change-Id: I677b407a351c12b0c5b23c34a45933154310c2cd Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Transform V4_ENABLE_JIT into a featureUlf Hermann2019-04-251-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way you can enable or disable the JIT when configuring Qt. The conditions for the availability of the JIT have also been cleaned up. There is no reason anymore to artificially restrict availability on x86 and x86_64. The reason for the existence of those clauses are old problems on windows that have been fixed by now. However, on arm and arm64, we need a specialization of the cacheFlush() function for each OS to be supported. Therefore, restrict to the systems for which such a specialization exists. iOS and tvOS are technically supported and you can enable the JIT via the feature flag now. Due to Apple's policy we disable it by default, though. Change-Id: I5fe2a2bf6799b2d11b7ae7c7a85962bcbf44f919 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Add libfuzzer test for QJSEngine::evaluate()Robert Loehning2019-04-232-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-72734 Task-number: QTBUG-73985 Task-number: QTBUG-73999 Task-number: QTBUG-74048 Task-number: QTBUG-74058 Change-Id: I6cd99e31220e96b24338f5daa80d6f726ea33812 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-235-4/+39
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlmetatype.cpp Change-Id: Ieff61c076e46eb50a059c8b0210f7f4d7ce0cbcf
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-195-4/+39
| |\| | | | | | | | | | Change-Id: I9ef4be23bfe35aa48d4c65d4159e72c527943845
| | * QML: Remove static attchedPropertyIds mapUlf Hermann2019-04-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the same object is available under two different names it should still have the same attached properties no matter which name you use. This was achieved by having a static map of metaobjects to attached property IDs that would always hold the first attached property ID registered for a given metaobject. This attached property ID was then used as key in the map of attached properties for the actual objects. The obvious downside to that is that we need a global static which gives us thread safety and static initialization (and destruction) problems. It turns out, all the attached properties are created by attached properties functions, registered by the user. Those functions only get the object to be amended as parameter. Therefore, no attached properties function can be registered for multiple attached properties on the same object as it wouldn't know which one to create for a given call. Thus, the whole ID dance is unnecessary as we can as well index the attached property objects by the function that created them. This nicely avoids creating two attached property objects for the same object and function and still makes the global static unnecessary. Fixes: QTBUG-75176 Change-Id: Ie8d53ef0a6f41c9b3d6b9d611cde1603a557901c Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| | * Don't crash when accessing invalid properties through QObjectWrapperUlf Hermann2019-04-182-0/+30
| | | | | | | | | | | | | | | | | | Change-Id: I613bf5dc685bb4235262b429d8f7318ea144fb9d Fixes: QTBUG-75203 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| | * Blacklist tst_qquickapplication::active() on opensuseUlf Hermann2019-04-171-0/+3
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-75215 Change-Id: Ia567352a21e9a333df67ad8c87c5732d439af546 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>