aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.12' into 5.15Liang Qi2019-09-063-19/+19
|\ | | | | | | Change-Id: If5c2806e52efc9608e476c3f068ee5a0e67ffff7
| * ComboBox: document the behavior surrounding the accepted() signalMitch Curtis2019-09-061-18/+17
| | | | | | | | | | | | | | | | Change-Id: I65be8e54ded284d2f80b5a1f301b75223bd81bb3 Fixes: QTBUG-75338 Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * QQuickPopup: fix compiler warningKonstantin Ritt2019-09-051-0/+1
| | | | | | | | | | | | | | | | > warning: unannotated fall-through between switch labels > note: insert 'break;' to avoid fall-through Change-Id: Ia70fb6b666f874a245a113d61a6cb3e8e7aa2712 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Minor typo fixKonstantin Ritt2019-09-051-1/+1
| | | | | | | | | | Change-Id: I335e59f09c48a8b52c7f690cedba95952c5adfa3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-08-031-3/+7
|\ \ | | | | | | | | | Change-Id: I629cb2b733de2e5533d8ba9f1665d14f542979b9
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-301-3/+7
| |\| | | | | | | | | | Change-Id: Ib1c507845cae7f354fe5a5fb9d71ee6963949bd0
| | * QQuickTextArea: prevent changing size of background recursivelyWang Chuan2019-07-241-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the x/y position of background depends on the height/width of background and these values are not constant, the if statement in the method resizeBackground() will always pass. And since a change listener is set before calling setHeight()/setWidth() in background, these two method will always call resizeBackground() and then call themself recursively, that means the height/width of background will always be reset, no matter what value you set. [ChangeLog][QtQuick][QQuickTextArea] defer adding change listener and prevent changing size of background recursively in construction Fixes: QTBUG-76369 Change-Id: I2ec37cad7f35cb1c756276326fe69e860c6b8de5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-131-0/+1
|\| | | | | | | | | | | Change-Id: I76bfa11f39261e03b52ad237a09ff623bc865e0f
| * | QQuickComboBox: emit countChanged signal when model is updatedWang Chuan2019-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick][QQuickComboBox] countChanged signal now will be emitted when a new model is set to the ComboBox Fixes: QTBUG-75972 Change-Id: Ic26718453ba06ba284ac5903fc6f55ddf3523331 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-048-32/+37
|\| | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ib55ecb95e5ae47cc7a46f136a2f2eb158676ea34
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-07-048-32/+37
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/accessibility/tst_accessibility.cpp Change-Id: I0bc187e2a8edb4e357c1bf114dd9b1977d5c1e45
| | * Fix crash in QQuickContainerPrivate::removeItemJüri Valdmann2019-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The count variable should be updated after removing the item. Fixes: QTBUG-76164 Change-Id: I141d720ffaa890002d98a7d2448adca9a7d7d2f3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Doc: correct name of property in snippetNico Vertriest2019-06-181-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-75558 Change-Id: Ic9856c6f6da4e0beefe2fe6f1bbaea8fdd67ea0d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * Doc: Add specs about focus propertyNico Vertriest2019-06-181-0/+13
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-75546 Change-Id: I6e672c3a8390c4cf10dc9576cc3bf1eb10a6246b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * Accessibility: Remove redundant checkbox role codeFrederik Gladhorn2019-06-132-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | To make switch work, the base class now returns checkbox when it has the checkable property. With that change, this is no longer needed. Change-Id: I41d8f774cb244f922b859fd9f2dde75913e965b6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | * Accessibility: Switch should have checkbox as roleFrederik Gladhorn2019-06-131-0/+4
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-76356 Change-Id: I8f8e8331adbe741be2c893f2140d793d1b901434 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Doc: Fix documentation warnings for Qt Quick Controls 2Topi Reinio2019-01-152-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The correct module header name is QtQuickControls2 - Add dependency to qtgraphicaleffetcs - RangeSlider: Move \qmlsignal commands out of \qmlpropertygroup - Fix linking to content[Width|Height] for ScrollView Change-Id: I1636fef5f4365a8e9f80b0b8df17e78999bfd3f8 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Don't unnecessarily transform keysequences into stringsUlf Hermann2019-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we cannot interpret them as the original key sequence anymore. When passing them on they are interpreted as the number key that represents the numeric value of the key sequence enum. Change-Id: Idd94ef95bc693cb6d51162dd1994adc953b52e25 Fixes: QTBUG-75572 Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Container: Keep currentIndex at 0 when removing item 0 if possibleJüri Valdmann2019-05-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current behavior is to always decrement the currentIndex when the current item is removed -- even when the current item is item 0. This means, for example, that in a TabBar with three tabs and the first tab selected closing the first tab will leave nothing at all selected. Change behavior to keep currentIndex at 0 if there are still items left in the container. Now closing the first tab will leave the next remaining tab selected. Change-Id: If4e1903366e29fcee8226b776d5b2e03cec189df Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-06-221-6/+6
|\| | | | | | | | | | | Change-Id: I969e9957826a0e74650ae31b10cf8ca550f32891
| * | Merge remote-tracking branch 'origin/5.13.0' into 5.13Qt Forward Merge Bot2019-06-201-6/+6
| |\ \ | | | | | | | | | | | | Change-Id: I76cc3f99ecaca3eebe49fd129e3b3562ebd6ea09
| | * | Doc: fix import versions in SplitView documentationv5.13.0-rc3v5.13.0-rc2v5.13.0Mitch Curtis2019-06-041-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib491000bf2751f24e3dc635958bdf997193c225e Fixes: QTBUG-76077 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-06-151-4/+4
|\| | | | | | | | | | | | | | | Change-Id: Id8cb931daffd3dd0f75c283a9adb98ddc976973b
| * | | SplitView: fix preferredHeight not being restored in restoreState()Mitch Curtis2019-06-101-4/+4
| |/ / | | | | | | | | | | | | Change-Id: Icc236494f5df382d6bc49092d23a460822c835a1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-05-113-9/+26
|\| | | | | | | | | | | Change-Id: I2d9537a060ecbed1cc51dbebcc20b09753e41330
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-043-9/+26
| |\| | | | | | | | | | Change-Id: I1ec3d930d4131ba6d1de687250c0f4f698946af4
| | * Fix MenuItem width not matching Menu's available widthMitch Curtis2019-05-031-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Short version: There are currently two problems with MenuItems: - Mirrored MenuItems don't fill the Menu's available width. - MenuItem does not fill the Menu's available width when changed after Component completion. This patch fixes both of them by listening to geometry changes in both the contentItem and individual menu items, and setting the explicit width of those menu items when either changes. Longer version: The first problem can be seen whenever the MenuItem's implicitWidth changes: - QQmlEngine::retranslate() is called, causing all bindings to be re-evaluated - The MenuItem's font size changes - The MenuItem's icon size changes - etc. We fix this by making Menu listen to the width of each of its MenuItems and call resizeItem() if it doesn't have an explicit width. The second problem can be seen when e.g. resizing a Menu to account for new items that are wider and hence require more space. This can be fixed by listening to width changes in Menu's contentItem, which was actually done in earlier versions but (probably accidentally) removed in 482ecb0f. I had tried to solve both issues by setting the explicit width of MenuItem to the width of its Menu, or undefined if it has none (which means it reverts to its implicit width). However, this does not account for e.g. MenuSeparator and custom items that can be added to Menu - they should also have their width fill the Menu automatically if they don't have an explicit width set. Change-Id: I95dd0da0919a1e297f2e2030da746ff1f1a17644 Fixes: QTBUG-75051 Fixes: QTBUG-75142 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * Doc: bindings to x/y/width/height of contentItem aren't respectedMitch Curtis2019-05-031-2/+3
| | | | | | | | | | | | | | | | | | Change-Id: Idecee26bcae178ed294c062819f55e12a65af37d Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Doc: fix currentText link, add more \sa linksMitch Curtis2019-05-021-3/+3
| | | | | | | | | | | | | | | Change-Id: Ibde952a165c9e0fb40133ce554e90ba35c93feee Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Include qstack.h in qquickstackview_p_p.hUlf Hermann2019-05-081-0/+1
| | | | | | | | | | | | | | | | | | | | | We use QStack below. Change-Id: Ife39904e4e075a9ca5d79a529ca7abd3e3c74fce Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | quicktemplates2: Fix compilationFriedemann Kleint2019-05-034-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | After qtdeclarative/325e6305b418ffe1dfb9a36c2516c6a8a3de5733, QML models are in a new module. Change-Id: Ifa98380d4febd212628fb4007a3cc9dce98c995b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-272-3/+17
|\| | | | | | | | | | | Change-Id: I26d74fad831ec1379b88742c577fea9e6b02f456
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-251-1/+15
| |\| | | | | | | | | | Change-Id: Ibf39232616ea6ef67242b70011aa683ce8dc0b4f
| | * ScrollBar: fix value not changing when scrolling via VoiceOverMitch Curtis2019-04-241-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | Connect to the QQuickAccessibleAttached::increaseAction() and QQuickAccessibleAttached::decreaseAction() signals. Change-Id: I9d6b37ac68d8790edcb3d4d72f155ec8511cabe2 Fixes: QTBUG-75072 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * | Fix building with qreal floatJeremy Powell2019-04-231-2/+2
| | | | | | | | | | | | | | | Change-Id: I02ebf4277142ef426194da0992b3348bd3c83998 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Add valueRole API to ComboBoxMitch Curtis2019-04-232-21/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the user to conveniently manage data for a role associated with the text role. A common example of this is an enum stored in a backend with nicely formatted text displayed to the user. Before this patch, developers would have to write code like this: ComboBox { textRole: "text" onActivated: backend.modifier = model[currentIndex].value Component.onCompleted: currentIndex = findValue(backend.modifier) model: [ { value: Qt.NoModifier, text: qsTr("No modifier") }, { value: Qt.ShiftModifier, text: qsTr("Shift") }, { value: Qt.ControlModifier, text: qsTr("Control") } ] function findValue(value) { for (var i = 0; i < model.length; ++i) { if (model[i].value === value) return i } return -1 } } With this patch, the code becomes much simpler: ComboBox { textRole: "text" valueRole: "value" onActivated: backend.modifier = currentValue Component.onCompleted: currentIndex = indexOfValue(backend.modifier) model: [ { value: Qt.NoModifier, text: qsTr("No modifier") }, { value: Qt.ShiftModifier, text: qsTr("Shift") }, { value: Qt.ControlModifier, text: qsTr("Control") } ] } [ChangeLog][Controls][ComboBox] Added valueRole, currentValue and indexOfValue(). These allow convenient management of data for a role associated with the text role. Change-Id: I0ed19bd0ba9cf6b044a8113ff1a8782d43065449 Fixes: QTBUG-73491 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-164-7/+54
|\| | | | | | | | | | | Change-Id: Ica87b5aac6a7ca335acd9c5da998cc1831347420
| * | Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta3Qt Forward Merge Bot2019-04-134-7/+54
| |\| | | | | | | | | | Change-Id: Ice7d2ed56c85521a946b218d84087b255d3613ae
| | * QQuickComboBox: don't hide popup if focusedAlberto Mardegan2019-04-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ComboBox popup should be closed when the ComboBox loses focus, but not if the control gaining focus is the popup itself. While all the styles implemented in this module implement the ComboBox popup as an unfocusable window and handle all the keyboard events in QQuickComboBox itself, the developer can choose to replace the popup with a custom implementation, which might need the keyboard focus. Fixes: QTBUG-74661 Change-Id: I838ab9cb697df63ea2099e68f1ae99eadb06be08 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * Doc: expand upon Pane's Content Sizing sectionMitch Curtis2019-04-081-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Mention what happens if its contentItem has no implicit size and only one child item. Change-Id: I646ca2baad89ac195836268b14108b43beaec2bf Fixes: QTBUG-69096 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * Doc: add a Size section to explain StackView's sizing behaviorMitch Curtis2019-04-081-0/+29
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-74902 Change-Id: I3f77459028de48729bb78353d8d95e92c7fc98f6 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * SpinBox: fix indicators being hovered when mouse is moved while pressedMitch Curtis2019-04-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We also need to update the hovered state of each indicator when the mouse is moved while pressed, not just when we get hover move events. Change-Id: I6fa71344fd540f648683958e5804ae735523e72d Fixes: QTBUG-74688 Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-091-1/+1
|\| | | | | | | | | | | Change-Id: Icc0bf6680e7c329a797f9924c283023a3d42b93a
| * | Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta2Qt Forward Merge Bot2019-04-061-1/+1
| |\| | | | | | | | | | Change-Id: I5b112e0e4021191c387da86bb5b0477fe0c4da30
| | * Fix typo in ScrollBar's documentationMitch Curtis2019-03-281-1/+1
| | | | | | | | | | | | | | | Change-Id: I3a26f24ad16f6330715ce62151895f28e4b856d3 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Fix broken buildMitch Curtis2019-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove the override keyword from QQuickComboBoxDelegateModel::stringValue() as the function is no longer virtual, and a change in dev will fix this properly once a qt5.git submodule update happens. - Temporarily skip any failing ComboBox tests that result from the previous step. Task-number: QTBUG-74919 Change-Id: If57bfbd1c8b253cb9ad3bfad4b5f9b9a271744ab Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-302-6/+18
|\| | | | | | | | | | | Change-Id: Iede101fc3931d918c1796eb32fd6352e3b2f3b68
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-272-6/+18
| |\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I37f9f88a11946d5d67935c682273eb0aa8593f9b
| | * DialogButtonBox: don't sort buttons based on their memory addressesMitch Curtis2019-03-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When two buttons' roles are equal, the code would fall back to comparing the buttons' memory addresses. This leads to random results, which are especially noticeable on Windows and with release builds. This patch fixes the issue by instead returning false if the roles are equal. This still satisfies the "comp(a,a)==false" requirement of strict weak ordering: https://en.cppreference.com/w/cpp/named_req/Compare The patch also changes the sorting algorithm used from std::sort() to std::stable_sort(). Although it doesn't appear to be necessary from the testing that I did, it is good to ensure that the order of equal elements is maintained. Fixes: QTBUG-70451 Change-Id: I47561604108b12bf8ec0c794a2372767f0b2e04e Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * QQuickComboBox: ensure we don't close popup on iOSRichard Moe Gustavsen2019-03-211-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On iOS (and Android), we give focus to a control on touch release (rather than on touch begin, which is normal on desktop). For a QQuickCombobox, this means that we will both handle focus and open the popup on touch release, and not focus on touch begin and open popup on touch release, like on desktop. Because of this, we need to be more careful about when we choose to close the popup as well, otherwise it will close down before it gets a chance to show on iOS. This patch will check why we lose focus on both the inner line edit and the combobox itself, and based on this, choose whether we should close the popup. Basically, if focus is just transferred between the popup button and the line edit, we choose to keep the popup open. Fixes: QTBUG-70161 Change-Id: Iec242c0b5570844868085480fdf96fc49d189b82 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>