aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2017-12-15180-2/+11884
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/quickcontrols2/quickcontrols2.pro src/imports/controls/ComboBox.qml src/quicktemplates2/qquickabstractbutton.cpp src/quicktemplates2/qquickabstractbutton_p.h src/quicktemplates2/qquickapplicationwindow_p.h src/quicktemplates2/qquickcombobox.cpp src/quicktemplates2/qquickcontainer.cpp src/quicktemplates2/qquickcontrol.cpp src/quicktemplates2/qquickcontrol_p.h src/quicktemplates2/qquickcontrol_p_p.h src/quicktemplates2/qquicklabel_p.h src/quicktemplates2/qquicklabel_p_p.h src/quicktemplates2/qquickslider_p.h src/quicktemplates2/qquickspinbox.cpp src/quicktemplates2/qquicktextarea_p.h src/quicktemplates2/qquicktextarea_p_p.h src/quicktemplates2/qquicktextfield_p.h src/quicktemplates2/qquicktextfield_p_p.h tests/auto/auto.pro tests/auto/controls/data/tst_combobox.qml Change-Id: I34cdd5a9794e34e0f38f70353f2a2d04dfc11074
| * Control: defer the execution of the content itemJ-P Nurmi2017-12-151-14/+0
| | | | | | | | | | | | | | | | | | Tumbler is excluded because test_customContentItemAtConstruction() starts failing if deferred execution is enabled for the content item. Task-number: QTBUG-50992 Change-Id: I11022c3c380311396453cf6229e068e4aae2d82a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Page: use deferred executionJ-P Nurmi2017-12-141-1/+0
| | | | | | | | | | Change-Id: Icb22f656893c89f61233bb547f03e63240bb8f97 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Extend and improve tst_customizationJ-P Nurmi2017-12-14155-118/+8148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add more test cases, and clarify the roles of the test styles. - empty: no delegates at all - incomplete: has all delegates, but with no bindings that access delegates and therefore trigger creation (tests that delegates must be created regardless) - simple: has all delegates and creates bindings to simulate a full style - override: overrides the simple style and tests that the default instances of overridden delegates are not created There are still several non-popup controls that lack deferred execution. These are marked with QEXPECT_FAIL() to make it easy to track what's missing. This list still excludes all popups. Task-number: QTBUG-50992 Change-Id: I70ce42592e7a320251edebfab3030ccc7c0eb978 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * SpinBox: use deferred executionJ-P Nurmi2017-12-145-0/+275
| | | | | | | | | | | | | | | | | | | | tst_controls::SpinBox::test_initialFocus() caught an issue that focus was not transferred as expected when the creation of the content item was deferred. Task-number: QTBUG-50992 Change-Id: I6b9f5684ab7141fa4ebfe4c7fe3e32528553b96d Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * GroupBox: use deferred executionJ-P Nurmi2017-12-142-7/+64
| | | | | | | | | | | | Task-number: QTBUG-50992 Change-Id: I3e5c8bf7cc39fae0e882440079bb43292ace1810 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Improve and fix tst_customizationJ-P Nurmi2017-12-142-22/+34
| | | | | | | | | | | | | | | | | | | | | | | | - Don't collect multiple object names for the same object. It was confusing that the "override" tests contained both "label-override" and "label-simple", for instance. - If creation fails, output the error as part of the FAIL message. - Verify that the QML files actually contain correct types. One of the RadioButton tests was accidentally running with a CheckBox. Change-Id: Ide56eed84b5625652321bfe4ef5e32fcf6f45438 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Pane: use deferred executionJ-P Nurmi2017-12-1413-0/+750
| | | | | | | | | | | | Task-number: QTBUG-50992 Change-Id: Ibba0e79f8eaf76336dad3708606484a2846b2912 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * ComboBox: use deferred executionJ-P Nurmi2017-12-147-2/+310
| | | | | | | | | | | | | | | | | | | | | | | | As a special case, ComboBox defers the execution of the popup until the popup is either accessed or made visible. This gives a nice boost in creation time benchmarks (20->25, ~25%). The old optimization of setting the delegate model only when the popup is visible is no longer needed. Task-number: QTBUG-50992 Change-Id: Ifeaceb759ab676bb54c6bc09dc97810eade72ca1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * ApplicationWindow: use deferred executionJ-P Nurmi2017-12-134-0/+184
| | | | | | | | | | | | Task-number: QTBUG-50992 Change-Id: Ia07055d2fa3d30c91bdf3c526cf7301c7ed1ce2b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * RangeSlider: use deferred executionJ-P Nurmi2017-12-135-0/+271
| | | | | | | | | | | | Task-number: QTBUG-50992 Change-Id: Ibbc946c3402c65f9b100fc74dde04e4d439c8535 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * TextArea: use deferred executionJ-P Nurmi2017-12-134-0/+184
| | | | | | | | | | | | Task-number: QTBUG-50992 Change-Id: I6d205f8ea0c90986b18b7e6cedbf347f1ce38eec Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * TextField: use deferred executionJ-P Nurmi2017-12-134-0/+184
| | | | | | | | | | | | Task-number: QTBUG-50992 Change-Id: I99a8d97e7f25cfff398fb30e365c7b245b738c37 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Label: use deferred executionJ-P Nurmi2017-12-134-1/+188
| | | | | | | | | | | | Task-number: QTBUG-50992 Change-Id: I8e626d1a0585f93cbd612aca39a1e9050f5e0ed3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Dial: use deferred executionJ-P Nurmi2017-12-135-0/+258
| | | | | | | | | | | | Task-number: QTBUG-50992 Change-Id: I432be00d81344ce129bc8906370555b134fdf423 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Slider: use deferred executionJ-P Nurmi2017-12-135-0/+258
| | | | | | | | | | | | | | | | | | | | | | Note: It is important to repeat the names of the deferred properties in base classes. The QML engine ask for the class info from the meta- object. A class info declaration in a sub-class overshadows the class info declaration by the same name in the base class. Task-number: QTBUG-50992 Change-Id: Ib674b943db2f0bf196c9386ea22b511715c0a98f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Buttons: defer the execution of the delegatesJ-P Nurmi2017-12-1115-0/+939
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In practice, deferring the execution of the delegates (until accessed) means that the default delegate item does not get created at all, when a custom control replaces it at construction time. Button { background: Rectangle { ... } } Before, such custom Button would never be faster than the original one, because the default delegate was first created and then thrown away at construction time. Originally, this was not considered a huge problem, because the plan was to keep the default delegates so light- weight that it wouldn't matter. However, then came the fancy styles with shadows and effects and thus, heavier default delegates. There's also a growing demand for more features, and the default delegates are slowly getting heavier... Now, after this patch, if you replace a heavy default delegate with a light and simple custom delegate, the result is a much faster control. For example, replacing Material style Button's background, which has a shadow effect, with a plain Rectangle gives a ~10x boost, because the default background with its heavy shadow effect is not executed at all. At the same time, deferring the execution of the default delegates avoids troubles with asynchronous incubation, because we don't need to destroy an object in the middle of the incubation process. Task-number: QTBUG-50992 Change-Id: I2274bff99b9ff126d3748278d58d859222910c98 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add means to test binary compatibility and add the test file for 5.10Milla Pohjanheimo2017-12-141-0/+10983
| | | | | | | | | | | | | | | | | | | | Added global.cfg file that lists the includes needed to create the binary compatibility test file. Also added the binary compatibility file to test 5.10 content. Change-Id: I9ddf9000991452c63d491695fb30c5c27199164d Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* | Fix double toggling through Action with checked AbstractButtonJoni Poikelin2017-12-131-0/+63
| | | | | | | | | | | | | | | | | | | | | | Action caused checked state of the button to be reset back to its original value if checked status had been change through click or key press. To avoid this, separate private function has been added to that does not change the status. Task-number: QTBUG-65108 Change-Id: I8a5aaa9aab739db3ba10d0202f5fb718cc7195bd Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-153-2/+78
|\| | | | | | | Change-Id: Ide4b85626dd153b534c39a3afa2f3b9e732badf5
| * Fix QQuickSlider::valueAt()J-P Nurmi2017-11-071-2/+4
| | | | | | | | | | | | Task-number: QTBUG-64065 Change-Id: Id77a85ce5b88c20795e9f7fe9d2ece974f46a315 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Qt.labs.platform: declare and register enums to the meta systemJ-P Nurmi2017-11-062-0/+74
| | | | | | | | | | | | | | | | | | To make them correctly available in QML so that they also work as signal arguments. Task-number: QTBUG-64259 Change-Id: I5fa00871f96357d924661c4b8af323a0f1748c9d Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2017-11-062-3/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickabstractbutton_p.h src/quicktemplates2/qquickbuttongroup_p.h src/quicktemplates2/qquickrangeslider.cpp src/quicktemplates2/qquickrangeslider_p.h src/quicktemplates2/qquickswipeview_p.h src/quicktemplates2/qquicktextarea.cpp src/quicktemplates2/qquicktextarea_p.h src/quicktemplates2/qquicktextfield_p.h Change-Id: I7cba8783b1dd85a4db534222e36572ee05dd01d0
| * tst_scrollbar::test_overshoot(): use createTemporaryObject()J-P Nurmi2017-11-031-3/+1
| | | | | | | | | | Change-Id: Ic98b332c5e30104c4a3c74a873caafa9065d6b5d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickTextField: retain selection on right mouse button clickJ-P Nurmi2017-11-031-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | QQuickTextField wants to emit pressed(), released(), and pressAndHold() signals not only on left, but on all mouse button clicks. Therefore it explicitly sets accepted mouse buttons to all. However, the base class, QQuickTextInput, has only been prepared to handle left (selection) and middle (paste) mouse buttons. Don't pass right mouse button -only events to the base class to avoid it clearing selection on right click. Task-number: QTBUG-64048 Change-Id: I015820c78995cc8dd7cbeb16fca0f9b991040bad Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Improve tst_snippetsJ-P Nurmi2017-11-021-4/+4
| | | | | | | | | | | | | | | | Make sure dynamically created QML components are destroyed when going out of scope, and print out the error when creation fails. Change-Id: Ie0ed785780cb861dd057adda8f4da399dd4986d2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Visualize mnemonicsJ-P Nurmi2017-11-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately this comes a bit late in the 5.10 cycle, but this should be released together with the rest of the mnemonics stuff going out in 5.10, because it affects the value of AbstractButton/Menu(Bar)Item::text. As the removed TODO comments and altered tests indicate, previously the ampersand was blatantly stripped out. It would be worse to change it later once people have already started using mnemonics and rely on the behavior in custom styles. The necessary modifications to QQuickText were added in qtdeclarative commit 65ef4ba. Task-number: QTBUG-61422 Change-Id: Iaa73da8c012e9a6019743cf98f5bdc02527064e5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Default: merge SwitchIndicator back to Switch & SwitchDelegateJ-P Nurmi2017-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See the previous commit (CheckIndicator) for more details. Before: running: /home/jpnurmi/Projects/qmlbench/benchmarks/auto/creation/quick.controls2/delegates_switch.qml [...] Average: 87.8 frames; using samples; MedianAll=87; StdDev=2.16795, CoV=0.0246919 After: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_switch.qml [...] Average: 92.6 frames; using samples; MedianAll=92; StdDev=2.19089, CoV=0.0236597 Change-Id: Iea9e88e4e771ac27d336c2c87232704d33a226ec Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Default: merge RadioIndicator back to RadioButton & RadioDelegateJ-P Nurmi2017-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See the previous commit (CheckIndicator) for more details. Before: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_radiobutton.qml [...] Average: 91.6 frames; using samples; MedianAll=91; StdDev=1.51658, CoV=0.0165565 After: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_radiobutton.qml [...] Average: 95.8 frames; using samples; MedianAll=96; StdDev=2.04939, CoV=0.0213924 Change-Id: Ic185241767d0b9422e86919356e3155e00803e56 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Default: merge CheckIndicator back to CheckBox & CheckDelegateJ-P Nurmi2017-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The internal CheckIndicator helper was introduced together with CheckDelegate in 1acb34a, because we naturally wanted to share the indicator instead of duplicating it. This change is controversial, because it leads to duplicate code, but keeping the indicator definitions inline is clearly faster. This is not seen as a huge problem for the Default style, because the indicator is not too complicated. Basically, this fixes a ~5% performance regression introduced by 1acb34a. Before: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_checkbox.qml [...] Average: 72.8 frames; using samples; MedianAll=73; StdDev=1.48324, CoV=0.0203742 After: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_checkbox.qml [...] Average: 77 frames; using samples; MedianAll=77; StdDev=1.41421, CoV=0.0183664 Change-Id: Ibee0e29e83a64ee4a6a772a90b1784a9c8c715bb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-301-2/+12
|\| | | | | | | | | | | | | Conflicts: src/imports/controls/MenuItem.qml Change-Id: Id4cae0e53a58796694ad1fc9f8380b317ee62984
| * Fix outdated BSD license headerKai Koehne2017-10-231-2/+12
| | | | | | | | | | Change-Id: Ibec1396de3e929a229e1550b8045d687aa5a513c Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | QQuickSpinBox: fix internal setValue() argumentsJ-P Nurmi2017-10-271-0/+5
| | | | | | | | | | | | Task-number: QTBUG-64075 Change-Id: Ifd48b6d0075ab1930be3d759b18292b5038bcc17 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickIconImage: fix crash with image providersJ-P Nurmi2017-10-232-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | QQuickImageBase::load() cannot call until the component creation is completed, because it requires an associated QML engine. All calls to updateIcon() are guarded with the appropriate isComponentComplete() check, but the sourceSizeChanged() signal was connected directly to updateIcon(). Establish the signal-slot connection at component completion to avoid calling updateIcon() to soon. Task-number: QTBUG-63959 Change-Id: I3c935291796dbae031d2728e1d51c55596a51cd0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2017-10-223-15/+82
|\| | | | | | | Change-Id: I9188f94e40e2ecb4da1963ce2fcf915ab7a4b4fb
| * Speedup tst_pageindicatorJ-P Nurmi2017-10-191-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | test_interactive() was iterating the entire rectangle 2px around each indicator pixel by pixel and sending mouse clicks and touch presses + releases at each coordinate. This resulted to a total of 845 mouse clicks and 845 touch presses and releases. Select a few interesting coordinates to reduce it down to 40 mouse clicks and touch presses and releases. Change-Id: Ie3439aae8481e019956c49d2d82067dac8741b8f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickContainer: fix itemSiblingOrderChanged()J-P Nurmi2017-10-171-3/+27
| | | | | | | | | | | | | | | | | | | | | | The problem was that QQuickContainer started already moving items while QQmlObjectModel was creating items and QQuickRepeater was initializing the order. Don't reorder items during the creation, but only after component completion. Task-number: QTBUG-61310 Change-Id: I13380c5ab6b3bddaad3fa03ef6fb028622b4cd11 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickToolTip: disable hoverJ-P Nurmi2017-10-121-0/+31
| | | | | | | | | | | | | | | | | | | | Tooltips are special popups that should not block hover, because it conflicts with the typical condition for showing tooltips on desktop platforms. Task-number: QTBUG-63644 Change-Id: Ie974aed23a7df8e4b926bec5fe717cb909d15842 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | remove blacklistsShawn Rutledge2017-10-222-24/+0
| | | | | | | | | | | | | | | | Task-number: QTBUG-62668 Task-number: QTBUG-62628 Task-number: QTBUG-62631 Change-Id: If3220bf00a4729573be4b85755897586105b55a2 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | 9-patch export plugin for SketchJ-P Nurmi2017-10-181-1/+1
| | | | | | | | | | | | | | | | This plugin crops upscaled 9-patch PNG assets when exported from Sketch, to ensure that 9-patch borders remain 1px wide when upscaled. Change-Id: Iad46d75f37b76eecf64ac32fa38d2b9e9db8b34d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | tst_sanity: fix "empty filename passed to function" warningsJ-P Nurmi2017-10-181-3/+6
| | | | | | | | | | Change-Id: Ia1e633af6c64c9e2d538a2d4076e0bdd9667e01e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2017-10-123-1/+58
|\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/quicktemplates2/qquickbuttongroup.cpp src/quicktemplates2/qquickoverlay.cpp tests/auto/controls/data/tst_buttongroup.qml Change-Id: Iae23aaf039c6095007966475294e93220dbead84
| * tst_combobox: attempt to stabilize test_mouse()J-P Nurmi2017-10-021-1/+1
| | | | | | | | | | | | | | | | Disable hover to avoid unexpected changes. Task-number: QTBUG-60480 Change-Id: I22fab5c95daa42f3c84437072bce49cac5c705af Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickScrollView: fix binding loop with wrapping TextAreaJ-P Nurmi2017-09-281-0/+25
| | | | | | | | | | | | | | | | | | | | Start keeping track of the content size only after the component is complete, to avoid creation time ping pong with content size updates and content item resizing. Task-number: QTBUG-62325 Change-Id: I4b75dc398d0b746dd7e0b04291270f47f91bb7e6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickButtonGroup: track the checked button with a QPointerJ-P Nurmi2017-09-281-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | A destroyed button removes itself from a group, but because of the workaround added for QTBUG-52358, there's a moment after clear() when a button is removed from a group and before it is added back to the group. If the button gets destroyed during that period, the group ends up with a dangling pointer. Task-number: QTBUG-62946 Task-number: QTBUG-63470 Change-Id: If994f87b221a7e77f56458866c4d132365c45d6f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickAction: don't uncheck the checked action of an exclusive groupJ-P Nurmi2017-10-091-0/+41
| | | | | | | | | | | | | | | | The logic is adapted from QAction::activate(). Task-number: QTBUG-63674 Change-Id: I7af127ea917e40e6a8ca99c2528362cf6ad283b8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickActionGroup: add missing default propertyJ-P Nurmi2017-10-091-0/+19
| | | | | | | | | | | | Task-number: QTBUG-63674 Change-Id: I7e8eef4080f123ba5ad6b9ffa8bd8613c1b7b724 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2017-09-2762-117/+116
|\| | | | | | | | | | | | | | | | | | | Conflicts: .gitignore tests/auto/auto.pro tests/auto/qquickmenu/tst_qquickmenu.cpp tests/auto/qquickpopup/tst_qquickpopup.cpp Change-Id: I7e5a7b39d890796fd63a7b24ae19765ab41fecda
| * Rename tst_menu to tst_QQuickMenuJ-P Nurmi2017-09-279-16/+16
| | | | | | | | | | Change-Id: I1c7e1a2b337e9d16bc6c9b098db08f29f1b9d1e6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Rename tst_applicationwindow to tst_QQuickApplicationWindowJ-P Nurmi2017-09-2714-23/+23
| | | | | | | | | | Change-Id: If9fc2bb41cf251af71479b25656240e0d3c238d8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>