aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Bump up all controls and templates imports to version 2.1J-P Nurmi2016-07-08116-139/+139
| | | | | | | | | | | | Controls must import templates version 2.1 in order to "inherit" 1-revisioned properties, methods, and signals. So far, this has been done case by case, but it's less error prone and more clear to change them all. For example, if you ever see a source file pasted/linked somewhere, it's easy to identify the version it belongs to. Change-Id: I41609ec1a22bc05ac3e79f953a147ca42d9e0786 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_control: fix TextArea::test_pressedReleasedJ-P Nurmi2016-07-071-1/+1
| | | | | | | | | An empty TextArea has an implicit height of 0. Give it some textual content so it gains a valid height, which is needed for testing mouse event delivery. Change-Id: I8e93b5fef08e4ac714233adad9493f70d4a0150b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add pressed() and released() signals to TextField and TextAreaMitch Curtis2016-07-062-2/+338
| | | | | | | | | | | | Users need these to e.g. open context menus when editors are right-clicked. [ChangeLog][TextArea][TextField] Added pressed() and released() signals. Change-Id: I32b79a8de0120a4f9115fa1c3cb832aff0134a15 Task-number: QTBUG-51009 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix tests in static buildsJ-P Nurmi2016-07-014-0/+21
| | | | | | | | Sprinkle dummy dependencies.qml files to places where qmlimportscanner needs help detecting the dependencies. Change-Id: I9f638d6f00181a32821c8f3ee9c7f23525a34dcc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Tumbler: make wrap property depend on count by defaultMitch Curtis2016-07-011-9/+105
| | | | | | | | | | [ChangeLog][Important Behavior Changes][Tumbler] Changed the default value of wrap to be false when count is less than visibleItemCount. Explicitly setting wrap overrides this behavior. Change-Id: I0089f517a25a606625c245df52b0db5fd859ffc0 Task-number: QTBUG-53587 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Remove DialogButtonBox::flatJ-P Nurmi2016-06-301-22/+0
| | | | | | | | | | | | The Material Design allows mixing standard flat buttons with non-flat custom buttons. It is enough that the delegate provides flat standard buttons by default. It is better to not force all buttons to be flat, but let the user freely specify whether custom buttons are flat. This API has not yet been released, so it is still safe to remove. Change-Id: Iec400553ccefb47f20fb98d64919491d9bb27cbe Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add hover support to TextArea & TextFieldJ-P Nurmi2016-06-292-0/+44
| | | | | | Task-number: QTBUG-50003 Change-Id: Ie101ba8840fba2a7503da8de77d9cf2a3c91d562 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Tumbler: test and document negative currentIndexMitch Curtis2016-06-281-5/+28
| | | | | Change-Id: If56bad7c3dd6dea2898058d6fc5b0d88bcd202fe Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Tumbler: change default visibleItemCount to 5Mitch Curtis2016-06-283-5/+7
| | | | | | | | | | | | | | | This looks much better than 3; it looks more like an actual Tumbler, partly because the displacement shading is made more visible. This should make it less confusing to interact with for first-time users. In addition, we were previously setting it to 5 in several places. [ChangeLog][Important Behavior Changes][Tumbler] Changed the default value of visibleItemCount to 5 to make it visually clearer that it's a Tumbler. Change-Id: I7c16e05aa73f58e3405caa1826453cb824efae11 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* RangeSlider: add first.hovered and second.hovered propertiesJ-P Nurmi2016-06-281-0/+27
| | | | | | | | | | | The actual hover effects are coming in separate patches. [ChangeLog][RangeSlider] Added first.hovered and second.hovered properties that hold whether the respective handles are hovered. Change-Id: I3ffeed5de6c9a168534c8e9d4f1642161fc52caf Task-number: QTBUG-50003 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* SpinBox: add up.hovered and down.hovered propertiesJ-P Nurmi2016-06-281-0/+29
| | | | | | | | | | | The actual hover effects are coming in separate patches. [ChangeLog][SpinBox] Added up.hovered and down.hovered properties that hold whether the respective buttons are hovered. Task-number: QTBUG-50003 Change-Id: Ie47329e23326f40e4c807703ff7a97437f68deb4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Tumbler: add wrap propertyMitch Curtis2016-06-286-151/+432
| | | | | | | | | [ChangeLog][Tumbler] Added wrap property to control whether or not tumbler wraps when it reaches the top and bottom. Change-Id: I27c543d98f7bc574bc5dc882a130abe0dcc13cea Task-number: QTBUG-53587 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Platform: add FileDialog and FolderDialogJ-P Nurmi2016-06-272-0/+122
| | | | | Change-Id: I4328c273e48139d6ddd5a3d3c8492d06f48a5c24 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* MessageDialog: add simple instance creation testJ-P Nurmi2016-06-231-0/+61
| | | | | | | Just to ensure that it would not crash when no widgets are available. Change-Id: I88088d289db0886b15b72d0a73791bcdba688a31 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* ColorDialog & FontDialog: use widgets as a fallbackJ-P Nurmi2016-06-222-0/+122
| | | | | | | | | | | | This makes these dialogs available on Windows and KDE. One more reason to keep the module experimental. In the long run, platforms should implement QPA dialogs so that we can remove the undesired dependency. Also simple instance creation tests are included to make sure it won't crash with non-QApplication apps. Change-Id: Ib4dabe7b656a1aa1f114052a3f57c9b1232ff27f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-06-202-4/+15
|\ | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickcontainer.cpp Change-Id: I7c41619a81b4fdd0d8ccaa4f0bb489a9b84e3865
| * Fix QQuickSliderPrivate::snapPosition()J-P Nurmi2016-06-161-4/+10
| | | | | | | | | | | | | | | | | | The correct formula for calculating the "range" or "span" is to-from, not from+(to-from), which is used in the formula for calculating value. Change-Id: I9df0561de8fb759dc83ea052917aeba1529c89a4 Task-number: QTBUG-54140 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * StackView: Fix warning when popping down to the current itemKonstantin Ritt2016-06-161-0/+5
| | | | | | | | | | | | | | | | | | findElement() is unable to find currentItem cause the most top element has been popped just few lines above, leading to "pop: unknown argument: .." warning where it shouldn't really do. Change-Id: I90d4ea6acaf09b861af281d9c0e23bc42a6eb503 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | tst_stackview: update file error messageJ-P Nurmi2016-06-201-2/+2
| | | | | | | | | | | | | | The error message was changed in qtdeclarative commit 156d10e. Change-Id: Ie12cc3803a83961f59da6f9b72de445f9f436039 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Add QQuickContainer::increment|decrementCurrentIndex()J-P Nurmi2016-06-202-2/+22
| | | | | | | | | | | | | | | | | | [ChangeLog][Container] Added incrementCurrentIndex() and decrementCurrentIndex() methods for changing the current index without losing its property binding. Change-Id: Id44e0db5e3d0951eb77b0124a83c5eb3df898012 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Platform system tray iconJ-P Nurmi2016-06-161-0/+90
| | | | | | | | | | Change-Id: I25190e1ae485e86cfbed524a418884d47f21e83d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Platform menusJ-P Nurmi2016-06-164-0/+951
| | | | | | | | | | Change-Id: Ifbca41ef384ca8fe8afefc61869f85c17db0f8c7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Setup a Qt.labs.platform moduleJ-P Nurmi2016-06-163-0/+51
| | | | | | | | | | | | | | | | | | This change just prepares the infrastructure and imports an icon loader helper that will be used for the platform menu, dialog, and system tray icon implementations. Change-Id: I34a93050a7c988134c3daa986aca6021eac7a4d1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add DialogButtonBoxJ-P Nurmi2016-06-151-0/+210
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls] Added DialogButtonBox to provide convenience for handling dialog buttons. DialogButtonBox is able to create a set of standard buttons with a single line of QML code, and provides convenient accepted() and rejected() signals. Task-number: QTBUG-51090 Change-Id: I9b3c6ba1b2836dadf9a2ac9086be1eba214e7c4d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-06-1421-71/+137
|\| | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickslider.cpp Change-Id: Idefd7b77b1937d423ee2db5064ff09c36b240ef0
| * Replace tst_styles with tst_material & tst_universalJ-P Nurmi2016-06-149-57/+104
| | | | | | | | | | | | | | | | | | | | The CI was not able to catch failures in tst_styles, because the test results were output by separate child processes. This change builds three different versions of tst_controls, which each run with the appropriate style. Change-Id: I95b2bdd90221579a3176e827802236d80d9f1a09 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Rename tst_material and tst_universalJ-P Nurmi2016-06-1311-15/+15
| | | | | | | | | | | | | | | | | | | | These test specificly the QQuickMaterialStyle and QQuickUniversalStyle implementations, so rename appropriately to make room for the upcoming tst_material and tst_universal tests. See the next commit for more details about that. Change-Id: I08d6116d6219084f6087682b7e712f8499a0e945 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickScrollBar: fix layouting of mirrored vertical scrollbarJ-P Nurmi2016-06-131-0/+13
| | | | | | | | | | Change-Id: I19630dc54f275ba2f8034c1ef45e5243586a8d23 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Fix Slider to react if only clickedJ-P Nurmi2016-06-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The idea was to avoid accidental value changes while flicking over a slider, but that case should be covered well enough by handling mouseUngrabEvent(). [ChgangeLog][Important Behavior Changes] Slider has been fixed to react to clicks. Task-number: QTBUG-53846 Change-Id: I0d52f805af8867655945c57ad77ccb85704a4462 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Slider: expose valueAt(pos) for getting continuous value updatesJ-P Nurmi2016-06-131-1/+21
| | | | | | | | | | | | | | | | | | [ChangeLog][Slider] Added valueAt() method for getting continuous value updates. Task-number: QTBUG-53847 Change-Id: I0aa813c7105faa64b714ab0a0630f79d97a58854 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add ButtonGroup::clicked(AbstractButton) signalJ-P Nurmi2016-06-061-0/+31
| | | | | | | | | | | | | | | | [ChangeLog][ButtonGroup] Added clicked(AbstractButton) signal for centralized click handling for grouped buttons. Change-Id: Ib64d360db211d2763f6237e411152a2a395fd2b5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | StackView: add attached activated() etc. signalsJ-P Nurmi2016-06-061-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | For initializing and cleaning up item-specific resources, these are much more convenient than a StackView.onStatusChanged handler. [ChangeLog][StackView] Added attached activated(), deactivated(), activating(), and deactivating() signals that are convenient for initializing and cleaning up item-specific resources. Change-Id: If8df45b31a14cd2491db2c87eeb1c071af4e695f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | SwipeView: add isNextItem and isPreviousItem attached propertiesJ-P Nurmi2016-06-061-0/+16
|/ | | | | | | | | [ChangeLog][SwipeView] Added isNextItem and isPreviousItem attached properties to make it straight-forward to use Loader for unloading pages that are outside the reach. Change-Id: Idb97d64282afaef58cc3302d3f558900a0d7d4b5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tests: fix accent and background color in tst_materialLiang Qi2016-06-011-8/+16
| | | | | | | | | | They are also affected by theme. Note: dev CI could verify this. Task-number: QTBUG-53556 Change-Id: Id7cecab2baafe91b198b20f92bb881cc4b531807 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add a simple manual test for taking screenshots in style docsJ-P Nurmi2016-05-274-0/+169
| | | | | Change-Id: Ib5a985796d56b66c5842f2e1ab0e460420f62b54 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* SpinBox: disable up and down indicators when appropriateMitch Curtis2016-05-241-6/+99
| | | | | | Change-Id: I6fbfde582723632c9b955a6e7ee380179b7b6a32 Task-number: QTBUG-53519 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Make Overlay.modal and modeless ComponentsJ-P Nurmi2016-05-232-48/+94
| | | | | | | | | | | | | | | | This way we can simply instantiate a visual overlay for each modal or dimming popup without having tricky problems with overlay's stacking order. It makes also sense to not instantiate the overlays for hidden popups. Coincidentally, this change also fixes a problem that the overlay turned out to be _always_ visible since a hidden overlay background was always instantiated no matter if there were open popups, or popups at all. Change-Id: Ieb64a72c827d0a005418027428378ebe04f41117 Task-number: QTBUG-53519 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* SwipeDelegate: rename exposure to swipe, active to completeMitch Curtis2016-05-234-211/+211
| | | | | | | | | "swipe" is both shorter and easier to understand. "complete" is easier to understand. Task-number: QTBUG-53519 Change-Id: I87ecba4ac878f033111ee56fa618b80b227858a7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Don't restore focus to contentItem when a focusless popup was closedMitch Curtis2016-05-193-0/+194
| | | | | | | | | For example, a ToolTip shouldn't affect focus when it closes. Task-number: QTBUG-53420 Task-number: QTBUG-53451 Change-Id: Ic945e98a2ffd86e9f9f06724b16e5f240c3f94de Reviewed-by: Liang Qi <liang.qi@qt.io>
* StackView: reset size of the content without explicit one on pop()Nikita Krupenko2016-05-181-0/+21
| | | | | | | | | This allows for item to be properly risezed by StackView when it'd be pushed onto stack again. Task-number: QTBUG-53067 Change-Id: I911026022a987ed5632ae5411d63221d743a6aca Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix style inheritance with dynamically changing windowsJ-P Nurmi2016-05-182-0/+39
| | | | | | | | | It can happen that the parent item changes before an item gets associated with a window. Change-Id: I4cb65a06d363f8211b202e559c76793c71ba318a Reviewed-by: Nikita Krupenko <krnekit@gmail.com> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Center testbench window in screenMitch Curtis2016-05-131-0/+2
| | | | | | | | On big screens, it's annoying to have to constantly reposition the window. Change-Id: I96e9c5bbeefe8646d1461f6e063305856e3aa676 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Popup: respect "dim: false" for modal popupsJ-P Nurmi2016-05-121-0/+18
| | | | | | Task-number: QTBUG-53309 Change-Id: I024dfa32342a7c936f5ea53586c11e50d65845e9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickMenu: cull items outside the popupJ-P Nurmi2016-05-121-1/+5
| | | | | | | | | | | Same as a055629 for QQuickSwipeView. This hides them until they become visible in the popup. Hiding them explicitly is not an option, because then they will never show up. This technique is used in QQuickItemView::initItem() and FxViewItem::setVisible(). Change-Id: I848652fd98f47b87a85f742205d1db729ad9de8d Task-number: QTBUG-53262 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Popup: restore focus to contentItem of ApplicationWindow when closingMitch Curtis2016-05-113-1/+132
| | | | | | | | | In Controls2, Popup and normal content are in same window, then we should maintain the focus restore work. Task-number: QTBUG-53275 Change-Id: I57f5aaf3febf1b7d2071c1734d8561932f95c699 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Don't limit snippet screenshots to *-custom.qml filesMitch Curtis2016-05-111-1/+1
| | | | | | | e4a7b9e8e changed this when it shouldn't have. Change-Id: I75d1283f9fab74e137d2fc35654eaa909c1c819d Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQuickPopup: emit xChanged() and yChanged() when _local_ coords changeJ-P Nurmi2016-05-111-0/+18
| | | | | | | | | | | Emitting xChanged() and yChanged() when the (scene) geometry of the internal popup item changes is not sufficient, because QQuickPopup operates in the parent item's coordinate space. When a popup is pushed inside the window margins, the local coordinates change, but the global coordinates don't. Change-Id: I296f1ecd1d1e882c2ff730a2bf68641bd57cbb4f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* customize.qdoc: Use standalone snippetsMitch Curtis2016-05-101-6/+21
| | | | | | | | So that we don't refer to internal types, as these make copying and pasting snippets difficult. Change-Id: I6f3b943d2eed48beb7a64690c707924e2c5a8078 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* ComboBox: restore the old popup behaviorJ-P Nurmi2016-05-101-0/+8
| | | | | | | | Make the Popup follow ComboBox outside the horizontal screen bounds. Setting an explicit width instead of implicit width does exactly this. Change-Id: I46f4e5e40d5012929badf39d50d70b9a7811f455 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Popup: use margins to determine whether to push inside window boundsJ-P Nurmi2016-05-101-0/+28
| | | | | | | | | | | | | | Previously, we were planning to introduce complex policy flags to make it possible to specify whether a Popup is allowed to go outside the screen or not. Using margins for that purpose avoids the need of introducing such dedicated API just for that. From now on, margins are used to determine whether a popup is pushed to fit inside the window bounds (margins removed), and implicit size is used to determined whether a popup is resized to fit inside the window. In other words, a popup with negative margins and no implicit size is allowed to move outside the window bounds. Change-Id: Ife1665755e4dae434751977ae3289eb1aa4f3c6d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>