aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add ScrollViewJ-P Nurmi2017-01-2723-11/+1423
| | | | | | | | [ChangeLog][Controls][ScrollView] Added ScrollView. Change-Id: I5d68799f0246e04b519bf6a0ec7bc7e5625f50e7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QQuickScrollBarAttached: fix change listener removalJ-P Nurmi2017-01-272-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before bb2a6c6 QQuickScrollBarAttached called flickable->updateOrAddGeometryChangeListener(Size) when attaching to a Flickable, and flickable->removeItemChangeListener(Geometry) when detaching from a Flickable. In bb2a6c6 the latter was changed to flickable->updateOrRemoveGeometryChangeListener(listener, Size) to make the attach and detach operations nice and symmetric. Now the problem is that updateOrRemoveGeometryChangeListener(Size) doesn't actually remove the listener, but just resets the geometry types it listens to. Thus, upon destruction of QQuickScrollBarAttached, it leaves behind a dangling pointer in Flickable's list of change listeners. We can call either of these to fix the problem: flickable->updateOrRemoveGeometryChangeListener(Nothing) flickable->removeItemChangeListener(Geometry) The former does essentially the latter with some extra overhead, so we'll just revert back to how it was before bb2a6c6. I added a warning note, also to ScrollIndicator since it's using the same approach, to avoid the same pitfall in the future. Change-Id: Ibdce15b22edf549491426d769b74b18daf0500ca Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Keep track whether ScrollBar::interactive is explicitly setJ-P Nurmi2017-01-263-8/+26
| | | | | | | | | | The upcoming ScrollView toggles between interactive and non-interactive scroll bars depending on whether it is interacted via touch or a mouse device. This allows ScrollView to check whether the user or style explicitly requested a specific mode and respect it. Change-Id: I69d21652b3a91cb9db0f76ba52adc35ccd612ab1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-252-2/+16
|\ | | | | | | Change-Id: I83cbec9264a8bc620badf210eee53b57f2b93ff0
| * QQuickPopup: allow QQuickWindow as a parentJ-P Nurmi2017-01-242-2/+16
| | | | | | | | | | | | | | | | Previously it would unintuitively complain that "cannot find any window to open popup in" if a window was passed as a parent. Change-Id: I984d4c941afae12733a9c1c2f0441da867298aa1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickSpinBox: handle touch eventsJ-P Nurmi2017-01-242-37/+73
| | | | | | | | | | | | | | | | This makes it possible to interact with multiple spin boxes at the same time. Change-Id: I7161a05303384711c30651b495851d7e953e9e3f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Use keepTouchGrab instead of keepMouseGrab when handling touch eventsJ-P Nurmi2017-01-243-14/+17
| | | | | | | | | | Change-Id: I7ea3db90fbafea68c094d1525ee28972823960ac Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickSwitchDelegate: handle touch eventsJ-P Nurmi2017-01-243-24/+247
| | | | | | | | | | | | | | | | This makes it possible to interact with multiple switch delegates at the same time. Change-Id: I40d1f31d2e361665b2e09b3bb071832f3efcd75b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickSwitch: handle touch eventsJ-P Nurmi2017-01-243-24/+247
| | | | | | | | | | | | | | | | This makes it possible to interact with multiple switches at the same time. Change-Id: I1a8c2ff6ddb7e867b3d9d66f15c49ae5b70231e7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickAbstractButton: handle touch eventsJ-P Nurmi2017-01-247-1/+350
| | | | | | | | | | | | | | | | This makes it possible to interact with multiple buttons at the same time. Change-Id: Ice17efcb8b6dc5337455cd38ee88c39dfef2baae Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | tst_stackview: use TestCase's new createTemporaryObject functionsMitch Curtis2017-01-241-73/+27
| | | | | | | | | | | | | | | | This ensures that the appropriate objects are destroyed at the end of each test function, even if the test fails. Change-Id: I2e29bdcb7099875b3b746f930e94107c46e0a2e5 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | tst_combobox: use TestCase's new createTemporaryObject functionsMitch Curtis2017-01-241-94/+32
| | | | | | | | | | | | | | | | This ensures that the appropriate objects are destroyed at the end of each test function, even if the test fails. Change-Id: Ib807ed5197df390521084c384d4e6ed6eb44fffa Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | tst_tooltip: use TestCase's new createTemporaryObject functionsMitch Curtis2017-01-241-19/+7
| | | | | | | | | | | | | | | | This ensures that the appropriate objects are destroyed at the end of each test function, even if the test fails. Change-Id: Ic64c1cfa95229bf733e81f1a382e1961c4ab53d6 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Update plugins.qmltypesJ-P Nurmi2017-01-242-86/+309
| | | | | | | | | | Change-Id: Ic16c8e0796178bd99fc7dd8c965c0ed1de8da9d3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Update QtQuick.Templates import versions in the docsJ-P Nurmi2017-01-241-2/+2
| | | | | | | | | | Change-Id: I5ad6841a507c2488618ec3bf694249fb3b8b4d1c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Update dependencies.jsonJ-P Nurmi2017-01-242-3/+3
| | | | | | | | | | Change-Id: I5da3186533ae018da655e58078de18377d5113d0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Update IMPORT_VERSION in the .pro filesJ-P Nurmi2017-01-244-4/+4
| | | | | | | | | | Change-Id: I9546ee274e5376151e9f5faffda87182f2e10188 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add QQuickScrollBarAttachedPrivate::setFlickable()J-P Nurmi2017-01-232-48/+114
| | | | | | | | | | | | | | | | | | | | QQuickScrollBarAttached was assuming that a QQuickFlickable instance was passed to the constructor. This patch allows specifying it after the construction, making it possible for the upcoming ScrollView to use attached scrollbars. Change-Id: I7c434734f74df65af86263f09da6a46fa68fc946 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-234-0/+51
|\| | | | | | | Change-Id: I70bce420ae7d82d1bd72ff3d6c4f034525272aba
| * Fix resizing of implicitly created content itemsJ-P Nurmi2017-01-232-0/+13
| | | | | | | | | | | | | | | | | | Pane, Frame, and other container type of controls create their default content item lazily (commit 0e3636a). Under certain circumstances, the default content item was not resized as appropriate. Change-Id: Ia1f55030f62cc7b02c5bc770b4983f1240acf42d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickAbstractButton: don't leak space key eventsJ-P Nurmi2017-01-232-0/+38
| | | | | | | | | | | | | | | | Unlike mouse events, key events are not accepted by default. Key events must be accepted to avoid event propagation. Change-Id: I8d9217e6f18d56515470bef2507d462edd274ce2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickScrollBar: fix overshootJ-P Nurmi2017-01-202-8/+45
| | | | | | | | | | | | | | | | | | | | | | | | ScrollBar should not always force a range of 0.0-1.0, but only when interacted with. This way, the scrollbar stops at bounds when dragged, but flicking the attached Flickable respects its boundsBehavior and overshoots if appropriate. The logic and test is adapted from QQuickScrollIndicator commit 8d093a. Change-Id: Ida720d4cc2bb1de06ba0c02dfb25be51dd3108fc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add ScrollBar::policyJ-P Nurmi2017-01-208-7/+129
| | | | | | | | | | | | | | | | [ChangeLog][Controls][ScrollBar] Added a policy-property, which holds whether the scroll bar is shown always/never/as needed (default). Change-Id: Ibe25edaef04a7926bc12c59913efa7a3d43a5ccf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Move QQuickScrollBar(Attached)Private to a private headerJ-P Nurmi2017-01-204-75/+144
| | | | | | | | | | | | | | To make the private classes accessible for the upcoming ScrollView. Change-Id: Iae1d7f9b136a99ac5892418c52071a902e665476 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-2019-30/+170
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickswitch.cpp src/quicktemplates2/qquickswitchdelegate.cpp tests/auto/controls/data/tst_dialogbuttonbox.qml tests/auto/controls/data/tst_toolbutton.qml Change-Id: I1da1d6de83c1d9ac854dfce1d6c9d6ba2c460404
| * Adding stack view and swipe view to designer item libraryThomas Hartmann2017-01-185-0/+32
| | | | | | | | | | | | | | | | Adding stack view and swipe view to the view category. The icons are taken from stack layout and have no high dpi versions. Change-Id: I4009a9d06117bdd5d725c1c05c46ce7f99c368b5 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Adding round button to designer item libraryThomas Hartmann2017-01-175-0/+14
| | | | | | | | | | | | Change-Id: I6409a7036392af7bd160583a9d92982ce9876eac Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * QQuickSpinBox: enable/disable up/down buttons on range changesJ-P Nurmi2017-01-172-18/+53
| | | | | | | | | | | | | | | | | | | | Previously the buttons were enabled/disabled on range changes only if it caused the value to change. Make sure to update them also when the value does not change. Task-number: QTBUG-58217 Change-Id: Ibab5b8b7a58d5b88341c507a63b69f5a05fdfc1f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Merge remote-tracking branch 'origin/5.8.0' into 5.8Liang Qi2017-01-147-5/+63
| |\ | | | | | | | | | Change-Id: Ibad627dfcd3389aeddfe08a10d13097c88f081a1
| | * Switch(Delegate): fix handle snappingv5.8.0J-P Nurmi2017-01-124-4/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Switch is released, nextCheckState() gets called to set the appropriate check state depending on the handle position. If the check state does not change, it must force a position update to avoid that the handle is left somewhere in the middle. Task-number: QTBUG-57944 Change-Id: I872160dafaa7dbf676b026fcc6ba0d0507a91a05 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Implement QQuickDialogButtonBox::standardButton(StandardButton)Konstantin Ritt2017-01-052-1/+15
| | | | | | | | | | | | | | | Change-Id: I25935a069127a48c00dae951bc77665be6a429e1 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| | * Material: fix ComboBox drop indicator size on high-DPIJ-P Nurmi2017-01-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtdeclarative commit f8c53e88 (Fix high-DPI image and svg providers) changed the way high-DPI image providers work. For images using an image provider, we must now set the source size to get the desired device pixel ratio... The same was done for other indicators in qqc2 commit ca87ab8. Change-Id: I31f24786a6d3d3d06c3255864ed443cf8852a8de Task-number: QTBUG-57800 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Fix tst_toolbutton.qmlJ-P Nurmi2017-01-121-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | A copy-paste mistake. There's no such thing as Qt.LeftToolButton. It evaluated to undefined, and ended up using the default value Qt.LeftButton. Change-Id: Ie8d6714f663daa2bdfed2645a4fdc3e370e236ed Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | QQuickScrollIndicator: fix layouting on implicit size changesJ-P Nurmi2017-01-202-6/+28
| | | | | | | | | | | | | | | Change-Id: I440dbc1ef97486b6c9129802c2eda7f5d4ca0ebd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | QQuickScrollBar: fix layouting on implicit size changesJ-P Nurmi2017-01-202-6/+28
| | | | | | | | | | | | | | | Change-Id: I1816926e7f23324e6143db40d7352524737c0168 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | ScrollIndicator: fix memory leak when attached to a non-FlickableJ-P Nurmi2017-01-202-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | We must pass the attachee QObject as a parent instead of passing a qobject_casted QQuickFlickable, which may be a null pointer. Change-Id: I2e229ff59363246fc4515b1c7cbf1850dd2b1d43 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | ScrollBar: fix memory leak when attached to a non-FlickableJ-P Nurmi2017-01-202-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | We must pass the attachee QObject as a parent instead of passing a qobject_casted QQuickFlickable, which may be a null pointer. Change-Id: If3c785beac76ad989d12579e6d41062f4754ba2e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Add ScrollBar::interactiveJ-P Nurmi2017-01-206-18/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls][ScrollBar] Added an interactive-property. A non-interactive ScrollBar is visually and behaviorally similar to ScrollIndicator. This property is useful for switching between typical mouse- and touch-orientated UIs with interactive and non- interactive scroll bars, respectively. Change-Id: Ie98bfa0b5bba94a9751baf3c65f17b850b58fd1f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Cleanup QQuickTextAreaJ-P Nurmi2017-01-193-85/+78
| | | | | | | | | | | | | | | | | | | | | Same as the previous commit, but for QQuickTextArea. Change-Id: I8f0880ce51f81a403aa9752cb939716604e464ee Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Cleanup QQuickTextFieldJ-P Nurmi2017-01-193-60/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Organize QQuickTextFieldPrivate methods first, in the same order as they are declared in the header, and then the QQuickTextField methods, instead of mixing them randomly. Also, remove an empty destructor, and apply some cosmetic coding style tweaks, remove unused includes... Change-Id: I36c57c20419cca3aaf77f955a464c5ee0e4e3374 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Cleanup QQuickLabelJ-P Nurmi2017-01-193-19/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Organize QQuickLabelPrivate methods first, in the same order as they are declared in the header, and then the QQuickLabel methods, instead of mixing them randomly. Also, remove an empty destructor, declaration of a non-existing resizeBackground() method, apply some cosmetic coding style tweaks, remove an unused include... Change-Id: If9b956c857f9e5c0f8126aa3d398beab16031464 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Re-format constructorsJ-P Nurmi2017-01-1950-182/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was a bit inconsistent before. Admittedly the colon at the end was the most commonly used style in the quicktemplates2 code base, but some had a line-break before the colon. This is now chosen as the one true coding style of QQC2. ;) It makes the initializer list aligned so that it stands out from the constructor body. Change-Id: I66835e088df90d7219af04915176006d2a934ddc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Format initializer listsJ-P Nurmi2017-01-1936-171/+298
| | | | | | | | | | | | | | | | | | | | | | | | Initialize one member per line. Allow empty constructors with one initialized member on a single line. Change-Id: Ie115802561ebd19efd4dacda1fa868b64d279109 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | QtQuickControls2: Use the newly-introduced qmlWarning instead of qmlInfoRobin Burchell2017-01-1316-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | qmlInfo will shortly be returning info-level messages (as the name hints), rather than warning level messages. Change-Id: I94123464b12b30a4ba085cfb7b606bc26df9b76e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | tst_control: fix TestCase::mouseMove() usageJ-P Nurmi2017-01-1213-57/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | TestCase::mouseMove() does not take a mouse button argument. What we intended to pass as a button argument, was actually used as a 1ms delay (the value of Qt.LeftButton is 1). Change-Id: I5e6e6b05a521702e99418cceba2d0a7cdbc68109 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | QQuickScrollBar::snapModeChanged(): add missing revisionJ-P Nurmi2017-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The property was added in 04502964. The property is revisioned, but the revision was forgotten from the notifier signal. Change-Id: I0dd93149c917e4f5af22ecd8500851c245c672e4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | tst_controls: update import versions for controls and templatesJ-P Nurmi2017-01-1242-48/+48
| | | | | | | | | | | | | | | Change-Id: I104bc44c361351719449cab94dcb14c96e91e32f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Add attached StackView.visible propertyJ-P Nurmi2017-01-129-12/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls][StackView] Added attached StackView.visible property that can be used to control whether items below the top- most item are kept visible. Task-number: QTBUG-56801 Change-Id: Ieead0d476f254886cff5f8457bb5c5d23cb7de8a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Doc: be consistent about the dot at the end of example descriptionsJ-P Nurmi2017-01-112-2/+2
| | | | | | | | | | | | | | | Change-Id: Ie20ad311623020a439ecb701b0360fd72640fcb7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Add SwipeView::orientationJ-P Nurmi2017-01-116-4/+65
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls][SwipeView] Added orientation property. Task-number: QTBUG-56031 Change-Id: I4ed47d659ef83cb48f63b703b681bdf1b8662fe8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>