summaryrefslogtreecommitdiff
path: root/src/controls/Private
Commit message (Collapse)AuthorAgeFilesLines
* Don't specify null to indicate an invalid QModelIndexAndy Shaw2019-05-201-1/+1
| | | | | | | | | | | | Since this call is done on the C++ side, there is no means to equate null as being the same as QModelIndex(). As that is the default value when calling index(), we can just drop the argument in this case. Change-Id: I97b80064978b7af01f0606ed6f3778349adc4277 Fixes: QTBUG-74523 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update the CalendarHeaderModel when changing the locale setAndy Shaw2019-02-201-2/+5
| | | | | | Change-Id: I8af18ebfcc77f6080cfd5f0cade5042d0cd4a9a4 Fixes: QTBUG-73765 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix incorrect transientScrollBars binding in BasicTableViewShawn Rutledge2019-01-281-2/+2
| | | | | | Fixes: QTBUG-69041 Change-Id: I7ad62850c8890d7ec53678754a164ad2bcfbdb8e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Calendar: Ignore any time specified for a minimum and maximum dateAndy Shaw2019-01-142-20/+23
| | | | | | | | | | | | Since Calendar only cares about the date part and not the time, we should ignore the time part when it is set as the minimum and maximum and manually set it to 0:00:00 and 23:59:59 respectively. This ensures that the day itself is still seen as valid irrespective of what time was passed to Date(). Change-Id: I57c311ffe7d3fb1ab69c59296a067a66f1007137 Fixes: QTBUG-71997 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Insert before next item when it existsAllan Sandfeld Jensen2018-12-101-2/+9
| | | | | | | | | | | Something is off about the way the last child of previous item is calculated, but we can work-around that by just using the next element when it exist. In the case there isn't a next element, we will hit the fallback in 'last child of previous' and insert at the end anyway. Fixes: QTBUG-66062 Change-Id: Iced69d52c4587434ffdbb09b08b3441289f34eba Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.12.0' into 5.12" into ↵Qt Forward Merge Bot2018-12-051-1/+1
|\ | | | | | | refs/staging/5.12
| * Merge remote-tracking branch 'origin/5.12.0' into 5.12Qt Forward Merge Bot2018-12-051-1/+1
| |\ | | | | | | | | | Change-Id: I253bdcb4f9847a73165196599341dab03e291fc1
| | * Fix button menus not opening on the second attemptv5.12.0-rc2v5.12.05.12.0Mitch Curtis2018-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assign a parent to the QQmlComponent returned by QQuickControlSettings1::styleComponent() so that it doesn't get garbage collected by the QML engine. This was not an issue until 5.12, but it seems like a good idea regardless. Change-Id: I53265b23afab62e2276fe6e10d976a93a4f12e6f Fixes: QTBUG-71238 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QQuickTreeModelAdaptor1: fix out of range issue in selectionForRowRangeSamuel Gaist2018-12-051-0/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the index of the "to" row is invalid and the one from the "from" row is good, then the method will try to access an invalid index. This patch fixes that by ensuring that if the "to" row is invalid (when, for example, the mouse cursor goes out of the view while multiple selection is activated), the "to" index used stays valid. [ChangeLog][Controls][QQuickTreeModelAdaptor1] Fixed an issue where an invalid access was done if either extended or multiple selection was in use and the mouse went out of the view on top of the model. Fixes: QTBUG-71789 Change-Id: I32d8a20ee9ffc1c40584f17c27ceb06d48b81ff0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | TableView: Handle dynamic insertion of TableViewColumns correctlyAndy Shaw2018-11-161-0/+11
|/ | | | | | | | | | When inserting a TableViewColumn after the TableView is created, then it needs to be inserted into the list of columns at the specified index so that it responds correctly to things like resizeColumnsToContents() Fixes: QTBUG-58594 Change-Id: If7ff545306fe8b6616d8e016eb87e565ed40c836 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* ScrollView: Defer calls to doLayout()Ulf Hermann2018-09-261-10/+8
| | | | | | | | | | | | | | | doLayout() updates the dimensions of the scroll view, and therefore can trigger the scroll bars to be shown or hidden. That, in turn, can trigger another call to doLayout(), resulting in binding loops. Avoid those by deferring the call. The scrollview tests are broken without this change because the binding loop prevents the scrollbars from being shown or hidden in some cases. The deferring necessitates a tryVerify(), but fixes the actual tests. Change-Id: I0dac0ba380240e025237f69c4d357d764a535c3d Fixes: QTBUG-50605 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix replace transition of vertical slide in the stack viewSimon Hausmann2018-07-031-1/+1
| | | | | | | | | The replaceTransition property was on the wrong level. Thanks to Markus Weingarten for noticing :) Task-number: QTBUG-69251 Change-Id: I4b9f66721c74a29c265d07a3e70747c69b6522ce Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-201-1/+4
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Id56429b283aff90a18576cbd769b96fa1f0781fa
| * TableView: Don't unset the delegate loader source componentUlf Hermann2017-12-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once we've loaded the delegate, we want to keep it. Constantly deleting and recreating items is rather wasteful. The items could already be moved to a different location before, so keeping them around when the item is completely disabled doesn't make much of a difference. We do retain the behavior of only instantiating the delegate once we add it to the table, though. Change-Id: Ic3cd016bc6990f0a9695b5aeb0d1de3aad0f4ca1 Task-number: QTBUG-62809 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Louis du Verdier <louis.du.verdier@free.fr>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-12-186-35/+49
|\ \ | |/ | | | | Change-Id: Ie66ca17fe8ea49b3637accb468e206657346f4ab
| * Calendar: fix bug when NaN is displayed instead of dateOleg Yadrov2017-12-154-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I fixed a similar issue last year on the JavaScript side: 094ad30c94a72784449f43ef06d2172d644ab0fd At this time the same thing has been happening in C++. See QTBUG-54559 and the patch for a detailed explanation of the issue. In short, the problem with Calendar is that internally it uses QDate which does not keep information about time, whereas in the JavaScript world date is always combined with time. So, QDate(2017-10-15) is valid, but when during QDate -> JS Date transformation we add time to it (which defaults to midnight (00:00)), it becomes invalid in time zones where the Daylight Saving Time -> Standard Time transition takes place at midnight. To avoid switching the entire QQuickCalendarModel1 to using QDateTime, I modified its date(...) and dateAt(...) methods to return QDateTime with the time part always set to 12:00. That transformation required more changes in QQuickRangedDate1, because Calendar::selectedDate internally is QQuickRangedDate1::selectedDate, and I also had to fix "selected" property binding in the Base Calendar Style as it did take into account the time part of the date, which resulted in wrong behavior with my changes. Task-number: QTBUG-64068 Change-Id: Ia2f7703ff4e5811ef79438c97739da1d8001a7f5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * ScrollView: fix cyclic Tab navigationAlberto Mardegan2017-11-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The ScrollView is not a control widget, which should be included in the focus chain when the user presses the Tab key; instead, it's a container and as such it should not interfere with the navigation. We also modify TableView, because it derives from ScrollView but we want to keep its current behavior. Task-number: QTBUG-64596 Change-Id: Ibd7833603d38171693b2f34c5859e9c4615b8ed4 Reviewed-by: Liang Qi <liang.qi@qt.io>
| * Pick the default style name at runtime instead of compile timeJake Petroules2017-11-211-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | Instead of a naïve OS-based compile time check, we check which platform plugin is in use at runtime. This should give a more accurate mapping, especially on desktop OSes using alternative platform plugins where the Desktop style is not useful. The minimum Android SDK version is 16 now, so the check is removed. Change-Id: Ie7af3a8ce5fd031256f5eba9706f24ab50a23bf9 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-12-011-1/+1
|\ \ | |/ | | | | Change-Id: Iadff14f78c9d4b5aca9cba8a2728c10b7963d8fc
| * Check for empty style returned from environmentFriedemann Kleint2017-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | Fix warning "Empty filename passed to function" when running Qt Creator 4.4 against Qt 5.10 (see qtbase: 0dee566e98f5ff4f224e596de1c04de4f9685df4). Change-Id: I0b71a873245a28ef972c105e7d41347e6b0fb38a Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Fix typoFrederik Gladhorn2017-10-101-1/+1
| | | | | | | | | | | | Change-Id: I0c4e60c01ca6aeedecb805cf0e82b9a80c632678 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Yulong Bai <yulong.bai@qt.io>
* | Replace Q_NULLPTR with nullptrKevin Funk2017-09-261-1/+1
| | | | | | | | | | Change-Id: I43296a94e6242a9e77039a0369e3a2292891fec7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-221-3/+3
|/ | | | | Change-Id: I39eb6cd5c6be80b14597b666c6fee05978be26ce Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Convert features.tooltip to QT_CONFIGStephan Binner2017-06-271-3/+6
| | | | | Change-Id: I4638457a51a72666b4c73130f4a856ad93ca2f13 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Support for Q_OS_ANDROID_EMBEDDED and android-embedded buildsOtto Ryynänen2017-06-011-2/+2
| | | | | | | | | | | The Embedded Android build (Boot to Qt Android injection) is defined by having both Q_OS_ANDROID and Q_OS_ANDROID_EMBEDDED flags defined, as well as having Qt config android-embedded. This commit enables the possibility to build embedded Android builds. (i.e. Qt build for Android baselayer only, without JNI) Change-Id: Ic825e034f8d4b39c45e03b9f0a965f126559991e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-182-6/+26
|\ | | | | | | Change-Id: Ife389a8fd4df1eef4f521ff734d02748b25ec184
| * Add NOTIFY signals for WheelArea5.8Marco Martin2017-04-032-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the private WheelArea component didn't have any notify signals in its horizontalValue/verticalValue or minimum/maximum values as well. this caused old values to be used in ScrollView.qml. If we want to have a listView that starts scrolled right when instanced, verticalMaximumValue won't be updated when the list is populated. Also, the wheelArea.verticalValue that's assigned at the beginning will be constrained by the wrong verticalMaximumValue, causing it to go out of sync with contentY. At this point the first time the mouse wheel is moved, the list will jump back at the top. Change-Id: I4605000636be7975ba9a58e2c79e8c2351e5a292 Task-number: QTBUG-59633 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Fix warnings for -no-feature-itemviewsv5.9.0-beta1Nikita Krupenko2017-03-291-0/+2
| | | | | | | | | | | | Change-Id: I4dcca848212d6aed403bbed1a8b484ab269b3e47 Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Fix build with -no-feature-libraryPaul Olav Tvete2017-03-201-0/+2
| | | | | | | | | | Change-Id: I310e90ec92b81939df11accb4cb6b1bd25df472e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Build fix for -no-feature-libraryPaul Olav Tvete2017-03-031-2/+3
| | | | | | | | | | Change-Id: I9339b134c8025e9f3e44933121e339a3107ad975 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Build fix for -no-feature-validatorPaul Olav Tvete2017-03-032-0/+7
| | | | | | | | | | Change-Id: Ib5c89c0934d5dbf2fe31c9ced09998c8a7405801 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Build fix for various widget featuresPaul Olav Tvete2017-03-031-4/+34
| | | | | | | | | | | | | | | | Make QtQuickControls build with -no-feature-spinbox, textedit, toolbar, itemviews, wheelevent, tabbar, tabwidget and slider. Change-Id: I780df0f624e885be03307908d4133d4ab91f8bea Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'qt/5.8' into 5.9Paul Olav Tvete2017-03-021-1/+4
|\ \ | |/ | | | | Change-Id: Ia4337204f3b69d63eb50d1b918685b098c77b48d
| * Made Button accept space key press and release eventsJason Erb2017-02-101-1/+4
| | | | | | | | | | | | Task-number: QTBUG-57853 Change-Id: I33cd09d78e470a85d0f816781e683b7574f673ab Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Note that iconName requires QApplicationMitch Curtis2017-03-011-0/+2
| | | | | | | | | | | | Task-number: QTBUG-37083 Change-Id: I3091776f4b4643136e67c9521efddb5462657d06 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Fix build for -no-feature-tooltipStephan Binner2017-02-281-3/+3
|/ | | | | Change-Id: If4e71985a71d20dca7c49652a5b8957ab26c901f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-261-2/+2
|\ | | | | | | Change-Id: I70641d4226d3851277e5d134bdbc68615b33de6a
| * Merge remote-tracking branch 'origin/5.6' into 5.75.7Liang Qi2016-11-241-2/+2
| |\ | | | | | | | | | Change-Id: I4a76c586b2e5e49616627c306dd345bdeee64b62
| | * Fixed possible crash due to out of memory on ARMFilippo Cucchetto2016-11-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When diving two real values we can obtain an Infinite value. The qml engine perform an implicit conversion (and silent) if this value is directly assigned to an "int" property. On Arm the conversion of Infinite to int gives the value +2147483648. Thus the Repeater model instantiate 2147483648 items and crashes. By morphing both the rowHeight and paddedRowCount properties to "real" we keep the Infinite value semantic. This allows the Repeater to handle properly the Infinite case. Task-number: QTBUG-57283 Change-Id: I376f9ca497bea1f1aab413d1c1ba87d918b73fbb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-193-5/+38
|\ \ \ | |/ / | | | | | | | | | | | | | | | Conflicts: src/controls/controls.pro Change-Id: I0150ca08d83f292a5c8587ec886e206124757df4
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-183-5/+38
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/controls/Private/qquickrangemodel.cpp src/controls/Private/qquickrangemodel_p.h src/controls/Private/qquickrangemodel_p_p.h src/layouts/qquicklayout.cpp tests/auto/controls/data/tst_rangemodel.qml Change-Id: I9c8f6326c6edf9ebb18dd538f76830e1b439ba8e
| | * RangeModel: Emit min/max and value changes after component is completeJoni Poikelin2016-08-303-5/+38
| | | | | | | | | | | | | | | | | | | | | | | | Prevent extra value changed signal to be fired in case when Slider with minimum > 0 and value > minimum are set. Change-Id: I86824c403a7c0296f782d2eec7ed30acfc13b304 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8v5.8.0-alpha1Liang Qi2016-08-305-8/+62
|\ \ \ | |/ / | | | | | | Change-Id: I4f85412071d34b44f76870753e171e0beae2e7b9
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-275-8/+62
| |\ \ | | |/ | | | | | | | | | | | | | | | Conflicts: tests/auto/qquicktreemodeladaptor/tst_qquicktreemodeladaptor.cpp Change-Id: I0b6018fdac65a5385136e4c3561fba1c52ecd32e
| | * Fix moving of TreeView itemsJoni Poikelin2016-08-263-7/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Property binding for row property in styleData causes an update which tries to read new value for the index property, but index is changed afterwards which causes old value to be read. This may lead to crashes and other unwanted behavior. Depth changes are now delivered to update item depths in visible items and model index changes though role instead of looking for a row change. Task-number: QTBUG-47523 Change-Id: I540cd06a25281f18e4628f4b030cf969dc8e0a7f Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| | * Update scroll indicator position on content size changeNikita Krupenko2016-08-181-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If scroll indicator is at the beginning and data prepended to contentItem, scroll indicator should change position to previous content beginning. This is especially important with so-called "infinite scrolling", when scrolling goes upwards and new content added at the top of the view. Task-number: QTBUG-50795 Change-Id: I250d6535b1146a54c6a70062b659cc49ed43709f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Doc: Change instances of 'OS X' to 'macOS'Topi Reinio2016-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change all occurrences where the platform is discussed to use the macro \macos (defined in the documentation configuration in qtbase). Change-Id: I5ca47e4d830c12df297ee298ed22fd2d41dee739 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-025-21/+42
|\ \ \ | |/ / | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Iab80dd0c2bea54171971fd7a9538000908ed90d5
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-011-0/+2
| |\ \ | | |/ | | | | | | Change-Id: I316bcbbc5308fda27728df15db1e780aa073da2a
| | * ScrollView: block updates when redoing the layoutOlivier Goffart2016-06-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changing the contentHeight might change the maximum value of the scrollbar which might change the value of the scrollbar which, if blockUpdates is not set, will change the contentY of the flickable. This can cause flickering when contentHeight varries with contentY which might typically happen for a ListView where not all elements have the same height. Or worse, this can make the scrolling jump and result in the wrong position. Change-Id: I1968055492d679387ebbf6813a160efbf82e4fbb Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>