summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews
Commit message (Collapse)AuthorAgeFilesLines
* Convert features.treeview to QT_[REQUIRE_]CONFIGStephan Binner2017-07-155-15/+11
| | | | | Change-Id: I4a036a0410615ac563b17f7715c47acccb8abfca Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.tableview to QT_[REQUIRE_]CONFIGStephan Binner2017-07-116-16/+14
| | | | | Change-Id: I7ab479deff7bbf3083d1efa196e0480b181548c5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.datetimeedit to QT_[REQUIRE_]CONFIGStephan Binner2017-07-111-2/+4
| | | | | Change-Id: I083cd565fab8c33dc3633b71f962de099c2b3481 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.rubberband to QT_[REQUIRE_]CONFIGStephan Binner2017-07-112-2/+3
| | | | | Change-Id: I6d634bafa6d26c1e78069fddd412e6de24f5775c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QListView: Fix viewport size when checking scroll bar visibilityFriedemann Kleint2017-07-072-2/+8
| | | | | | | | | | Subtract the viewport margins from the contentsRect in QCommonListViewBase::updateHorizontal/VerticalScrollBar(). This affects list views in icon mode and list mode / ScrollPerPixel. Task-number: QTBUG-61383 Change-Id: I6f2f7951ac9344ac21cef1eba061780d130e2467 Reviewed-by: David Faure <david.faure@kdab.com>
* QFileSystemEntry: Export static helper function checking for the root pathFriedemann Kleint2017-07-032-7/+11
| | | | | | | | | | | This provides a helper function which does the check on the string. QFileInfo::isRoot() in addition checks for the existence of the directory, which can cause hangs with network drives. Use the new function in appropriate places in QtWidgets. Task-number: QTBUG-6039 Change-Id: I54d0d860713e82b28fa4069a5345b042337f9c52 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Convert features.statustip to QT_CONFIGStephan Binner2017-06-293-6/+6
| | | | | Change-Id: Ic719ab93ed1802fcc713885ad0421cb44c7a998b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.whatsthis to QT_[REQUIRE_]CONFIGStephan Binner2017-06-296-10/+13
| | | | | | | Move feature definition to gui/configure.json Change-Id: I00b35c0e259d0a695d84a9bf6803eba74d41465a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.treewidget to QT_[REQUIRE_]CONFIGStephan Binner2017-06-286-25/+16
| | | | | | | Also fix too specific #include on the way Change-Id: Ieff5f40584ecc5f680f09a8a4b95d5604ff1e940 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.listwidget to QT_[REQUIRE_]CONFIGStephan Binner2017-06-284-14/+11
| | | | | | | Also fix too specific #includes on the way Change-Id: Id626928513e89dd4a8854640994661f0d329470b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.tablewidget to QT_[REQUIRE_]CONFIGStephan Binner2017-06-284-15/+11
| | | | | | | Also fix dependency of cupsjobwidget feature Change-Id: I2184bf3df814a6bb0f38755bb597ed1797dec587 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.wheelevent to QT_CONFIGStephan Binner2017-06-282-3/+3
| | | | | Change-Id: I46083a9115c199d1ebe024ed5f64b160a27462f1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.columnview to QT_[REQUIRE_]CONFIGStephan Binner2017-06-125-22/+17
| | | | | | | Side effect: fix of QT_NO_COLUMNVIEW <-> QT_NO_QCOLUMNVIEW inconsistency. Change-Id: I42702ea7b362a4b6fb5dad78ee105e6cbbf8bcf6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Doc: Remove references to screenshots illustrating different stylesLeena Miettinen2017-06-016-60/+12
| | | | | | | | | | | | | | | | ... from widget class descriptions. Use one screenshot from Windows instead. The styles change and the screenshots become outdated very fast, so it is easier to update just one screenshot now and then. The styles can still be seen in the style gallery topics. The image files will be removed in a follow-up commit after all references to them have been removed. Change-Id: Id326c141f4884a2e4f67a4fe8681d8c65f8b24ba Reviewed-by: Martin Smith <martin.smith@qt.io>
* Merge remote-tracking branch 'origin/5.9.0' into 5.9Liang Qi2017-05-311-3/+5
|\ | | | | | | Change-Id: I2d7a3f3a80e6287e135e55b650f74f9a540332bc
| * QHeaderView: fix visual/logical index corruption when restoring statev5.9.0-rc2v5.9.0David Faure2017-05-261-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a followup to 77a8e90cddcfa1c34518ef846a4838874a7bc0c7 which didn't handle the case where no columns had been moved. visualIndices and logicalIndices are empty until initializeIndexMapping() is called, in which case appending is wrong. As a result, visualIndex(i) would return -1 for the values over those added by read(), and an assert would happen at painting time. The fix is to leave visualIndices and logicalIndices empty if they are empty already, leaving it to initializeIndexMapping() to fill them later if necessary (e.g. when moving a column). Task-number: QTBUG-60837 Change-Id: Ia7e4b9d3122647984acd434dfaa0400df319d065 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | Use hasFocus() to check if the QTreeView is considered active or notAndy Shaw2017-05-231-1/+1
|/ | | | | | | | | | When drawing the branches in a QTreeView, it should use hasFocus() to determine if it is the active widget or not. This is how it checks when styling the other aspects of the treeview, so the branches should be done in line with this. Change-Id: Id721401424ad95e9fc7ffbdc991e53b5f7feac01 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Fix warning for -no-feature-lineeditTasuku Suzuki2017-04-301-0/+2
| | | | | | | Change-Id: Ia56d5d7266a379f911e4db61e60b8b39af5b6342 Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Avoid expensive QHash::values() callsAnton Kudryavtsev2017-03-281-3/+6
| | | | | | | | | | | | | | qcocoawindow.mm: we can replace QHash::values() with std::vector since CoW is needless here and std::vector is more cache-friendly. Also replace foreach with range-based for. qitemeditorfactory.cpp: QHash::values() is used as auxiliary container to create QSet. Replace it with std::vector since CoW is needless here and apply sort-unique idiom to remove duplicates. Also avoid needless allocations. Change-Id: If34c7016977ceb7fab68e9298bf2e1944af79139 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-283-0/+4
|\ | | | | | | Change-Id: I4788bc037c55c48563ffd4ba9633a22aa1d12f22
| * Annotate more implicit fallthroughsAllan Sandfeld Jensen2017-03-273-0/+4
| | | | | | | | | | | | | | Reduces our number of gcc 7 warnings Change-Id: I792d658cbc11cad15cf45da3a36fc93fcdcc67ea Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Add feature.dialogStephan Binner2017-03-222-2/+0
| | | | | | | | | | Change-Id: I160d0f270d7f41671459358b9c180d71dd7786d6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-211-0/+1
|\| | | | | | | | | | | | | Conflicts: src/plugins/platforms/eglfs/eglfs-plugin.pro Change-Id: Id76cdbb41b7758572a3b8ea4dcb40d49bac968db
| * Fix item keeping hover highlight even when mouse has left itDan Cape2017-03-131-0/+1
| | | | | | | | | | | | | | | | | | | | Made change to clear the hover index when the mouse leaves the widget. This will ensure the component does not think the item still has the mouse over it. Task-number: QTBUG-46785 Change-Id: I34b7f0e171e9cf07ca23150af1b0e6e59a10a58a Reviewed-by: David Faure <david.faure@kdab.com>
* | QDataWidgetMapper: replace an inefficient QList with std::vectorMarc Mutz2017-03-201-31/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WidgetMapper is larger than a void*, so holding it in QLists is needlessly inefficient. Worse, the code could come to depend on the fragile property of (inefficient) QLists that references to elements therein never are invalidated. Fix by holding it in a std::vector instead (tried QVector, too, but that produced almost exactly 1KiB more text size). Adapt to std API. There are a few changes in there which are not strictly necessary when using std::vector, but were done as part of the port to QVector: - dropping of WidgetMapper ctors (because QVector requires a default ctor, and I didn't want to provide one manually), - marking the type as movable (no effect with std::vector, but doesn't hurt and keeps the next guy from wondering), and - marking Private::flipEventFilters() const (to avoid a detach when using ranged for loops). Changes required by the port to std::vector: - at() -> op[] (not strictly necessary, but expands to less code even when compiling, as QtWidgets is, without exception support), - append() -> push_back() Saves 40B in text size on optimized GCC 6.1 Linux AMD64 builds (for comparison: QVector had 1240B more than QList). Change-Id: Iaae81d1a8bebe8000bf69e7fb8b2bcd6c38afafd Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Add feature.abstractbuttonStephan Binner2017-03-133-0/+16
| | | | | | | | | | Change-Id: Ie93c6d0a8256bc466d3419408b753d5f3738aa6b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Add feature.label and feature.formlayoutStephan Binner2017-03-033-2/+27
| | | | | | | | | | | | Change-Id: Ic8dc0aee7f3fc0d8218ba709352b1378078c6070 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Revert "Add expandingListItems property to QListView"Marc Mutz2017-03-033-46/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a4c25c020554527aa9ff9b533afabffef46be131. The API is too limited in scope, and a good name is hard to find, as evidenced in the API review discussion preceding Qt 5.9 beta. This API will hopefully return as something like setItemAlignment(). [ChangeLog][QtWidgets][QListView] EDIT: REMOVE: Added expandingListItems property. Conflicts: tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp Change-Id: I397acd8a7a6c716e2d3c96eee45a276eb6d4f9dd Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
* | Add feature.scrollerStephan Binner2017-03-012-4/+4
| | | | | | | | | | Change-Id: I5313e1f5091d5764994525dae138e288e5125c59 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix build with -no-feature-draganddropPaul Olav Tvete2017-03-014-3/+8
| | | | | | | | | | Change-Id: If537cb6b7d41b2d6511c369451dde2e9289f724d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Build fix for -no-feature-validatorPaul Olav Tvete2017-03-011-0/+2
| | | | | | | | | | Change-Id: I884381964d692eb5d3eb9088c87779c03057981d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-303-8/+13
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network-chat/peermanager.cpp src/widgets/util/qsystemtrayicon.cpp src/widgets/util/qsystemtrayicon_qpa.cpp src/widgets/util/qsystemtrayicon_win.cpp src/widgets/util/qsystemtrayicon_x11.cpp Change-Id: I1c026df83818c0ccaf956980370e7522960627db
| * Fix build with -no-feature-treewidgetPaul Olav Tvete2017-01-251-2/+2
| | | | | | | | | | | | | | Make sure the feature is defined before testing it. Change-Id: I4d4b555c9f2629c8a3ca58cf52efff279f6a78f5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Compile with -no-feature-itemviewsPaul Olav Tvete2017-01-251-3/+8
| | | | | | | | | | Change-Id: I23506f06df35f124f5eb9fcc8426c63b407a0872 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Make sure features are defined before testing themPaul Olav Tvete2017-01-251-3/+3
| | | | | | | | | | | | | | | | | | Include the file defining the feature before testing whether the feature exists. Also use the new feature macro to make sure this bug doesn't happen again. Change-Id: I204836fee59b143a7ce7d256a7aed223c4d0ceb1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-252-1/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/common/msvc-desktop.conf mkspecs/common/msvc-version.conf mkspecs/common/winrt_winphone/qmake.conf mkspecs/features/mac/default_post.prf mkspecs/features/mac/sdk.prf mkspecs/features/qt.prf mkspecs/features/uikit/default_post.prf mkspecs/features/winrt/default_pre.prf mkspecs/winphone-arm-msvc2013/qmake.conf mkspecs/winphone-x86-msvc2013/qmake.conf mkspecs/winrt-arm-msvc2013/qmake.conf mkspecs/winrt-x64-msvc2013/qmake.conf mkspecs/winrt-x86-msvc2013/qmake.conf qmake/generators/win32/msvc_vcproj.cpp src/gui/kernel/qwindowsysteminterface.cpp src/network/kernel/qhostaddress.cpp src/plugins/platforms/mirclient/qmirclientplugin.cpp src/plugins/platforms/mirclient/qmirclientplugin.h src/widgets/util/qsystemtrayicon.cpp tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp tools/configure/Makefile.mingw tools/configure/Makefile.win32 Done-with: Jake Petroules <jake.petroules@qt.io> Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: I4be3262d3994e11929d3b1ded2c3379783797dbe
| * Fix access incorrect index in QListView with batch layoutAleksei Ilin2017-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | The size of flowPositions is larger by one than the number of rows in the model so the last correct row number is flowPositions.count()-2, not flowPositions.count()-1. Change-Id: Idf8bbd155151d553947d5d299dd01ffaff0c95fa Task-number: QTBUG-47694 Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: David Faure <david.faure@kdab.com>
| * QHeaderView: fix restoreState() on a model with more columnsDavid Faure2016-12-291-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | When saving state for a 3-columns headerview and then restoring that state onto a 5-column headerview, the headerview shouldn't suddenly think it has 3 columns. Rather than making restoreState() fail, we adjust for the additional columns, so that we can still apply the customizations from the user to all other columns (hiding, moving, etc.). Change-Id: I3f220aa322ea8b629d2fe345f8cde13e0ea615d6 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | QListView: Remove unneeded check inside the if blockAlexander Volkov2017-01-171-3/+1
| | | | | | | | | | | | | | info.wrap is already checked in the outer if condition. Change-Id: I3a40dbaae22f00c66acb6f483b7b4786c5580d94 Reviewed-by: David Faure <david.faure@kdab.com>
* | Add expandingListItems property to QListViewAlexander Volkov2017-01-123-4/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This property allows to change the default behavior in which list items occupy the entire width of the column. Setting it to false will reduce their widths to the minimum values, thus allowing to have intermediate free space. Then the user will be able to begin selections by mouse from this space. [ChangeLog][QtWidgets][QListView] Added expandingListItems property. Change-Id: I6bd1b147fd0335324310a165104c36f6b0d6ac9f Task-number: QTBUG-56606 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | Remove unused QEmptyModelMarc Mutz2017-01-111-12/+0
| | | | | | | | | | | | | | | | | | It's not exported and, while all-inline, is not used anywhere in Qt. Since it's in a private header, it follows that we can safely remove it. Change-Id: I4b5534e4cf8187232bdce0a9f7a4795ece1e3555 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Q_ENUMS -> Q_ENUM and Q_FLAGS -> Q_FLAGAlbert Astals Cid2017-01-021-1/+1
| | | | | | | | | | Change-Id: I3cdc7338354da40ab20bdaeb9d5745264ea27228 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-138-97/+97
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/Makefile.unix.macos qmake/Makefile.unix.win32 qmake/generators/win32/msvc_vcproj.cpp src/3rdparty/pcre/qt_attribution.json src/corelib/io/qsettings.cpp src/corelib/kernel/qdeadlinetimer.cpp src/platformsupport/kmsconvenience/qkmsdevice.cpp src/platformsupport/kmsconvenience/qkmsdevice_p.h src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h tests/manual/qstorageinfo/printvolumes.cpp tools/configure/configureapp.cpp Change-Id: Ibaabcc8e965c44926f9fb018466e8b132b8df49e
| * QListViewItem: add constexprMarc Mutz2016-11-301-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This class is just a record with a bit of functionality on it. To prevent pessimizing it compared to a C struct with the same contents, mark all operations constexpr and remove the point- less copy ctor (the generated one is just fine). Converge on passing QRect, QSize, QPoint by value. Was mixed cref and value passing before. Saves ~1KiB each in text and data size on an UBSan build, somewhat less, of course, on a normal one. Change-Id: Ibae16792d822ff183a0c542380501978f2108d93 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Clean up style selection codeLars Knoll2016-11-291-1/+1
| | | | | | | | | | | | | | | | Turn styles into proper features and test for them using qtConfig/QT_CONFIG. Change-Id: I7e28785a46723364b90d8aa286f4d6e5ab085651 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * QtWidgets: Add missing overrideAlexander Volkov2016-11-297-85/+85
| | | | | | | | | | Change-Id: I991659db5510acbbb44d0f5987edc213acf62a74 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QListView: remove pointless QVector::resize() callingsAlexander Volkov2016-11-111-7/+1
|/ | | | | | | The construction 'vector.resize(vector.count())' has no effect. Change-Id: I3d8ba7aa408599470b3a1ba4d1c1d859cf509d00 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-011-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/win/msvc_version.cpp configure.pri mkspecs/macx-ios-clang/features/default_post.prf mkspecs/macx-ios-clang/features/resolve_config.prf mkspecs/features/uikit/default_post.prf mkspecs/features/uikit/resolve_config.prf src/corelib/io/qsettings_mac.cpp src/corelib/json/qjsondocument.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.h src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/ios.pro src/plugins/platforms/ios/kernel.pro src/plugins/platforms/ios/qiosintegration.h src/plugins/platforms/minimalegl/qminimaleglintegration.cpp tests/auto/gui/painting/qpainter/tst_qpainter.cpp tools/configure/environment.cpp Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-171-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/macx-ios-clang/features/resolve_config.prf src/testlib/qtestcase.qdoc Change-Id: Icefa63056ffb37106f35299a8f19165535571799
| | * Doc: Fix typo in QtStyledItemDelegate::paint() docsLeena Miettinen2016-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-56399 Change-Id: Iaace0ed05098ab6d880b06a40d8e13aa9288c5ec Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>