summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/itemviews/qlistwidget
Commit message (Collapse)AuthorAgeFilesLines
* emit layoutAboutToBeChanged timelyLuca Beldi2021-07-201-0/+68
| | | | | | | | | | | layoutAboutToBeChanged must be called before persistentIndexList as the user might create persistent indexes as a response to the signal Fixes: QTBUG-93466 Pick-to: 6.2 5.15 Change-Id: I73c24501f536ef9b6092c3374821497f0a8f0de4 Reviewed-by: David Faure <david.faure@kdab.com>
* Remove the qmake project filesJoerg Bornemann2021-01-071-6/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-231-1/+1
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Regenerate tests with new qt_ prefixed APIsAlexandru Croitor2020-07-091-1/+1
| | | | | | | | Use pro2cmake with '--api-version 2' to force regenerate projects to use the new prefixed qt_foo APIs. Change-Id: I055c4837860319e93aaa6b09d646dda4fc2a4069 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Use QList instead of QVector in widgets testsJarek Kobus2020-06-251-13/+14
| | | | | | Task-number: QTBUG-84469 Change-Id: I490fdb237afad2d8a15954fe34d6b549a83fa4aa Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove deprecated members from QtWidgets/itemviews classesVolker Hilsheimer2020-04-171-9/+0
| | | | | | | | Cleaning up those that are trivial to remove because they have direct replacements. Change-Id: Ie9fecd8c4822ed1a8f378b210cc4c4d9a10f7e36 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Regenerate projects one last time before mergewip/cmakeAlexandru Croitor2020-02-121-4/+3
| | | | | | Change-Id: Ia24cf56b79ca6dacd370a7e397024e9b663e0167 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/dev' into merge-devLeander Beernaert2020-01-241-12/+28
|\ | | | | | | Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
| * 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>
| * QList/Table/TreeWidgetItem: Allow reseting values by passing the default valueChristian Ehrlicher2019-11-221-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/dev' into wip/cmakeLeander Beernaert2019-11-191-0/+9
|\| | | | | | | Change-Id: Ifecc2d9db396d783124df8567553ba5f846f30bb
| * Widget tests: Skip tests that fail on WaylandJohan Klokkhammer Helsing2019-10-181-0/+9
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Regenerate tests/auto/widgets/itemviewsAlexandru Croitor2019-11-131-2/+11
| | | | | | | | | | Change-Id: Ia95c89cde7faf5d3edb69cc8969bda2becd7b51d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-141-240/+204
|\| | | | | | | Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
| * 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>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-06-031-5/+9
|\| | | | | | | | | | | Take 5. Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
| * Fix compilation with Qt 6Lars Knoll2019-05-061-2/+2
| | | | | | | | | | Change-Id: Ie165ab2f17740a996112b7e918b595d5873674a1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * QListWidgetItem constructors: don't emit dataChanged(invalid, invalid)David Faure2019-04-231-3/+7
| | | | | | | | | | | | | | | | | | | | | | This is a regression introduced by 63967313f57add which blocked signals on the view, but not on the model. Change-Id: Ib2f93fe6ef842264aaba200c98ee4a19065ca220 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Laurent Montel <laurent.montel@kdab.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | Merge commit 'dev' into 'wip/cmake-merge'Tobias Hunger2019-04-161-16/+21
|\| | | | | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
| * Fix deprecation warnings in widget autotestsChristian Ehrlicher2019-02-081-4/+7
| | | | | | | | | | | | | | | | Fix all deprecation warnings within tests/auto/widgets Change-Id: I854f54c0a1dc0a0086f626b93cd39f63cb1b6033 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * QListWidget: mark (is|set)Item(Selected|Hidden) as deprecatedChristian Ehrlicher2018-12-041-12/+14
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Begin port of qtbase to CMakeSimon Hausmann2018-11-011-0/+8
|/ | | | | | | | | | | | | | | Done-by: Alexandru Croitor <alexandru.croitor@qt.io> Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Done-by: Kevin Funk <kevin.funk@kdab.com> Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Done-by: Simon Hausmann <simon.hausmann@qt.io> Done-by: Tobias Hunger <tobias.hunger@qt.io> Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-by: Volker Krause <volker.krause@kdab.com> Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
* Implement QListModel::moveRowsLuca Beldi2018-09-061-0/+108
| | | | | | | | | | Implemented the virtual method moveRows to allow row movement. [ChangeLog][QtWidgets][QListWidget] Implemented moveRows in model Task-number: QTBUG-69807 Change-Id: I212b560b8778306a0315d9d5e4710efcc7dbbe44 Reviewed-by: David Faure <david.faure@kdab.com>
* Implement clearItemData in common modelsLuca Beldi2018-09-061-0/+25
| | | | | | | | | | A virtual method clearItemData was added to QAIM for Qt6. This patch implements that method to all Qt concrete models for which it makes sense. Task-number: QTBUG-69616 Change-Id: If980fcfc36f723128bc56ec4587c5c3a338dbbcc Reviewed-by: David Faure <david.faure@kdab.com>
* tests/auto/widgets/itemviews: Avoid unconditional qWait()sKari Oikarinen2018-05-091-1/+1
| | | | | | | Task-number: QTBUG-63992 Change-Id: Id4fcb0c2e4f83edd9508565468e16f57e100c780 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* QListWidgetItem/QStandardItem: pass role to dataChanged() signalChristian Ehrlicher2018-01-261-6/+24
| | | | | | | | | | | | QAbstractItemModel::dataChanged() gained an optional role parameter with Qt5 which was not filled within QListWidgetItem/QStandardItem setData() functions Task-number: QTBUG-55903 Task-number: QTBUG-63766 Change-Id: I4da9346ef8401cc8633dc4b2ea7d00451d1e3942 Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Fix tst_QListWidget::QTBUG50891_ensureSelectionModelSignalConnectionsAreSetTor Arne Vestbø2017-07-211-2/+1
| | | | | | | | | | Don't assume signals will not be emitted during show. The test should focus on testing that changing the model results in change signals. What happens before that is not under test, and not stable. Change-Id: I71e62abc15fc81c069d7685e4342e795449c3632 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Plug remaining memleaks in tests/auto/widgets/itemviewsMarc Mutz2017-01-261-1/+1
| | | | | | | | | | ... on Linux AMD64 builds. Pass QObject parents to QObjects otherwise leaked. Change-Id: Ia4f0ad2fdc4ef62a3d35a2cfca74965f79692da3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* tests/auto/widgets: use QCOMPARE(., nullptr)Marc Mutz2016-11-301-6/+6
| | | | | | | | | | | | .. instead of manually casted 0s. QCOMPARE(., nullptr) was added for Qt 5.8. Make use of the new API. In tst_qwidget.cpp, as a drive-by, change qApp->focusWidget() -> QApplication::focusWidget() Change-Id: I1331b8916b026d48e01534d1ed0b3d72f3f3d50c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-231-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also reverts commit 0d2f0164f45cb626c40a7c95026ba00fa56ac249. Conflicts: header.BSD-NEW qmake/Makefile.win32 src/openglextensions/qopenglextensions.cpp src/openglextensions/qopenglextensions.h src/winmain/qtmain_win.cpp src/winmain/qtmain_winrt.cpp tools/configure/configureapp.cpp util/glgen/qopenglextensions.cpp.header util/glgen/qopenglextensions.h.header Change-Id: If26c6f4111b342378dd88bbdc657e322d2ab6ad8
| * Fix warnings in tst_q{table,list}widgetMarc Mutz2016-11-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC warned: tst_qtablewidget.cpp:30: tst_qtablewidget.cpp: In member function ‘void tst_QTableWidget::mimeData()’: qtestcase.h:66:52: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (!QTest::qVerify(static_cast<bool>(statement), #statement, "", __FILE__, __LINE__))\ ^ tst_qtablewidget.cpp:1523:5: note: in expansion of macro ‘QVERIFY’ QVERIFY(data = table.mimeData(tableWidgetItemList)); ^~~~~~~ Fix by adding the extra parentheses, as usual. Change-Id: I2826d7a865b4113b468d5a958ede06e03aa0e278 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QListWidget: setup connections when changing selection model.Samuel Gaist2016-02-211-0/+26
| | | | | | | | | | | | | | | | | | | | | | QListWidget uses a set of slots for its selection model that are connected only at creation time. This patch adds the missing connections cleanup and setup when a user changes the selection model. Task-number: QTBUG-50891 Change-Id: I942bae6c471ea1ae22637d09b96d6fbd422f653f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Updated license headersJani Heikkinen2016-01-211-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Tests: Remove empty init/cleanup slots, constructors and destructors.Friedemann Kleint2015-12-101-13/+1
| | | | | | | | | | | | | | | | Move some code (like registrations of meta types) from init() to initTestCase() in the process. Change-Id: I57db5156647cfadab554fbed853b2e68b2815f3b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | tests/auto/widgets: Remove some placeholder formatting.Friedemann Kleint2015-10-191-18/+18
|/ | | | | | | | Use QByteArray/QString addition instead in loops and for test row names. Change-Id: Ia067cd966bf13506e6ca19925eae3158da027b83 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* tests/auto/widgets: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-311-5/+5
| | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: Ie29640451dddeb58342038a8cd5fac152cce39e5 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Use ItemIsUserTristate instead of ItemIsTristate in table & list tests.David Faure2015-05-091-4/+4
| | | | | | | | ItemIsTristate only makes sense in tree widgets, where it triggers the auto-tristate behavior between parents and children. Change-Id: Idfa8bb5d0b9c63fe450115fb58d088929e11c7ff Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Implement QTableWidget/QListWidget::mimeData()Giuseppe D'Angelo2014-10-311-1/+54
| | | | | | | | | | | | | | | For some reasons lost in history, those methods simply ignore the list of items passed to them, and always return NULL. Of course, that's totally broken. Fix that by doing the same thing that the respective (hidden) models did when calling mimeData(). Surprisingly enough, QTreeWidget has a proper implementation. Task-number: QTBUG-25900 Change-Id: I99ca7b4d4f87f096fd9ff0b0cb4e58282aa9c26e Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Removing a few unneeded "? true : false"Alessandro Portale2014-10-091-1/+1
| | | | | | | Change-Id: Ib13f0ddd65fe78f5559f343f2fc30756b1d3ef76 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Fix tst_QListWidget::task217070_scrollbarsAdjusted()J-P Nurmi2014-04-091-1/+1
| | | | | | | | QMacStyle::styleHint(SH_ScrollBar_Transient) wants either a style object or the widget argument in order to return correct values. Change-Id: I2fdef0820334fa66e076a4734eb2a30c722c841c Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Stabilize tst_QListWidgetJ-P Nurmi2014-04-091-16/+3
| | | | | | | | Replace weird QEventLoop hacks by sending all posted deferred delete events. Change-Id: I6da743f2b3fb6ef5dfc960dd3d752973cd511037 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-131-14/+14
| | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0Debao Zhang2013-03-281-1/+0
| | | | | Change-Id: I1264784d6984edc70bf07e58ed763e1d1b001d7d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Widgets: Remove declaration of built-in and automatic metatypes.Stephen Kelly2013-01-041-2/+0
| | | | | | | | These types are either built-in or 'automatically declared' and so don't need to be explicitly declared as metatypes. Change-Id: Ibe8e2ec867afb4051a3c7eef806d9cd86945928b Reviewed-by: David Faure <david.faure@kdab.com>
* Remove metatype registration of built-in types.Stephen Kelly2013-01-031-1/+0
| | | | | | | | As they are built-in, they are effectively registered at compile-time already. Change-Id: I7ae6ba16088eab5d19213fa7b07c2a7760988a86 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Mac: refactor scrollbar animationsJ-P Nurmi2012-11-021-3/+6
| | | | | | | | | Get rid of QWidget-centric QMacStyle::eventFilter() and implement the fade out animations for scrollbars using QNumberStyleAnimation-based QFadeOutAnimation. Change-Id: I2000fa50d46b153e981ceafc12a53932a196382e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* normalise signal/slot signatures [QtWidgets tests]Marc Mutz2012-10-191-22/+22
| | | | | Change-Id: Iffab60f0911a55e4be09faeb29df0bae1ea2eb19 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>