summaryrefslogtreecommitdiffstats
path: root/src/controls/Private
Commit message (Collapse)AuthorAgeFilesLines
* Use QList instead of QVectorJarek Kobus2020-08-313-19/+19
| | | | | | Task-number: QTBUG-84469 Change-Id: I9109f92d059fd4152aee1f37597c5564d477fbf9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add missing overrideAlexander Volkov2020-05-255-15/+16
| | | | | | Pick-to: 5.15 Change-Id: Iba896b0af174ed28a27413d7343427cf9b4600d3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update 'dev' dependenciesAllan Sandfeld Jensen2020-05-121-2/+1
| | | | | | | Along with compile fixes Change-Id: I7fc6397df83d485fbc4714ead16e74bfd079c90f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Compile controls after changes in the meta system that broke itJan Arve Saether2020-03-252-0/+4
| | | | | | | | Problem was that moc needs to have the full definition of the types, it's not sufficient for it to have a fwd-declared type anymore. Change-Id: Ie1f1402d53e4336cd4afd018f5ae4dbdc88118c6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-111-3/+0
|\ | | | | | | Change-Id: Ia4ce71363671afd3f3a6ae8ff4740388c007f7f3
| * Doc: Remove \internal command from a \qmlabstract typeTopi Reinio2020-01-101-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | Even though the type is private, other types inheriting from it must also inherit the property documentation. \qmlabstract handles this, but only if the abstract type is not \internal. Remove incorrect links that were trying to fix the issue previously. Fixes: QTBUG-79469 Change-Id: I9b9bb0af84abf44c5cbe9e1770659cff24834dd6 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Avoid initializing QFlags with 0 or nullptrFriedemann Kleint2019-11-251-5/+5
| | | | | | | | | | | | | | It is being deprecated. Change-Id: I9dbd2c23e122161cf7216303c65c25678c472545 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-052-34/+168
|\| | | | | | | Change-Id: I1ddb1de98d15c70274040984d2e685a72827dc05
| * Merge remote-tracking branch 'origin/5.13' into 5.14v5.14.0-beta3Qt Forward Merge Bot2019-11-042-34/+168
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ide73d291e885a0455765263716ea2b972d7ae62b
| | * QQuickTreeModelAdaptor1: fix updating of ModelIndex roleAlberto Mardegan2019-10-292-34/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The decision to store the original QModelIndex as a role has the unfortunate consequence that we need to emit the dataChanged() signal whenever its value change. The previous implementation of the "move rows" operation failed in delivering this update in most cases. While addressing that, this commit also fixes some similar issues with the HasChildren role not being notified in certain scenarios. Also, when the last child of an expanded item gets moved away and later placed back in the original position, the item should not remember its expanded state, but rather accept the children while staying collapsed. Last but not least, it's important that the endMoveRows() protected method is called *after* the original tree model has completed its movement, because otherwise its elements might be accessed while in the wrong state. Similarly, we don't want the dataChanged() signals to be emitted while rows are moved or removed; we queue up these events and fire them only after the item indexes have settled. Fixes: QTBUG-59606 Change-Id: Ib981c912ea19908e1283cc463331c3053d4d6e7d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Adapt to new Connections syntaxUlf Hermann2019-10-204-9/+9
|/ / | | | | | | | | | | Change-Id: I299baf89f2530250a333736bb31f4ae470610176 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Make restoreMode on all Binding elements explicitUlf Hermann2019-10-046-11/+28
| | | | | | | | | | | | | | The default is going to change in 5.15. Change-Id: Ib17500791476bd45ed2c7c3736186897fb63d7a0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-281-1/+1
|\| | | | | | | Change-Id: I5c3215469c4b5f45943e8937e8b1eb309c6aed92
| * Only calculate the height of the ListView when there are model entriesAndy Shaw2019-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | When it tries to calculate the height of the listview then it depends on the model having entries. If there is no model or no entries in it then it will cause a warning to be outputted indicating that the model size is less than 0. This prevents it from occurring as a result. Fixes: QTBUG-72543 Change-Id: I7155a3a240fdcdf93caddfce332f0cc6bb0f0ec0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Guard against flickableItem being null when scrollingUlf Hermann2019-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes error from qmlplugindump: ScrollViewHelper.qml:147: TypeError: Cannot read property 'originX' of null Change-Id: I1bef74acda8fb4e1850967c4d684ece7d458699b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Remove usages of deprecated QLatin1LiteralSona Kurazyan2019-06-251-1/+1
|/ | | | | | Task-number: QTBUG-76491 Change-Id: I7cde087044916a8f434c04182be34caa8ca37b17 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-281-1/+1
|\ | | | | | | Change-Id: Idc2e5ad567f83eb85d51d1e21c38bcd96436a24f
| * 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>
* | Fix scroll position after resizev5.13.0-beta3v5.13.0-beta2Allan Sandfeld Jensen2019-04-081-1/+6
| | | | | | | | | | | | | | | | We didn't update the position if it ended up with an invalid value. Fixes: QTBUG-63437 Change-Id: Idc4d3b0cb43fd63bdb0ff10b4162dfabe49455df Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta1Qt Forward Merge Bot2019-03-022-4/+7
|\| | | | | | | Change-Id: Ib614fd58e4df83945017bbb3bf2cbc9d5a72df4c
| * 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>
* | Fix deprecation warningsFriedemann Kleint2019-02-062-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Private/qquicktreemodeladaptor.cpp:744:52: warning: ‘void QList<T>::swap(int, int) [with T = QQuickTreeModelAdaptor1::TreeItem]’ is deprecated: Use QList<T>::swapItemsAt() [-Wdeprecated-declarations] Private/qquicktreemodeladaptor.cpp:750:52: warning: ‘void QList<T>::swap(int, int) [with T = QQuickTreeModelAdaptor1::TreeItem]’ is deprecated: Use QList<T>::swapItemsAt() [-Wdeprecated-declarations] Private/qquickstyleitem.cpp:922:89: warning: ‘int QFontMetrics::width(QChar) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] In file included from /data1/frkleint/qt-513/qtbase/include/QtGui/qfontmetrics.h:1:0, Private/qquickstyleitem.cpp:942:60: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] Private/qquickstyleitem.cpp:961:75: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] Private/qquickstyleitem.cpp:1010:52: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] Private/qquickstyleitem.cpp:1010:86: warning: ‘int QFontMetrics::width(QChar) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] Private/qquickstyleitem.cpp:1469:46: warning: ‘static bool QPixmapCache::find(const QString&, QPixmap&)’ is deprecated: Use bool find(const QString &, QPixmap *) instead [-Wdeprecated-declarations] ../../../src/controls/Private/qquicktreemodeladaptor.cpp:744:52: warning: ‘void QList<T>::swap(int, int) [with T = QQuickTreeModelAdaptor1::TreeItem]’ is deprecated: Use QList<T>::swapItemsAt() [-Wdeprecated-declarations]/data1/frkleint/qt-513/qtbase/include/QtCore/../../src/corelib/tools/qlist.h:227:10: note: declared here ../../../src/controls/Private/qquicktreemodeladaptor.cpp:750:52: warning: ‘void QList<T>::swap(int, int) [with T = QQuickTreeModelAdaptor1::TreeItem]’ is deprecated: Use QList<T>::swapItemsAt() [-Wdeprecated-declarations] tst_qquicktreemodeladaptor.cpp:1387:39: warning: ‘QModelIndex QModelIndex::child(int, int) const’ is deprecated: Use QAbstractItemModel::index [-Wdeprecated-declarations] Change-Id: I213d7ffd2cb329b542f9273e3a566a813d1cc24f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Fix TableView column index when columns are insertedJoni Poikelin2019-01-282-3/+1
|/ | | | | | | Task-number: QTBUG-63001 Change-Id: I91c3e856bba8f5a4cfe9b09574213fe6e0f5c23d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> 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.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>