summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-02-081-4/+30
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml src/network/ssl/qsslsocket_mac.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/corelib/kernel/qtimer/BLACKLIST tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp tests/auto/testlib/selftests/expected_blacklisted.lightxml tests/auto/testlib/selftests/expected_blacklisted.tap tests/auto/testlib/selftests/expected_blacklisted.teamcity tests/auto/testlib/selftests/expected_blacklisted.txt tests/auto/testlib/selftests/expected_blacklisted.xml tests/auto/testlib/selftests/expected_blacklisted.xunitxml tests/auto/testlib/selftests/expected_float.tap tests/auto/testlib/selftests/expected_float.teamcity tests/auto/testlib/selftests/expected_float.txt tests/auto/testlib/selftests/expected_float.xunitxml Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
| * Improve keyboard navigation in QListView when isWrapping is enabledAlexander Volkov2019-02-061-4/+30
| | | | | | | | | | | | | | | | | | | | Search the previous item or the next item in a model instead of searching them on visual layout. This way the cursor will not stop at the beginning or at the end of a row or a column. Fixes: QTBUG-14444 Change-Id: I0ef203a4dcd876e4c50559fb87e61585f07434d1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Add deprecation exclusion around deprecated calls in deprecated codeFriedemann Kleint2019-02-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Fix: io/qdir.cpp:1087:16: warning: ‘static void QResource::addSearchPath(const QString&)’ is deprecated: Use QDir::addSearchPath() instead [-Wdeprecated-declarations] io/qprocess.cpp:1178:34: warning: ‘void QProcess::finished(int)’ is deprecated: Use QProcess::finished(int, QProcess::ExitStatus) instead [-Wdeprecated-declarations] image/qpixmap.cpp:997:48: warning: ‘static QPixmap QPixmap::grabWidget(QObject*, const QRect&)’ is deprecated: Use QWidget::grab() instead [-Wdeprecated-declarations] text/qfont.cpp:2218:29: warning: ‘QString QFont::lastResortFamily() const’ is deprecated [-Wdeprecated-declarations] itemviews/qitemdelegate.cpp:1008:41: warning: ‘static QPixmap* QPixmapCache::find(const QString&)’ is deprecated: Use bool find(const QString &, QPixmap *) instead [-Wdeprecated-declarations] Change-Id: I51259edc175b1f55f61ded3af50ebfffd8c304a8 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | QtWidgets/Graphics-/ItemViews: mark obsolete functions as deprecatedChristian Ehrlicher2019-02-054-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark some long obsolete functions as deprecated so the can be removed with Qt6: - QGraphicsItem::matrix()/setMatrix()/resetMatrix()/sceneMatrix() - QGraphicsItemAnimation::reset() - QGraphicsScene::isSortCacheEnabled()/setSortCacheEnabled() - QAbstractItemDelegate::elidedText() - QAbstractItemView::setHorizontalStepsPerItem()/horizontalStepsPerItem() - QAbstractItemView::setVerticalStepsPerItem()/verticalStepsPerItem() Change-Id: I7244078552ebeac9dfbcf3291b3ae0c44cc2c1d9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QtWidgets: replace 0 with \nullptr in documentationChristian Ehrlicher2019-02-024-15/+16
| | | | | | | | | | | | | | | | | | Replace 0 with \nullptr in the documentation. As a drive-by also replace some 0 with nullptr in the corresponding code. Change-Id: Id8056dc2364a372e40bc04e8cb9fcc443e49fb18 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | QtGui: mark obsolete QPixmapCache::find() functions as deprecatedChristian Ehrlicher2019-02-022-10/+26
| | | | | | | | | | | | | | | | | | QPixmapCache::find(QString) and QPixmapCache::find(QString, QPixmap&) are deprecated since Qt4 times. Explicit mark them as deprecated so they can be removed with Qt6. Change-Id: Iaf185f69afe02203559a1c812fbb4a95c9049a1d Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-261-9/+0
|\| | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Change-Id: I4c9679e3a8ebba118fbf4772301ff8fde60455b9
| * Merge remote-tracking branch 'origin/5.12.1' into 5.12Qt Forward Merge Bot2019-01-231-9/+0
| |\ | | | | | | | | | Change-Id: Icebd151eae0cf9d400319a42573290d1a911ce26
| | * Merge remote-tracking branch 'origin/5.12' into 5.12.1Liang Qi2019-01-082-32/+91
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qtooltip.cpp Change-Id: Ic2f9a425359050eb56b3a4e5162cf5e3447058c8
| | * | Revert "QListView: Honor css :first/:middle/:last Pseudo-States"Christian Ehrlicher2019-01-041-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1aa3edf3f888f394040d32d4a211257f9e9e2791 since it created a regression within the windows styling. Task-number: QTBUG-27110 Fixes: QTBUG-72748 Change-Id: I7e5004be6cf398ef0b533a25066d924310ed1e48 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-214-7/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ibfcb30053f3aacb8ec2ec480e146538c9bf440ea
| * | | Documentation: Add \nullptr macro and use where applicableFriedemann Kleint2019-01-104-7/+7
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt for Python users reading the documentation assume that int(0) can be passed for pointer parameters. Use the newly introduced \nullptr to disambiguate this. In a follow-up step, the \nullptr macro can be defined as None when generating the Qt for Python documentation. Task-number: PYSIDE-903 Change-Id: I3a45f87175a0668ab5f3f95f0aff409f7e3ef027 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Doc: replace QItemDelegate with QStyledItemDelegateChristian Ehrlicher2019-01-068-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since QStyledItemDelegate should be preferred over QItemDelegate the documentation should point to QStyledItemDelegate instead. Also mark some internal classes which derive from QItemDelegate so they will not be forgotten during Qt6 porting. Change-Id: I2dd17feedf8593afac5ca16d2546e1f0bc0250ae Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-042-32/+91
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also blacklist tst_QRawFont::unsupportedWritingSystem() and tst_QGlyphRun::mixedScripts() on windows for now. Conflicts: qmake/generators/makefile.cpp src/corelib/itemmodels/qstringlistmodel.cpp src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp tests/auto/gui/text/qglyphrun/BLACKLIST tests/auto/gui/text/qrawfont/BLACKLIST Task-number: QTBUG-72836 Change-Id: I10fea1493f0ae1a5708e1e48d0a4d7d6b76258b9
| * | QTableView: Fix keyboard navigation with disabled rowsChristian Ehrlicher2018-12-182-32/+91
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | The keyboard navigation with MovePageUp/Down and MoveEnd did not honor disabled cells in all cases which lead to inconsistencies in the navigation (esp. since MoveHome does honor them correctly). Therefore make sure that all four move operations work consistent by refactoring the code to use common functions. Fixes: QTBUG-72400 Change-Id: I63fa3b626510d21c66f4f9b2b1bfb3261728ecaf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QbstractItemView: Allow Key_Space for keyboardSearch()Christian Ehrlicher2018-12-251-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | The keyboard search in QAbstractItemView did not handled Key_Space because this is also an edit trigger. It was also consumed if no edit was started. This patch changes this behavior and triggers the keybaord search when the editing was not started. Fixes: QTBUG-48505 Change-Id: I58e0d283f863c9b12ac5d2f6171f15522bd7c30a Reviewed-by: David Faure <david.faure@kdab.com>
* | QTreeView: fix keyboard navigation when first or last item is disabledChristian Ehrlicher2018-12-252-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The keyboard navigation did not consider the disabled state when trying to find the new index under all circumstances. This lead to a non-working PageUp/Down/Home/End navigation when the first or last item was disabled or hidden. Fix it by explicitly checking if the calculated item is hidden/enabled and skip it in this case. Fixes: QTBUG-44746 Fixes: QTBUG-34832 Change-Id: Ifa3b64a405e67b792db5db9d186d426fcfe183fb Reviewed-by: David Faure <david.faure@kdab.com>
* | Widgets: replace deprecated QPalette functionsChristian Ehrlicher2018-12-171-1/+1
| | | | | | | | | | | | | | | | QPalette::foreground()/background() are deprecated since 5.13 - replace those functions with their successors. Change-Id: I80e49dadd7be1007d73ac920f6db2b8e608db06a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Use Q_DISABLE_COPY_MOVE for private classesFriedemann Kleint2018-12-121-1/+1
| | | | | | | | | | Change-Id: I3cfcfba892ff4a0ab4e31f308620b445162bb17b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | QTreeWidget: mark is/setFirstItemColumnSpanned() as deprecatedChristian Ehrlicher2018-12-112-20/+33
| | | | | | | | | | | | | | | | | | | | | | Deprecate the QTreeWidget functions is/setFirstItemColumnSpanned() to stay in sync with the other deprecated functions (selected/expanded/hidden) so they can get removed in Qt6. Also add a small unit test for them. Change-Id: Ie1cb5d7163c2d56d653c21e841ccaf7d38569787 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Remove the model pointer from QPersistentModelIndexDataLars Knoll2018-12-071-2/+1
| | | | | | | | | | | | | | It can be just as well received from the QModelIndex member. Change-Id: I72f930206ca2afed730009778ded0e56e4e6f278 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | QListWidget: mark (is|set)Item(Selected|Hidden) as deprecatedChristian Ehrlicher2018-12-042-45/+63
| | | | | | | | | | | | | | | | | | | | | | QListWidget::(is|set)Item(Selected|Hidden)() are deprecated for a long time but not marked as such. Therefore explicitly mark them as deprecated so they can get removed with Qt6. Change-Id: I4567e740f1ebb5841b2e5b50c601fb83a782950c Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QTreeWidget: mark (is|set)Item(Selected|Hidden|Expanded) as deprecatedChristian Ehrlicher2018-11-092-58/+78
| | | | | | | | | | | | | | | | | | | | QTreeWidget::(is|set)Item(Selected|Hidden|Expanded)() are deprecated for a long time but not marked as such. Therefore explicitly mark them as deprecated so they can get removed with Qt6. Change-Id: Ie4971350de61326811e0788df0d359ed3c442869 Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QHeaderView: check for changed roles in dataChanged()Christian Ehrlicher2018-11-081-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QHeaderView::dataChanged() did not check for the modified roles which lead to unneeded size calculations even if the size did not change. Avoid it by only looking at the relevant roles (DisplayRole, DecorationRole, SizeHintRole and FontRole). [ChangeLog][QtWidgets][QHeaderView] dataChanged now respects the given roles to avoid useless recomputations Fixes: QTBUG-71172 Change-Id: I0de53897347a72bddc425ae1fae8f2560ad0e977 Reviewed-by: David Faure <david.faure@kdab.com>
* | QHeaderView: Fix updating hidden sections during initializeSections()Christian Ehrlicher2018-11-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | QHeaderView::initializeSections() was calling updateHiddenSections() with wrong parameters which lead to an inconsistency in the hidden section handling. updateHiddenSections() needs the first and last index which got removed. Therefore we must pass the new section count for logicalFirst. Fixes: QTBUG-55461 Change-Id: Ica06125cf19bdd500f55fd9cd59ace1795f3703f Reviewed-by: David Faure <david.faure@kdab.com>
* | ItemWidgets: add helper function to retrieve the underlying modelChristian Ehrlicher2018-11-086-67/+105
| | | | | | | | | | | | | | | | | | | | Add a new function to return the underlying model to avoid code duplication and make the code more readable. Also replace some 0 with nullptr. Change-Id: I1ca33de6f26b4e36f46ce7d2eacc45d0799478a3 Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Fix use of deprecated ItemDataRoles Background/TextColorRoleChristian Ehrlicher2018-11-052-4/+4
| | | | | | | | | | | | | | | | | | | | Replace BackgroundColorRole/TextColorRole with BackgroundRole/ForegroundRole and explicit deprecate them for 5.13 Change-Id: I6b0d99844a32d2f5fdfd1878317a7b7422b800d3 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QTableWidget: mark isItemSelected/setItemSelected() as deprecatedChristian Ehrlicher2018-11-022-32/+49
| | | | | | | | | | | | | | | | | | QTableWidget::isItemSelected/setItemSelected() are deprecated for a long time but not marked as such. Therefore explicitly mark them as deprecated so they can get removed with Qt6. Change-Id: I77fffe2786751306115c3f5da0ef98ff84e35b1a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QTreeView/TableView: explicitly mark sortByColumn(int) as deprecatedChristian Ehrlicher2018-11-025-13/+46
| | | | | | | | | | | | | | | | | | | | | | | | QTreeView/TableView::sortByColumn(int) was deprecated a long time ago but never got removed. Therefore mark it with QT_DEPRECATED_SINCE(5, 13) so we can remove it with Qt6. Also sync the handling of the sort order changes in QTableView with the one from QTreeView. Change-Id: I0371d9a9c21116edaa9125835827f1a200075d36 Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QTreeView: add expandRecursively() to expand all items below an indexChristian Ehrlicher2018-11-022-16/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTreeView only had functions to either expand all items or until a given depth. What was missing is to expand all subitems for an index programmatically which is added with this patch. [ChangeLog][QtWidgets][QTreeView] Added expandRecursively() to expand all items below a given index Fixes: QTBUG-10482 Change-Id: I8fc4d50b0b7e90245840c99a0188f13c0670253a Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-10-256-28/+32
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/animation/qpropertyanimation.cpp src/gui/image/qicon.cpp tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp Change-Id: I3698172b7b44ebb487cb38f50fd2c4a9f8a35b21
| * QTableWidget: fix cellChanged signal emitted by takeItem()Christian Ehrlicher2018-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | QTableWidget::takeItem() emitted cellChanged with row and column set to -1. The internal functions searched for item after it was reset to nullptr and therefore it was not found. Since the modified cell is known because it's passed to the takeItem function, the correct row/column can be retrieved from there. Task-number: QTBUG-70478 Change-Id: I5ff5991c49f3200efe95fde4c7d0d28e19be7ebf Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-10-175-27/+31
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platformthemes/platformthemes.pro src/printsupport/kernel/qplatformprintdevice.cpp Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
| | * Modernize the "animation" featureLiang Qi2018-10-125-27/+31
| | | | | | | | | | | | | | | | | | Change-Id: Ibc164b3df3cf87db569ef4813de458a9067b7f7d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Itemviews: mark some functions as deprecatedChristian Ehrlicher2018-10-213-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | Mark some long deprecated functions as deprecated so they can be removed with Qt6. Change-Id: I2ccd21c829c954b6a3662799070682dbe71fd693 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
* | | QTreeView: small optimization in verticalOffset()Christian Ehrlicher2018-10-131-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the scroll mode is ScrollPerItem and uniformRowHeights is not set, the offset has to be calculated by iterating over all items. Optimize the loop by calculating the last item before the loop instead of checking at every iteration. Task-number: QTBUG-61763 Change-Id: I1d4439fe0fc3f32194f5f368c0486e793048d965 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
* | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-10-081-3/+4
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qstylesheetstyle.cpp Change-Id: I3a503b44ae413fbc0a90f4af70b8f84daffd86ad
| * | QTreeView: adjust documentation of key bindingsChristian Ehrlicher2018-10-041-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation for key bindings was a little bit unclear for key asterisk. Also sync the names of the left and right key was not consistent (Left/RightArrow - Left/Right) Change-Id: Icee0821880fcc3ebc2ade939cf80127ebf0976ad Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | QAbstractScrollArea: fix sizeHint when widget is not visibleChristian Ehrlicher2018-10-042-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTable/QTreeView did not follow the documentation and returned their needed size with scrollbars within viewportSizeHint(). Then sizeHint() also took the size of the scrollbars into account when the policy was set to ScrollBarAlwaysOn. This lead to different results when the widget was shown/hidden and/or the scrollbar was visible or not. Fix it by only adding the additional size when the scrollbars are really visible. Also use header->isHidden() instead of isVisible() in QTreeView the same way it is done in QTableView. [ChangeLog][QtWidgets][QAbstractScrollArea] QTableView/QTreeView are now reporting their viewportSizeHint() correctly taking into account its scroll bars visibility and visibilityPolicy. Task-number: QTBUG-69120 Change-Id: If50959a9f7429275e3e33122644c978fb64972ba Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-292-4/+1
|\| | | | | | | | | | | Change-Id: I6083c3e61b7dbe188f83676f7e7bb268e5ccf2f3
| * | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-09-272-4/+1
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/widgets/util/qcompleter.cpp Change-Id: I4f44f0f074982530f2f2e750ce696230b2754cf3
| | * QHeaderView: Don't unhide hidden sections on layoutChanged()Christian Ehrlicher2018-09-241-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When storing the persistent indexes within _q_sectionsAboutToBeChanged() there was a limit one how much persistent indexes should be stored due to performance concerns. This resulted in unhiding hidden rows. The rationale behind this was that storing persistent indexes is slow and that hiding a large amount of rows/columns should be done with a QSortFilterProxyModel. Fix it by removing the limit since it does not really hurt performance. Task-number: QTBUG-70633 Change-Id: I2311213c2b63c67e2210aa7f73f07d28dc0e47be Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| | * Modernize the "datestring" featureLiang Qi2018-09-241-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I2236a456fe3758d9054b22e36fe6316f3522d533 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QTreeView: sync keyboard search behavior with other itemviewsChristian Ehrlicher2018-09-251-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTreeView has a special implementation of keyboardSearch() which is not consistent to the base implementation regarding the selection behavior: - currentSelectionStartIndex is not set which results in a wrong mouse selection behavior afterwards - only the current index is set but not the current selection Sync the behavior by calling setCurrentIndex() directly in QTreeView too. One problem remains with this patch - the key handling is still different between QAbstractItemView and QTreeView for repeating key presses. Task-number: QTBUG-18862 Change-Id: Ife79d146cf16d6ecbf9f86540777dae15aa1ffb0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | QHeaderView: apply small optimization in recalcSectionStartPos()Christian Ehrlicher2018-09-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The loop in recalcSectionStartPos() calls QVector<>::constEnd() after every iteration which is not needed since the vector stays constant. Therefore use the new for loop syntax from c++11 so constEnd() is only called once which gives a small speedup, noticeable with large section counts. Change-Id: If318eec10c9ce234004a9922409fbdbc6409f2f8 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
* | | QItemWidgets: emit layoutChanged with proper sortHintChristian Ehrlicher2018-09-243-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | layout(AboutToBe)Changed gained a sortHint parameter with Qt5.0 but the itemmodels did not set a proper value where possible. Since the sorting of the ItemWidgets is only per column, it is reasonable to pass QAbstractItemModel::VerticalSortHint in the various layoutChanged calls. Change-Id: Ia11322bae1a96bc0d7d8422558a11cdfe04c2808 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | QListView: Speedup handling of hidden itemsChristian Ehrlicher2018-09-172-16/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead iterating through all rows to get the number of hidden items, iterate over the hidden items which are fewer items. Also don't create a temporary vector with visible flow positions by remembering the count of hidden items before the working index and adjusting them appropriately which gives a significant performance boost when working with a large data set. [ChangeLog][QtWidgets][QListWidget] Speedup handling of hidden items when working with large data sets Task-number: QTBUG-68977 Change-Id: I599b6e97945c245f02229145baad8363ec2bf2f5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | QTableView: fix calculating cells to drawChristian Ehrlicher2018-09-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The width of the bitarray which should avoid redraws of already drawn cells is sometimes calculated with other parameters then the actual drawing. This can lead to cells which are not drawn. The reason for the discrepancy is that for the initial calculation the headers viewport width is taken which can be smaller than the real width due to a css border. Since all other QHeaderView operations do not take the border into account the problem arises. This will not fix the visual glitch (the header separators are not painted at the same position as the grid) but will at least draw all needed cells. Task-number: QTBUG-20316 Change-Id: I4a1e35ee3ea51b1b458ad3497aab0a34af680cb8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-101-2/+6
|\| | | | | | | | | | | Change-Id: If1baf48f0f396fb223672d14f0e1847ac42ca1a6
| * | QTableView: Fix PageUp not getting to top when first row is hiddenChristian Ehrlicher2018-09-091-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the first row(s) of a QTableView is hidden, PageUp could not reach the first visible row because logicalRow(0) is taken without checking if the row is visible. Task-number: QTBUG-70215 Change-Id: Ic7820352b8988accb685ea7d16908d3fa8bf2847 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>