aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Account for when a touch event is synthesized by Qt as a mouse eventAndy Shaw2020-02-072-0/+14
| | | | | | | | | | | | | | When a control is on a Flickable with a pressDelay then any press events sent from a touch device will be replayed as mouse events due to the delay. As a result we cannot depend on the fact that we got the first press as a touch event when checking if the id matches before accepting it. So we need to keep the previous pos when it is a synthesized mouse event so we can ensure the release is also accepted. Fixes: QTBUG-77202 Change-Id: I6f5d8506bd803daf834093e8fd412504150c4ca6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* DialogButtonBox: don't change button text that has been explicitly setMitch Curtis2020-02-031-2/+5
| | | | | | | | | | | If a custom button is declared in a DialogButtonBox, qsTr() will take care of translation, and so we shouldn't touch it. Amends c18c7bd7f9596e5ad3d13876a91203e1ceba2544. Change-Id: I06221002cf850882f5318cf0a3ed86da35274d0c Fixes: QTBUG-81796 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Copy Qt Quick Designer-related files also for static buildsKai Koehne2020-02-031-1/+1
| | | | | | | | | | | | | | | Make sure that the 'designer' directory is copied to the build directory, or installed, also for static builds. This reverts the !static condition introduced to fix a build breakage in 01d076d0e81e5 . Anyhow, I couldn't reproduce the original problem (QTBUG-51708), nor is it clear why it was caused by the static build. Fixes: QTBUG-75682 Change-Id: I47af3907e464d4fd9e9965ac28545b7350f450ee Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Follow QML2_IMPORT_PATH in path searchDavid Edmundson2020-01-291-0/+1
| | | | | | | | | | | | | When searching for styles we include QLibraryInfo::Qml2ImportsPath so it makes sense to continue that to also include the runtime QML2_IMPORT_PATH when searching for QQC2 themes. It used to be included, but in 5.14 this behavior changed as a result of 7db4df2deca52a30b4c068abd4683a1720cf281e, so this line is restored. Change-Id: I185b29b323d870fc724e655104eaf42034707738 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: fix RangeSlider errorsMitch Curtis2020-01-281-4/+4
| | | | | | | | | When the RangeSlider was copied into another file as a child item, it would produce errors about first and second being undefined. Change-Id: I0ecc9f6830509183a1b2b35e3faed5f06e78a0ef Fixes: QTBUG-80970 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* set placeholderText by default, not textTim Jenssen2020-01-281-2/+2
| | | | | | | Task-number: QDS-456 Change-Id: I05b7ce9efab851b99d12ba272a79bf9ba4443398 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Look for the fallback style in all of the style pathsAndy Shaw2020-01-271-1/+7
| | | | | | | Fixes: QTBUG-81216 Change-Id: I9d3efeec7f9ec2beda24ff74e39d04104f5eb967 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QQuickToolTip: prevent closing after invisible tooltip createdWang Chuan2020-01-111-2/+3
| | | | | | | | | | | | | Since all items using ToolTip attached property share the same ToolTip item, a dynamically created invisible Tooltip may unexpectedly close the current visible ToolTip. Fix this issue by checking the parent of ToolTip when trying to close it Fixes: QTBUG-78202 Change-Id: I0f6558040c6b8bf22240b0c94af912a43d525ed9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge remote-tracking branch 'origin/5.14.0' into 5.14Qt Forward Merge Bot2019-12-131-2/+7
|\ | | | | | | Change-Id: I94abb1fefa2943d363634a78be9523278c497256
| * Merge 5.14 into 5.14.0v5.14.0-rc2v5.14.0-rc1v5.14.0Kari Oikarinen2019-11-261-5/+12
| |\ | | | | | | | | | Change-Id: Ieaab5ab5723972fe3cdcb2245f53caad1ee63a5e
| * \ Merge 5.14 into 5.14.0Frederik Gladhorn2019-11-2112-51/+46
| |\ \ | | | | | | | | | | | | Change-Id: I579dc498300e06d747bdc4dba12f7ecd617b6608
| * | | Include the Android specific path for the importsAndy Shaw2019-11-151-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | androiddeployqt will put all the files originally in the assets into a rcc file now instead of having them copied over as before. Therefore the styles need to be searched for in that path to see if they exist. Fixes: QTBUG-79952 Change-Id: Ief8fc59257d3b329dd8b5b28190433e1b1a7f12d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | | | clang-tidy: fix readability-const-return-typeMitch Curtis2019-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The warning was: qquickimaginestyle.cpp:46:1: warning: return type 'const QString' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness [readability-const-return-type] Change-Id: Idcabe034f0e38a1b15b406d7bddc4662b6ea2261 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | clang-tidy: fix cppcoreguidelines-pro-type-member-initMitch Curtis2019-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that all members are initialized and remove an unused member. Change-Id: Ibfb3ea86b7791cd6f8683b68e7cd3bc4256b33f7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | StackView: fix an issue where the current item was hiddenMitch Curtis2019-12-121-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a StackView has an item A as the current item, calling replace(B) and then replace(A) would result in A being hidden when all transitions were finished. When an item is finishing its transition, we can check to see if that item exists in the stack (i.e. was pushed while it was transitioning), and if so, don't hide it. The patch is based on the one from Anthony Groyer. Fixes: QTBUG-57267 Change-Id: I441559c54a35c577261074bc7f0c923aeb3ca330 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | ComboBox: change currentIndex (if applicable) when focus is lostMitch Curtis2019-12-101-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the user enters text into an editable ComboBox that matches the text of an entry in the model, and then tabs out to another item, the currentIndex should be changed to that entry. This brings the behavior of ComboBox in line with QComboBox. Change-Id: Ibb1e201a503704681ebcbc7135d1964cc1f6bbca Fixes: QTBUG-78885 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | StackView: fix crash when recursively removing itemsMitch Curtis2019-12-052-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can happen when e.g. calling clear() in Component.onDestruction in response to a pop() call. The patch fixes the crash by warning and returning early. If users really need to do this, the clear() call can be delayed: Component.onDestruction: { Qt.callLater(function() { stackView.clear(StackView.Immediate) }) } Change-Id: If3cf07495bb34b96089522f44c36976bd6c62492 Fixes: QTBUG-80353 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | SplitView: fix hoverable child items breaking handle hover stateMitch Curtis2019-12-042-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detect HoverEnter events by filtering the mouse events of child items, and respond by clearing any hovered handle. Change-Id: Ice7e7fe3cc4c9224064c2384cd832e4a7d91c4da Fixes: QTBUG-79846 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | Respect user-set Accessible.nameMitch Curtis2019-12-0313-24/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check if the user has set Accessible.name before setting it to the control's text/title/etc. Fixes: QTBUG-66583 Change-Id: I8b2c8ab3f8a8ae8e76c8e6a241260b7f90eca254 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | | Doc: Fix qdoc warningsVenugopal Shivashankar2019-11-2678-145/+171
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The warnings were about: - Undocumented function parameters - Instances of \instantiates that us an internal class - A few link issues Task-number: QTBUG-79827 Change-Id: I60094279c7da6bc446b5c63b7b4924b71cee4672 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | QQuickPopup: fix focus when multiple popup exitingWang Chuan2019-11-251-5/+12
| |/ |/| | | | | | | | | | | | | | | | | | | | | When a focused Popup exited, it will try to transfer focus state to next Popup in chain or other item. However if there is an unfocused Popup exiting simultaneously, the focus state will be transferred to unfocused Popup, and this will cause loss of focus state since an unfocused Popup won't transfer its focus state to next Popup(or item) Fixes: QTBUG-79464 Change-Id: Ic06bd5a3616c8afbce449266e6fc24d2d54059d9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickTheme: get rid of stale codeKonstantin Ritt2019-11-182-4/+0
| | | | | | | | | | | | | | q_ptr isn't used any more Change-Id: Ib73b8310c13b9b0cca9b0b277b66bef444ceeda2 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Make ToolTips wrapMitch Curtis2019-11-155-5/+5
| | | | | | | | | | | | | | | | Otherwise the text will go outside the window. Change-Id: I3d50a195b1ee6c9b5d49952ef6c49d17c61372fa Fixes: QTBUG-62350 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | SplitView: refactor hover handling codeMitch Curtis2019-11-152-42/+36
| | | | | | | | | | | | | | | | | | | | | | - Don't unset the hovered flag only to potentially set it again. - Generally simplify the code. - Move it into a new updateHoveredHandle() function so that follow up patches can call it from other places. - Add more logging to debug hover issues. Change-Id: Iaf06cfe1f556a3f30bd0e883ef504b3df2dbc8e2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | SwipeView: fix issue where child items couldn't get focusMitch Curtis2019-11-153-0/+3
| | | | | | | | | | | | | | | | | | Set the focus property of the contentItem (ListView) to the focus property of the SwipeView itself. Change-Id: Ic410f7fb8db9fbb758b956dfe07e1b4265f5f687 Fixes: QTBUG-62401 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-11-141-0/+2
|\ \ | |/ |/| | | Change-Id: I2e33f9f4f508b98c26659574135fba9ff721d53b
| * Amend d1fec8f050fc8f60b2cc2bf0e22a1e478f0e9048 to account for the theme5.13Andy Shaw2019-11-111-0/+2
| | | | | | | | | | | | Fixes: QTBUG-79929 Change-Id: I153684fa9c4e40d220986391671b0945b66393e1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-11-086-4/+29
|\| | | | | | | Change-Id: I551670d92af2bc96d5d8b8724bf5b280e94498c7
| * Unset the resolved font's families if it was not set beforeAndy Shaw2019-11-085-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | When the font is resolved, if the font does not have families set then it will set it to be the family to ensure that it has the right precedence. Therefore we need to reset the families setting so that it does not act like a font has changed after being resolved when it really hasn't. Fixes: QTBUG-79790 Change-Id: I03c6f1456dbe5f136181b1c3a0e22fdc0fa66679 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Doc: advise against naming root resource dirs the same as style namesMitch Curtis2019-11-071-0/+7
| | | | | | | | | | | | | | Task-number: QTBUG-59330 Change-Id: Ie983f27f2eca0bc9c906fb7bcfe9e077616ef88b Reviewed-by: Kavindra Palaraja <kpalaraja@luxoft.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14v5.14.0-beta3Qt Forward Merge Bot2019-11-051497-0/+0
|\| | | | | | | Change-Id: I4b970036bdb5d312b0dc5cb1bcbd8e161e3d4c7e
| * Run optipng on all imagesMitch Curtis2019-11-041497-0/+0
| | | | | | | | | | | | | | | | find . -name "*.png" -exec optipng -o 7 -strip all {} \; Change-Id: I2238b2dd38813d33ed48d79817f872f922cfa28d Fixes: QTBUG-79275 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-11-043-2/+9
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ibf7cf09570e73ad2f314e9ce7acf1c766ac3f332
| * QQuickPopup: try to grab shortcut when component completedWang Chuan2019-10-291-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If closePolicy of Popup is set to CloseOnEscape and the Popup is completed, shortcut will register to QGuiApplication to let Popup respond to Escape key. However if Popup is set to visible in creation, even if we set closePolicy to CloseOnEscape, the shortcut won't be registered. [ChangeLog][Controls][QQuickPopup] Fixed the issue that Popup doesn't respond to CloseOnEscape if the initial value of visible is true Fixes: QTBUG-79326 Change-Id: I90c6805e2b4d567a6e0d33d43a75fedcfc5416b3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Doc: Fix import statement for QtQuick.TemplatesKai Koehne2019-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | Always show the latest Qt Minor version in the import statements for modules in QtQuick.Templates. For QtQuick.Controls this was fixed in commit b395f94. Fixes: QTBUG-76077 Change-Id: I0d63337f572fd23f0122df151f01bef2c8eab1dd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * SplitView: fix issue where Repeater items were not createdMitch Curtis2019-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SplitView's contentItem is lazily created whenever contentItem() is called. When adding regular, standalone items, they will go through QQuickContainer::addItem(), which eventually calls contentItem(). This case works fine. Repeaters, on the other hand, call setTransparentForPositioner(true), which QQuickContainerPrivate::contentData_append() checks for, and instead of calling addItem(), reparents the Repeater to effectiveContentItem() with this line: item->setParentItem(effectiveContentItem(p->contentItem)); If this happens before the contentItem is created, then the Repeater has no parentItem and won't generate any items. So, instead of using the contentItem member directly, call contentItem() to create it if it doesn't exist. Fixes: QTBUG-79302 Change-Id: I258f7420d2fea843ed045d569f80e92fe1f507d2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-265-27/+26
|\| | | | | | | Change-Id: I5da24592eb292ef4f430d734fec234166ce6e1e3
| * Docs: Update qmlmodule to use QtMinorVersion so that this version is always ↵Kavindra Palaraja2019-10-251-1/+1
| | | | | | | | | | | | | | | | | | up to date Fixes: QTBUG-76077 Change-Id: Ica06051a8ca5dc3858110f5eef47fec20bd2d2c1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickContainer: stop creating duplicate content itemsMitch Curtis2019-10-242-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | In most cases, getContentItem() will create a new content item when called. In addition, its only responsibility is to return the content item, not set it as the control's new contentItem; QQuickControl::contentItem() does that. Instead, QQuickContainer should simply call contentItem(). Change-Id: I1b8cb57f9f7b9e56074e99bed20ce5bcac70e1a6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| * SplitView: fix cursor shape staying as Split*Cursor in some casesMitch Curtis2019-10-241-15/+11
| | | | | | | | | | | | | | | | | | | | | | Don't return early before restoring the ArrowCursor shape. This is not testable in QML due to QWindow's cursor API not being available there. Task-number: QTBUG-79302 Change-Id: Idb59d9cfbf04fc12ebe0adfbb7285ae7155e195d Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| * QQuickMenuBar: let MenuBarItem lose highlight when Menu is dismissedWang Chuan2019-10-242-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When adding new MenuBarItem to MenuBar, MenuBar will first check the Menu pointer in MenuBarItem and then connect the Menu's signal [aboutToHide] to MenuBar's slot [onMenuAboutToHide] to unhighlight the MenuBarItem. In case of adding dynamic Menu, this operation will be performed before setting new Menu to MenuBarItem. So the Menu pointer in MenuBarItem is null, and the connection will not be performed. [ChangeLog][Controls][QQuickMenuBar] Fixed issue with dynamically menu bar items not losing their highlight when their menu was dismissed. Fixes: QTBUG-77306 Change-Id: Ibe987462505f65747b4290b3c206e9dfbcbbef57 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Fix assertion failure when hiding a SplitView with only one itemMitch Curtis2019-10-231-4/+8
| | | | | | | | | | | | | | | | Check for -1 when calling handleIndexForSplitIndex(). Change-Id: I81021b64265ace0c47269ea54e538a2725c84b79 Fixes: QTBUG-79270 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Update plugins.qmltypes for 5.14Kai Koehne2019-10-217-7/+2549
| | | | | | | | | | | | Task-number: QTBUG-78690 Change-Id: I0e421232f4335a7a351562f23134eccdd0b1c674 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Adapt Tumbler after ListView changesv5.14.0-beta2Mitch Curtis2019-10-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After 2d9cf3ef, ListView now changes the currentIndex for some unknown reason. The changes clearly didn't cause any failures in Qt Quick's auto tests, but some Tumbler auto tests fail. Presumably, the failures are due to TumblerView's intimate usage of Qt Quick's C++ API, where it creates either a PathView or a ListView on demand internally. From what I could see, the currentIndex change was caused by this code: if (FxViewItem *snapItem = d->snapItemAt(d->highlight->position())) { if (snapItem->index >= 0 && snapItem->index != d->currentIndex) d->updateCurrent(snapItem->index); } So I worked around the issue by delaying the call to setHighlightRangeMode() until after the delegate has been created. I also tried moving the call to setSnapMode() (which seems very relevant given the context), but it caused test failures. Change-Id: I7017760c21193dc6ce8181669ba7cf047b18dfba Fixes: QTBUG-79150 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-122-14/+28
|\| | | | | | | Change-Id: I0b00323007dc02adf98dc581e2694e44b298da29
| * Universal: disable wrapping for TabBarMitch Curtis2019-10-111-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | The wrapping behavior makes for a poor user experience. Use ListView as other styles do. [ChangeLog][Universal][TabBar] Disabled wrapping. The Universal style TabBar now behaves like TabBar from other styles. Change-Id: I0a37490cdc2b81ff864ec682256f469a1a930628 Fixes: QTBUG-50027 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * Imagine: fix crash when switching between 9-patch and regular imageMitch Curtis2019-10-021-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider the following changes in source: normal.png => press.9.png => normal.png => focus.png If the last two events happen quickly, pixmapChange() can be called twice with no call to updatePaintNode() inbetween. On the first call, resetNode will be true (because ninePatch is not null since it is still in the process of going from a 9-patch image to a regular image), and on the second call, resetNode would be false if we didn't have this check. This results in the oldNode never being deleted, and QQuickImage tries to static_cast a QQuickNinePatchImage to a QSGInternalImageNode. Only change resetNode when it's false; i.e. when no reset is pending. updatePaintNode() will take care of setting it to false if it's true. Change-Id: I614c172c3e24fda2506f081f8fcdb6acd1c65fb8 Fixes: QTBUG-78790 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Minor performance improvements suggested by clang-tidyAlbert Astals Cid2019-10-076-6/+6
| | | | | | | | | | | | | | | | * Add const & to function parameters * Add const & to variables assigned from functions that return const & Change-Id: Ibf35e54ffb78f164493222125411f2ba279cb861 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | ComboBox: fix performance regressionv5.14.0-beta1Mitch Curtis2019-10-011-24/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f4623123 introduced a performance regression by calling delegateModel->object() twice: if (componentComplete) { updateCurrentText(); updateCurrentValue(); } We can avoid this by introducing versions of these functions that take the delegate model object as a parameter in order to cache it between calls. Change-Id: I5f9041a8ff00b53e04d759f38677bd87c748f8d1 Fixes: QTBUG-76029 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-014-5/+21
|\| | | | | | | Change-Id: I53fc18c168daff6dfb504e5a64e20570de7d24ac