summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/itemviews
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-01-041-12/+14
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h Make QVector(DataPointer dd) public to be able to properly merge 5b4b437b30b320e2cd7c9a566999a39772e5d431 from 5.15 into dev. src/widgets/kernel/qapplication.cpp tests/auto/tools/moc/allmocs_baseline_in.json Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
| * QListModel: fix moveRows()Christian Ehrlicher2019-12-161-12/+14
| | | | | | | | | | | | | | | | | | QListModel::moveRows() had an issue when the destination was before the source row. Change-Id: I4ce8b425451f2f53c7eb3b211e9590753dec618a Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-041-2/+16
|\| | | | | | | Change-Id: I4134c0c6b6c9911950f58b3b5c86e789d28a185b
| * Merge remote-tracking branch 'origin/5.14' into 5.15Ulf Hermann2019-12-031-2/+16
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/serialization/qcborvalue.cpp Change-Id: I675a3029955c96e81a33ed9d98b72b55b6784b52
| | * QTreeView: Reset the pressed index if the decoration was pressed onAndy Shaw2019-11-291-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to reset the pressed index when the decoration was pressed on otherwise if the mouse ends up over an already selected item that was previously clicked on. This prevents it from thinking that the mouse has been released on this item right after pressing on it. Fixes: QTBUG-59067 Change-Id: Iab372ae20db3682ab0812661f86533079ba4083c Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-291-22/+30
|\| | | | | | | | | | | Change-Id: Ib8357609b37b7cc22b51c27602ba60c69bf91da9
| * | Widget autotests: replace deprecated QWidget::repaint() callsChristian Ehrlicher2019-11-271-22/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | Replace QWidget::repaint() with update() + wait until the paint event is received. Task-number: QTBUG-80237 Change-Id: I57da7cd8fa119344484b849a88729bca7b48616c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2019-11-272-2/+2
|\| | | | | | | | | | | Change-Id: I5bdfe94f7eec1ba328c4a4b54d12dbc0da7fc3ac
| * | Avoid initializing QFlags with 0 or nullptr in testsFriedemann Kleint2019-11-262-2/+2
| | | | | | | | | | | | | | | | | | | | | Amends qtbase/af2daafde72db02454d24b7d691aa6861525ab99. Change-Id: Ib5d17611e43e7ab2c63c7f0587f549377f262e32 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-255-4/+69
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qhash.h src/gui/kernel/qevent.h src/widgets/kernel/qshortcut.cpp src/widgets/kernel/qshortcut.h Change-Id: If61c206ee43ad1d97f5b07f58ac93c4583ce5620
| * | QList/Table/TreeWidgetItem: Allow reseting values by passing the default valueChristian Ehrlicher2019-11-223-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The convenience functions setBackground(), setForeground() and setSizeHint() a default constructed value as 'reset'. This means a default constructed QBrush or QSize is returned in the data() function which leads to an unexpected background or forground color or size hint. Therefore check if the passed value is a default constructed value and set an empty QVariant instead which. [ChangeLog][QtWidgets][ItemViews] The convenience views QList/Table/TreeWidgetItem now treat a default constructed QBrush or QSize as an empty QVariant which allows to reset the values set to it's default values. Task-number: QTBUG-76423 Change-Id: I840570bbad3e5fd8c5b4b58903b4fd0066dbdeb7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-151-0/+14
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/rhi/qshader.cpp tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp Change-Id: I1c4ae718eb3592a0a0a90af9d11553f3ab68cad5
| | * QTreeView: make sure to not ask the old model during setModelChristian Ehrlicher2019-11-141-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Within QTreeView::setModel() the header might emit columnCountChanged which then tries to update the geometries based on the old model which is wrong. Fix it by setting geometryRecursionBlock to true so QTreeView::updateGeometries() will not ask the old model for it's data. Fixes: QTBUG-75982 Change-Id: Ia0dd36cd7c6c5347fbc285deac43da6941accbe7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | Don't insert multiple names for the same roleLars Knoll2019-11-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't make a lot of sense to have two names for the same role. Use 'fileIcon' exclusively for the Qt::Decoration/ FileIconRole. Change-Id: Icaa46ba4aa61efc56ba007a14bab5e59ea26cd35 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-303-35/+28
|\| | | | | | | | | | | Change-Id: I7f11733bda960196a96c6452bdabeb7072a8430d
| * | tst_QDataWidgetMapper/QFileIconProvider/ItemEditorFactory: cleanupChristian Ehrlicher2019-10-293-35/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QDataWidgetMapper/QFileIconProvider/ItemEditorFactory autotests: - use range-based for loops - use nullptr - use member initialization - use new signal/slot syntax - use static invocations - use override Change-Id: I1a36ea2da7de1cfa5d5d4e305ef508fda3a6c460 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-261-0/+26
|\| | | | | | | | | | | Change-Id: I379794a01cbf6fb39d94b24cc8c90b1971a212b9
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-251-0/+26
| |\| | | | | | | | | | Change-Id: Iebedaa967a263854f18cd403ce007d7965f26d2b
| | * QTableView: properly deselect row when column 0 is hidden/not visibleChristian Ehrlicher2019-10-241-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the first column is hidden or not visible in the current viewport, it is not possible to deselect the current row. Fix it by passing the correct column to QItemSelectionModel::selectedRows() when testing if the current index is selected. Fixes: QTBUG-79092 Change-Id: I9d8082d2b29ad2f799156aee910c6ff6e3217771 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | QShortcut: Properly port to the new configure systemFriedemann Kleint2019-10-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the feature to corelib so that the QMetaType enumeration values can be properly excluded and there is no need for a dummy class. Use QT_REQUIRE_CONFIG in the headers of classes to be disabled. Add headers/source files in the .pro file depending on the configure feature in libraries and tests. Add the necessary exclusions and use QT_CONFIG. Task-number: QTBUG-76493 Change-Id: I02499ebee1a3d6d9a1e5afd02517beed5f4536b7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-1912-1/+185
|\| | | | | | | | | | | Change-Id: I5b671c89ceb8998b37f99d58df0e0a9e5785e3ad
| * | Widget tests: Skip tests that fail on WaylandJohan Klokkhammer Helsing2019-10-1812-1/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Either by testing for platform name or window activation. After this gets in, we can enable widget tests in the Wayland bot, which hopefully will reduce the number of regressions in the Wayland plugin. Fixes: QTBUG-62188 Change-Id: I71ce8abd6b5891e5b953126b1c35345892585931 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-171-0/+21
|\| | | | | | | | | | | Change-Id: Ica69de99be9c8af4d28a52e4b69e6af748ed983c
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-161-0/+21
| |\| | | | | | | | | | Change-Id: Ifd83db69416230175ddc3161f640b612755018fc
| | * Fix the size calculation of QHeaderView when stylesheet is usedSona Kurazyan2019-10-141-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calculating the header section size based on its contents when a stylesheet is used, the size hints from the stylesheet are used. In case if the stylesheet specifies only one of the sizes, the other is set to -1. Because of this the actual content size is ignored. The solution is to calculate the size based on the application style, in case if it's not specified in the stylesheet. Fixes: QTBUG-75615 Change-Id: I3453fa623d75b6b32832edf753de6e3e4e7f5a22 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-121-384/+280
|\| | | | | | | | | | | Change-Id: I6ad865b2c26003f4508da9b3f8e075a951ff8ef7
| * | tst_QAbstractItemView: cleanupChristian Ehrlicher2019-10-101-384/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QAbstractItemView autotest: - use range-based for loops - use nullptr - use member initialization - use new signal/slot syntax - use static invocations - use override - replaced QCoreApplication::processEvents with QTRY_VERIFY/QTRY_COMPARE Change-Id: Iba91811db6fb925364fc88ec36357e758b937329 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-061-146/+114
|\| | | | | | | | | | | Change-Id: Ife31dad3c8dc43c5ff4d266e6d646230c5d20a50
| * | tst_QColumnView: cleanupChristian Ehrlicher2019-10-041-146/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QColumnView autotest: - use range-based for loops - use nullptr - use member initialization - use new signal/slot syntax - use static invocations - use override Change-Id: Iae94e9074b65cca1e4d9eb199ea2b13e0cfa2880 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-024-490/+443
|\| | | | | | | | | | | Change-Id: Ideaa64d583746f1ce8265997131fb1ce3a9acbcf
| * | tst_QListView: cleanupChristian Ehrlicher2019-09-261-44/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QListView autotest: - fix indentation - use QCoreApplication::sendEvent instead of QApplication::sendEvent Change-Id: If6bb686502f6b4f2bc2dd0db52b331b2c35cf36d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | tst_QItemView: cleanupChristian Ehrlicher2019-09-252-76/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QItemView autotest: - use range-based for loops - use nullptr - use member initialization - use new signal/slot syntax - use static invocations - use override Change-Id: I46edc2dc5bbaa09fb11710fa34ef4c6639181f62 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | tst_QHeaderView: cleanupChristian Ehrlicher2019-09-251-370/+317
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QHeaderView autotest: - use range-based for loops - use nullptr - use member initialization - use new signal/slot syntax - use static invocations - use override Change-Id: I4df0b46c58ae9ae9dd4d9762390a2b14886aa68f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | tst_QListWidget: cleanupChristian Ehrlicher2019-09-231-240/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QTreeWidget autotest: - use range-based for loops - use nullptr - use member initialization - use new signal/slot syntax - use static invocations - use override Change-Id: Ied5c0b12c0d3338469e50f3b30892557c9b4479d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | tst_QListView: cleanupChristian Ehrlicher2019-09-231-456/+326
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QListView autotest: - use range-based for loops - use nullptr - use member initialization - use new signal/slot syntax - use static invocations - use override - replaced QCoreApplication::processEvents with QTRY_VERIFY/QTRY_COMPARE Change-Id: I38de7fb105cd70259e60e6b05de82944bee53a54 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-09-193-1075/+994
|\| | | | | | | Change-Id: I46ec05ade1c84e61f7f45562a218aa9ff55e2975
| * tst_QTreeView: cleanupChristian Ehrlicher2019-09-191-516/+511
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QTreeView autotest: - use range-based for loops - use nullptr - use member initialization - use new signal/slot syntax - use static invocations / replace with QTRY_foo() calls - use override - use QStyledItemDelegate Change-Id: I0e2d023254ed9f6f5d94cebf4d4358351cc4c3e2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * tst_QTreeWidget: cleanupChristian Ehrlicher2019-09-192-559/+483
| | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QTreeWidget autotest: - use range-based for loops - use nullptr - use member initialization - use new signal/slot syntax - use static invocations - use override Change-Id: I2c07e95871d8725366cddd5cd098010709c8dc55 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-09-161-730/+641
|\| | | | | | | Change-Id: Ie24be82ee70bf103c2664de1a42741979262b10c
| * tst_QTableView: cleanupChristian Ehrlicher2019-09-141-730/+641
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QTableView autotest: - use range-based for loops where possible - use nullptr - use member initialization - use new signal/slot syntax - remove a lot of c-style casts - use static invocations - use override - instantiate objects on stack instead heap to avoid memleaks Change-Id: I52fee26697b1732afa9f965e600d4c59551370ce Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-09-111-210/+201
|\| | | | | | | Change-Id: Ie69d40d2efc5559b31e28ba71f88e3cda741e051
| * tst_QTableWidget: cleanupChristian Ehrlicher2019-09-101-210/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QTableWidget autotest: - use range-based for loops where possible - use nullptr - use member initialization - use new signal/slot syntax - remove a lot of C-style casts - use static invocations - use override - instantiate objects on stack instead of heap to avoid memleaks Change-Id: I99ed144caab88d648d5ab987ce0963fbc6f1197d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-09-051-3/+0
|\| | | | | | | Change-Id: I065e212f0dc115efa1ffcb14cf9f679259da6b79
| * Merge remote-tracking branch 'origin/dev' into 5.14Liang Qi2019-08-272-1/+9
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qwidget.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetrepaintmanager.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: Ifae457d0427be8e2465e474b055722e11b3b1e5c
| * | Remove dead code from Qt 4 timesTor Arne Vestbø2019-08-201-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The benefit of keeping this code around was to inspire or inform changes in the areas to take into account possibly missing features in Qt 5, but at this point that benefit is questionable. We can always use the history to learn about missing pieces if needed. Change-Id: I87a02dc451e9027be9b97554427bf8a1c6b2c025 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Deprecate QDirModelFriedemann Kleint2019-09-041-0/+2
| |/ |/| | | | | | | | | | | | | | | | | Deprecate the constructors, add guards. Use a QStandardItemModel in tst_QCompleter::setters() instead. Task-number: QTBUG-69410 Change-Id: If77298982bb3d0b5321ae1271fab3f33b196101d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Windows: Fix some widget tests to pass on High DPI screensFriedemann Kleint2019-08-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For tst_QFrame and tst_QOpenGLWidget, force scaling off since they do screen captures which would fail with scaling activated due to different device pixel ratios. For tst_QGraphicsItem and tst_QHeaderView, force scaling on for Windows since some tests otherwise fail due to violation of the minimum size constraints of framed windows on Windows. The tests will then pass regardless of any environment setting of the scaling variables on a developer machine. Change-Id: Iefa4e84b433f7e51dce4e416546a9eda8ee6d0f1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Update for failures only on dev branch. Use general platform namesDaniel Smith2019-08-191-1/+0
|/ | | | | | | | | | This patch was generated with tooling from patchset 31 of https://codereview.qt-project.org/c/qt/qtqa/+/267034 in interactive mode. General platform names were chosen if greater than 60% of the currently active platforms of a given type in COIN recently failed. Change-Id: Ia4bde7f0ec422bbb727dc9d7151295159094f146 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-08-152-21/+46
|\ | | | | | | Change-Id: Icc80dacbca8613f2996be75553ff15d0ad242b7e
| * QTree/TableView: allow to reset the sort order to natural sortingChristian Ehrlicher2019-08-132-21/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | QTreeView allowed to set the sort column to -1 which shows the data in it's natural order (when the model supports it). This functionality was removed during the porting away from the deprecated sortByColumn(int) functionality done in d0f909f8dbdd8594b0d950822f0e7ab8728da513 Readd the functionality and also allow it for QTableView. Fixes: QTBUG-77419 Change-Id: I96b0c09ab9da36ca0a9de58fe0f37e2c56b1d51b Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: David Faure <david.faure@kdab.com>