aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Replace 'foreach' with 'range for'Anton Kudryavtsev2016-09-027-17/+23
| | | | | | | | And add QT_NO_FOREACH define to .qmake.conf. Now QuickControls2 is 'foreach' free. Change-Id: I98695258859decadae6fd2f23f5f6f5ef2b0550f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Material: ignore Material.background unless explicitly setMitch Curtis2016-09-021-0/+29
| | | | | | | | | | | | | | Doing Material.background: "red" in an ApplicationWindow shouldn't affect the background color of e.g. a Button. The background property should still propagate though, so we change buttonColor() to ignore the value of background if it wasn't explicitly set. Change-Id: I09b4df142935b19de35a77bd68c6c062417b74fc Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQuickDrawer: fix velocity calculationJ-P Nurmi2016-09-021-0/+3
| | | | | | | | Use the vertical velocity for top and bottom edges, and invert the speed for right and bottom edges. Change-Id: I362dda23f0a2cda60ad7cd52e7373d0707feea83 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Switch: fix Qt::ClickFocus on the indicatorJ-P Nurmi2016-09-021-0/+11
| | | | | | Task-number: QTBUG-55647 Change-Id: Ic89beaa1e6674d3f94c9a713fd9bd8e8fdfafbb6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Popup: respect dynamic dim & modal changesJ-P Nurmi2016-09-021-2/+8
| | | | | | | | | | | | | What comes to the visual background dimming, popups did not respect dynamic 'dim' or 'modal' property changes. This was half-intentional, because it was thought an unrealistic use-case to toggle these while the popup is visible. As a result, the background dimming was missing if a popup was made visible in a declarative way, and either 'dim' or 'modal' was evaluated after the popup was already visible. Task-number: QTBUG-54797 Change-Id: Icfb171e619540fef2d91908867b702790cde6c32 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Make a plain Container calculate suitable implicit sizeJ-P Nurmi2016-08-311-0/+85
| | | | | | | | | [ChangeLog][Controls][Container] A plain Container now calculates its implicit size based on the implicit size of the content item plus paddings, and the implicit size of the background item. Change-Id: I0481aef0ce713d92bee8b119bf5158dea612d598 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Make a plain Control calculate suitable implicit sizeJ-P Nurmi2016-08-311-1/+28
| | | | | | | | | [ChangeLog][Controls][Control] A plain Control now calculates its implicit size based on the implicit size of the content item plus paddings, and the implicit size of the background item. Change-Id: I086ecf8e3f564ee49df2f9d30015e127dc88db6e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* ScrollIndicator: respect the paddings when overshootingJ-P Nurmi2016-08-301-0/+34
| | | | | | Task-number: QTBUG-55620 Change-Id: I4c06a9e7fefbdbaff7f14a972ed47242c51ca8c6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix attached ToolTip propertiesJ-P Nurmi2016-08-191-0/+25
| | | | | | | | | | The attached properties should apply to the shared/global tooltip instance only when the shared tooltip is visible for the attachee item. Task-number: QTBUG-55347 Change-Id: Ia822f2d1de62d2d6dfb28519817edce674d8c2b8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Close parentless popupsJ-P Nurmi2016-08-191-1/+5
| | | | | | | | | | | | | | | A parentless popup is not visible anywhere, and is not even associated to a QML engine. Attempting to execute transitions would crash. Make sure to remove any event filters (when using a plain QML Window, like with QML TestCase) when a popup is made parentless. This ensures that if the global shared tooltip was shown on an item that was destroyed, the tooltip won't keep interfering with the window where it was last shown. Change-Id: I87bf9f8dda2fbcc5d1b83d1b83a66a6b9e718eb6 Task-number: QTBUG-55347 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Universal: ensure setting background/foreground worksMitch Curtis2016-08-196-0/+154
| | | | | | | | | | | | | | - Add HasGlobalForeground and HasGlobalBackground. These are set to true when a foreground/background color is specified via settings (qtquickcontrols2.conf file or environment variables), and then used to initialize each attached style object's m_hasForeground and m_hasBackground property. - Add tst_qquickuniversalstyleconf auto test to ensure that global settings are respected. Task-number: QTBUG-55366 Change-Id: I7a8b219506f9528c4ae323bd890b418ba056ed23 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Material: ensure setting background/foreground worksMitch Curtis2016-08-196-0/+154
| | | | | | | | | | | | | | - Add hasGlobalForeground and hasGlobalBackground. These are set to true when a foreground/background color is specified via settings (qtquickcontrols2.conf file or environment variables), and then used to initialize each attached style object's m_hasForeground and m_hasBackground property. - Add tst_qquickmaterialstyleconf auto test to ensure that global settings are respected. Change-Id: I436773e355c6d470215fb9cfe8fbff402d2979d9 Task-number: QTBUG-55366 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQuickPopup: don't keep a reference to a destroyed parentJ-P Nurmi2016-08-181-0/+9
| | | | | | | | | | | Move the itemDestroyed() listener from QQuickPopupPositioner, which is only active while the popup is visible, to QQuickPopupPrivate instead. This way the popup gets a notification when the parent gets destroyed while the popup is hidden. Task-number: QTBUG-55347 Change-Id: Ic72206cc05996c23062e814799a030c369fc6288 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-08-101-0/+1
|\
| * Merge remote-tracking branch 'origin/5.6' into 5.7J-P Nurmi2016-08-101-0/+1
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/material/BoxShadow.qml Change-Id: I52c9f70dec9e56e2374d3ec0c135f2963cf5e833
| | * Fix compilation without QProcess supportv5.6.2Maurice Kalinowski2016-08-101-0/+4
| | | | | | | | | | | | | | | Change-Id: I85b2baec60f700a9246e6ce177e7079b8e791ad2 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| | * Fix tst_tumbler after Flickable changesJ-P Nurmi2016-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | See qtdeclarative commit ebf07c3f for more details. Task-number: QTBUG-55179 Change-Id: Ie7d855396148c892077381666e0200180dda02bd Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | Dial: fix stepSize handlingMitch Curtis2016-08-101-0/+35
|/ / | | | | | | | | | | | | | | | | | | | | As was done in for Slider in c4c803ce4: 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. Task-number: QTBUG-55228 Change-Id: Ic5463ef5ac5566efc5996aadd9ae39ec108d778f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | QQuickRangeSlider: fix snapPosition()J-P Nurmi2016-08-101-5/+11
| | | | | | | | | | | | | | | | | | 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. Task-number: QTBUG-55015 Change-Id: Ie30f7e86a10b606a59a171a4667772e446beaf39 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | ComboBox: ensure an update of the current text on data changeJ-P Nurmi2016-08-091-0/+20
| | | | | | | | | | | | Task-number: QTBUG-55118 Change-Id: I4edcd660a35d8b8719fc4c09719332d088859ffc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Page: take header & footer visibility into account in relayout()J-P Nurmi2016-08-091-0/+12
| | | | | | | | | | | | Task-number: QTBUG-55143 Change-Id: I4176d0f8902ee417fd5cb938b0f0902d480e80f6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | AppWindow: take header & footer visibility into account in relayout()J-P Nurmi2016-08-092-0/+99
| | | | | | | | | | | | Task-number: QTBUG-55143 Change-Id: I2acf8ca720df33a0417d850b5b0410ec9166dc89 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | SwipeDelegate: warn about horizontally anchoring background/contentItemMitch Curtis2016-08-021-0/+81
| | | | | | | | | | | | | | | | | | SwipeDelegate must have control over the x positions of these items in order to move them during swipes. Task-number: QTBUG-55040 Change-Id: Ie1e91fa4705cffe7573205279feff9bab048acd5 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Flickable TextArea: don't intercept input events outside visual boundsJ-P Nurmi2016-07-221-1/+23
| | | | | | | | | | | | Task-number: QTBUG-54897 Change-Id: I4e5cd0e175fa5dc2399bb80150ac538912a5b542 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Fix overlay event processing order for popupsJ-P Nurmi2016-07-222-0/+45
| | | | | | | | | | | | | | It should follow the stacking order of popups. Change-Id: Id5664496c60e99bdf0aa4b2dc6a2c94dba2c756a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Fix hover event handling for drawer overlaysJ-P Nurmi2016-07-222-0/+136
| | | | | | | | | | | | | | | | | | | | Closed drawers sit visible at the window edge to be able to pull them out. Don't block hover events when drawers are fully closed ie. when their overlays are fully translucent. Task-number: QTBUG-53419 Change-Id: I5bdbed5a2cf3ad6972634432ac79f7fbe5054b98 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Don't leak hover events through modal overlaysJ-P Nurmi2016-07-221-1/+13
| | | | | | | | | | | | Task-number: QTBUG-53419 Change-Id: I5c1ce684cff7954f9c011e991e3924741ad44367 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Don't leak hover events through popupsJ-P Nurmi2016-07-222-0/+119
| | | | | | | | | | | | Task-number: QTBUG-53419 Change-Id: Ia3e23538bfba09454c9b473d8394814890ada150 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Popups: fix overlay visibilityJ-P Nurmi2016-07-222-5/+9
| | | | | | | | | | | | | | | | | | | | Make sure popup overlay dimmers gets destroyed when popups are closed, and thus, re-parented out of the window overlay. The window overlay item is hidden when there are no child items, so this fixes the issue that the window overlay item was left visible after closing popups. Change-Id: Id2ffe43b706ffcc5cda83abd75354ef04f893745 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | testbench: center the window upon completion instead of using bindingsJ-P Nurmi2016-07-201-2/+5
| | | | | | | | | | | | | | | | | | The x/y bindings to screen center cause troubles when moving the window between screens. At least on OS X, the x/y bindings prevent moving the window to a second screen (it snaps back). Change-Id: I238e278c5338e926633be518143f22b5b18a4422 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | SwipeDelegate: vertically resize contentItem when swipe is completeMitch Curtis2016-07-151-0/+24
| | | | | | | | | | | | | | | | Otherwise the delegate's text doesn't change with height animations. Task-number: QTBUG-54780 Change-Id: I4e253b807e4765732a80100fca102b6650527948 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Improve unxpected signal warningMitch Curtis2016-07-141-1/+6
| | | | | | | | | | | | | | | | | | Give hints as to what could be the cause for the failure. A signal that is missing from the signals property will cause very confusing failure messages. Change-Id: Iefe7db2430b93ccc259a58482443d1116f67c456 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | SwipeDelegate: reposition contentItem, background on width changesMitch Curtis2016-07-121-0/+18
| | | | | | | | | | | | Change-Id: I6af4f1a4517e79f2e34b0bbca401b0eefd0c6ff4 Task-number: QTBUG-54660 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Drawer: fix dragMargin handlingJ-P Nurmi2016-07-111-0/+7
| | | | | | | | | | | | Change-Id: I7549509aef9a88af7e6a449bae52da273b0253d0 Task-number: QTBUG-54629 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickTextArea & -Field: fix double-click to select a wordJ-P Nurmi2016-07-112-0/+38
| | | | | | | | | | | | | | | | | | The delayed/intercepted mouse press event must be passed first, before letting the base class handle the double-click event. Change-Id: I029d06b0b619f34bb7be13ae12b8904f2efe6b5b Task-number: QTBUG-54615 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | SwipeDelegate: only consume child events if we grabbed the mouseMitch Curtis2016-07-081-0/+24
| | | | | | | | | | | | Change-Id: Ie808d06824e3bbdb36111625fbb5c59ee9d4e2a4 Task-number: QTBUG-54648 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Drawer: reposition when closedJ-P Nurmi2016-07-061-0/+25
| | | | | | | | | | | | | | | | | | A drawer must be repositioned even when closed, or else it will peek out when anchored to the right or bottom edge and the window is resized. Change-Id: Idf86ec1d841cfcc333eb6c69d07b3e4b2b4015da Task-number: QTBUG-54578 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Fix QQuickComboBox::textAt()J-P Nurmi2016-07-061-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | QQmlObjectModel::object() increases the reference count, and must be paired with QQmlObjectModel::release() to decrease the reference count when the object reference is no longer needed. When ComboBox model changed, previously created delegate instances weren't released as appropriate, because their reference counts were non-zero. Change-Id: I55d67b8baf3c00c1236155b1196a958b6db79e28 Task-number: QTBUG-54573 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | 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>
* | 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>
* | 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>