aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-0412-37/+43
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ib55ecb95e5ae47cc7a46f136a2f2eb158676ea34
| * Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-07-0412-37/+43
| |\ | | | | | | | | | | | | | | | | | | | | | 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-153-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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>
| | * Material: account for accent color in flat highlighted button's rippleKonstantin Ritt2019-05-211-2/+1
| | | | | | | | | | | | | | | | | | | | | According to https://material.io/design/components/buttons.html#text-button Change-Id: Ia36a676864a8f738d204cf8db9430b797f1f2f99 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * doc - use the correct attributions fileKavindra Palaraja2019-05-201-1/+1
| | | | | | | | | | | | | | | Change-Id: Ib83e2ec925e0c37b40562aea7f11e09759ce3abc Reviewed-by: Kai Koehne <kai.koehne@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>
| | * CursorDelegate: stop cursor timer when interval is set to 0Richard Moe Gustavsen2019-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cursor flash iterval can sometimes be set to 0. This is done from e.g the iOS plugin while selecting text, since the cursor should not flash when the user is dragging it around inside a magnifier glass. Setting the interval to 0 simply means "don't flash", rather than "hide the cursor". But setting the interval of a QML Timer to 0 will cause it to never trigger, which is not what we want, since then the cursor can end up staying hidden if done in-between two "flashes". This patch will add an extra condition that checks for this case. Fixes: QTBUG-75844 Change-Id: Ib1ca594a49a18cb161a2b2a67928fb6766984988 Reviewed-by: Shawn Rutledge <shawn.rutledge@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>
* | | | Fix installation of .png filesJoerg Bornemann2019-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The content of AUX_QML_FILES must consist of valid file paths, not wildcard patterns. The wildcard will produce an invalid installation rule, and since qtbase/20e9422e069a27b7e29b54207447e6ca02b3a55a we're not ignoring installation errors anymore. Fixes: QTBUG-76378 Change-Id: I8498e3559c97cf502cf8b1a5823f1a6775ee2400 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@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>
* | | Qualify unqualified id lookup in controlsFabian Kosmale2019-06-1156-169/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a preparation for https://codereview.qt-project.org/c/qt/qtdeclarative/+/259561 and also avoids walking up the contexts Change-Id: I9f016b7346db088dfe1519924c9770e486b46ec9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Fix deprecation warning about qmlAttachedPropertiesObject()Friedemann Kleint2019-05-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fix: quickattachedobject.cpp:52:103: warning: ‘QObject* QtQml::qmlAttachedPropertiesObject(int*, const QObject*, const QMetaObject*, bool)’ is deprecated [-Wdeprecated-declarations] Change-Id: I3579dfd0c45849c70403b6cd573493f0022c8ddd Reviewed-by: Ulf Hermann <ulf.hermann@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-239-52/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-168-12/+58
|\| | | | | | | | | | | 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>
| * | Update plugins.qmltypes for QtQuick.TemplatesKai Koehne2019-04-122-3/+2
| | | | | | | | | | | | | | | | | | | | | This amends 1693a19fd557c857ef4f43ab303ea1056790481e Change-Id: I1c23d8a859e2cc2b878ddf2b6e7df35755abde22 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Update plugins.qmltypes for QtQuick.ControlsKai Koehne2019-04-112-2/+2
| | | | | | | | | | | | | | | | | | | | | This amends 1693a19fd557c857ef4f43ab303ea1056790481e Change-Id: I70ef68de56405eb705d1c79be4eed8925def319a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-095-4/+6
|\| | | | | | | | | | | Change-Id: Icc0bf6680e7c329a797f9924c283023a3d42b93a
| * | Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta2Qt Forward Merge Bot2019-04-065-4/+6
| |\| | | | | | | | | | Change-Id: I5b112e0e4021191c387da86bb5b0477fe0c4da30
| | * Doc: Add the moduleheader informationVenugopal Shivashankar2019-04-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although the doc project is named QtQuickControls, the repo is still called qtquickcontrols2 and the exported headers are installed under QT_INSTALL_PREFIX/include/QtQuickControls2. By default, Qdoc tries to look for the headers in a directory that matches the doc project name, which is not the right include directory in this case. Change-Id: I77889fe35c028a2fc903d49b571a564c57326c21 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Fix typo in ScrollBar's documentationMitch Curtis2019-03-281-1/+1
| | | | | | | | | | | | | | | Change-Id: I3a26f24ad16f6330715ce62151895f28e4b856d3 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * Default: fix highlighted ItemDelegate colorsMitch Curtis2019-03-273-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make ItemDelegate respect highlightedText - Change ItemDelegate's highlightedText palette role from white to almost black (i.e inversion of "light" which is 0xFF090909), so that text shows up against a highlighted background. This also allows easily switching ComboBox to a dark style via palette customization. Fixes: QTBUG-72786 Fixes: QTBUG-74678 Change-Id: I5ad0d86de112f869edf0488d06bb308cdc900363 Reviewed-by: Massimo Callegari <massimocallegari@yahoo.it> Reviewed-by: Mitch Curtis <mitch.curtis@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>