aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add ScrollViewJ-P Nurmi2017-01-2721-10/+1090
| | | | | | | | [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-251-2/+6
|\ | | | | | | Change-Id: I83cbec9264a8bc620badf210eee53b57f2b93ff0
| * QQuickPopup: allow QQuickWindow as a parentJ-P Nurmi2017-01-241-2/+6
| | | | | | | | | | | | | | | | 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-242-23/+46
| | | | | | | | | | | | | | | | 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-242-23/+46
| | | | | | | | | | | | | | | | 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-243-1/+64
| | | | | | | | | | | | | | | | This makes it possible to interact with multiple buttons at the same time. Change-Id: Ice17efcb8b6dc5337455cd38ee88c39dfef2baae Reviewed-by: Mitch Curtis <mitch.curtis@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-232-0/+3
|\| | | | | | | Change-Id: I70bce420ae7d82d1bd72ff3d6c4f034525272aba
| * Fix resizing of implicitly created content itemsJ-P Nurmi2017-01-231-0/+1
| | | | | | | | | | | | | | | | | | 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-231-0/+2
| | | | | | | | | | | | | | | | 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-201-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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-207-7/+104
| | | | | | | | | | | | | | | | [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-2014-21/+103
|\| | | | | | | | | | | | | | | | | | | 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-171-16/+32
| | | | | | | | | | | | | | | | | | | | 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-144-5/+25
| |\ | | | | | | | | | Change-Id: Ibad627dfcd3389aeddfe08a10d13097c88f081a1
| | * Switch(Delegate): fix handle snappingv5.8.0J-P Nurmi2017-01-122-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-051-1/+11
| | | | | | | | | | | | | | | 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>
* | | QQuickScrollIndicator: fix layouting on implicit size changesJ-P Nurmi2017-01-201-6/+24
| | | | | | | | | | | | | | | Change-Id: I440dbc1ef97486b6c9129802c2eda7f5d4ca0ebd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | QQuickScrollBar: fix layouting on implicit size changesJ-P Nurmi2017-01-201-6/+24
| | | | | | | | | | | | | | | 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-205-14/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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>
* | | 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>
* | | Add attached StackView.visible propertyJ-P Nurmi2017-01-128-12/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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>
* | | Add SwipeView::orientationJ-P Nurmi2017-01-115-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls][SwipeView] Added orientation property. Task-number: QTBUG-56031 Change-Id: I4ed47d659ef83cb48f63b703b681bdf1b8662fe8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Update the remaining copyright yearsJ-P Nurmi2017-01-1115-15/+15
| | | | | | | | | | | | | | | | | | | | | Already done in 5.8 (00a0626) - these files are new in dev. Change-Id: I534c7512a69d4c24ed9ce8191325556beb0fb1f7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-11566-570/+570
|\| | | | | | | | | | | Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
| * | Welcome to 2017J-P Nurmi2017-01-09569-569/+569
| | | | | | | | | | | | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | QQuickXxxPrivate::deleteDelegate(): don't store null pointersJ-P Nurmi2017-01-064-4/+4
| | | | | | | | | | | | | | | | | | | | | Avoid unnecessarily allocating extra data and/or pendingDeletions. Change-Id: I41d68af513c078a48bbe4f026bfe25e9c45ba3a8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Editors: fix placeholder text alignmentJ-P Nurmi2017-01-1010-12/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The internal QQuickPlaceholderText creates an "implicit binding" to the editor's horizontalAlignment, meaning that the placeholder respects the editor's horizontal alignment when explicitly set, and otherwise determines the alignment from the placeholder text's visual direction. [ChangeLog][Controls][TextField] Fixed the horizontal alignment of the placeholder text in right-to-left UIs. [ChangeLog][Controls][TextArea] Fixed the horizontal alignment of the placeholder text in right-to-left UIs. Task-number: QTBUG-55999 Change-Id: If1a8596c35c1920874996277520f1c54430c5f69 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Add ScrollBar::snapModeJ-P Nurmi2017-01-106-4/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls][ScrollBar] Added snapMode property incremental or discrete scrolling. Task-number: QTBUG-56569 Change-Id: Id0d463b85063a62b7df6307af8fe8b203155a5de Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Revise QScrollBar internalsJ-P Nurmi2017-01-102-10/+48
| | | | | | | | | | | | | | | | | | | | | | | | Move the press/move/release/ungrab logic from mouse event handlers to QQuickScrollBarPrivate methods that can be re-used for touch events. Change-Id: Id0b0f225a4f86a9d9cc8b77c9253001dd6c40bf4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>