aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlitemmodels
Commit message (Collapse)AuthorAgeFilesLines
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-2/+2
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix failed assertions coming from the QML list modelLars Knoll2017-12-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | QAbstractItemModel has become more strict in sanity checking the arguments of beginInsertRows and friends with change 00c09e752ff7e482e1308e0e34721dc979204595 in qtbase. Unfortunately, the QML list model was feeding it out of bound rows in some cases, leading to failed assertions. Fix this properly, by calculating the inserted/removed and changed rows on the fly when syncing the list model from the worker thread. Adjust the code in the XML list model as well, so it does call things in the proper order. Fix two tests, one for a minimal change in behavior (more correct now), the other to remove an assertion that is not valid anymore in debug builds (where assertions in QtCore will call rowCount()). Change-Id: Ied85269f78d41b64e06388590be3ed227ac88fdb Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Updated license headersJani Heikkinen2016-01-203-51/+36
| | | | | | | | | | | | 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: I04760a0801837cfc516d1c7c02d4f503f6bb70b6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Remove CONFIG += parallel_test.Friedemann Kleint2015-09-051-2/+0
| | | | | | | The keyword no longer has a meaning for the new CI. Change-Id: I699f2881e291cce02a6a608a8710638886e38daa Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Remove QT_DISABLE_DEPRECATED_BEFORE=0 from tests not using deprecated API.Friedemann Kleint2015-09-031-1/+0
| | | | | Change-Id: I691b8ddff60b5f16f06d32b379c76e87f44f84a9 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Remove QItemSelection value-type, use Array insteadGabriel de Dietrich2015-03-223-20/+33
| | | | | | | | We implement this by adding QItemSelection to the set of sequence types. Change-Id: Ia3db376c806d8f062639e22c7f4bf392f114c266 Reviewed-by: Stephen Kelly <steveire@gmail.com>
* Remove QModelIndexList value type, use Array insteadGabriel de Dietrich2015-03-223-23/+82
| | | | | | | | We implement this by adding QModelIndexList to the set of sequence types. Change-Id: If7e0e88ab0c2916c2b65a926f8241549520d7391 Reviewed-by: Stephen Kelly <steveire@gmail.com>
* tst_qqmlitemmodels: Remove pointless QVariant::type() checksGabriel de Dietrich2015-03-051-5/+0
| | | | | | Change-Id: If817b30aad08fa32697feab7ba4035d66309ed10 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Add Q_GADGET wrappers for QModelIndex & Co.Gabriel de Dietrich2015-02-1210-0/+856
The complete list of types is, * QModelIndex * QModelIndexList * QPersistentModelIndex * QItemSelection * QItemSelectionRange These wrapper types follow the QQmlValueType conventions and allow us to expose the wrapped types without introducing meta-type changes. They also allow to customize the string type representation. We also extend QQmlValueTypeFactory to return the meta-object for those types. Finally, we add two-way meta-type conversion between QModelIndex and QPersistentModelIndex to get the same interoperability as in C++ when passing an object of one type to a function requir- ing an object of the other type. Change-Id: Iaa7089ea576c901f12715ffa21e4d94603d53755 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>