summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qitemselectionmodel.h
Commit message (Collapse)AuthorAgeFilesLines
* Make sure we can build with -no-feature-itemmodelUlf Hermann2018-03-211-0/+2
| | | | | | | Various pieces of code have to be disabled in this case. Change-Id: I83b133f17e9f024016a79c9103293627185449d2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-1/+1
| | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Convert features.itemviews to QT_[REQUIRE_]CONFIGStephan Binner2017-07-251-4/+0
| | | | | | | The QT_NO_ITEMVIEWS queries in corelib/ seem to had no effect at all. Change-Id: I494ee2309a96b0cf25de18781fc9a675878a2ee9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-251-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Work around MSVC ABI stupidity in exporting inline members of base classThiago Macieira2017-01-031-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | In this case, the issue was ICC, when compiling QtQml: qv4sequenceobject.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl QList<class QItemSelectionRange>::replace(int,class QItemSelectionRange const &)" (__imp_?replace@?$QList@VQItemSelectionRange@@@@QEAAXHAEBVQItemSelectionRange@@@Z) referenced in function "public: static bool __cdecl QV4::QQmlSequence<class QItemSelection>::deleteIndexedProperty(struct QV4::Managed *,unsigned int)" (?deleteIndexedProperty@?$QQmlSequence@VQItemSelection@@@QV4@@SA_NPEAUManaged@2@I@Z) This applies the same fix as qvector.h has had for ages due to QPolygon. Change-Id: I15b62e0f9cec482fbb40fffd1490d791db5056bc Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QItemSelectionRange: de-inline op<Marc Mutz2016-12-021-24/+1
|/ | | | | | | | | It's a bit large for an inline function. Note for Qt 6 that this function is nonsense. Change-Id: If6af5d3538aac86d55313ba6accdb13f892e6564 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* fix build with various QT_NO_* definesNick Shaforostoff2016-08-261-5/+6
| | | | | | | Done-with: Andriy Gerasika <andriy.gerasika@gmail.com> Change-Id: I90883a491dbddb005c3d756c339e42285d50e437 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QItemSelectionRange: make nothrow move-assignable and -constructibleMarc Mutz2015-07-221-0/+11
| | | | | | | | | The move special members were inhibited by the presence of a user-defined copy ctor, which we cannot remove since the class is exported. Change-Id: I7118588b808387f2733d93216c8c3b117666bb9e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QItemSelectionRange: use ctor-init-listMarc Mutz2015-07-221-8/+3
| | | | | | | | Avoids default-constructing two QPersistentModelIndex instances just to copy-assign to them. Change-Id: I0f3e04e3d202f58905f74df44d37dba27911a927 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QItemSelectionRange: add nothrow member-swapMarc Mutz2015-07-221-0/+6
| | | | | | Change-Id: Ie550f4a66b3c623b0ec630c18f38bcd96f6bbc99 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QItemSelection: declare as shared-come-Qt6Marc Mutz2015-07-181-1/+5
| | | | | Change-Id: I07fe36777f8e64c4551243b5dfc3273f1783e954 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtCore: Use Q_NULLPTR instead of 0 in all public headersMarc Mutz2015-07-011-1/+1
| | | | | | | | | This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: I0cc388ef9faf45cbcf425ad0dc77db3060c104a8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QItemSelectionModel: Make selectedIndexes a Q_PROPERTY.Stephen Kelly2015-03-271-1/+2
| | | | | | | | | | With reasoning similar to commit v5.5.0-alpha1~124 (Make the QItemSelectionModel::selection a property., 2015-02-25), this should be a property instead of a Q_INVOKABLE so that it can participate in persistent bindings. Change-Id: Ib9a7900dfa3acbd6f9f7df7b6f00deb6e05c3937 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Make the QItemSelectionModel::selection a property.Stephen Kelly2015-03-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | QML code like this should be possible: Text { text: selModel.selection.contains(modelIndex) ? "blue" : "yellow" } If the selection is just a Q_INVOKABLE method, then all consumers need to set up Connections { target: selModel selectionChanged: foo() } That is obviously not the API we want (made more clear by the fact that the signal is already perfectly named) because it is not declarative but it can be. So, make it declarative by making selection a property. Change-Id: Id1a05ae9b91e45e6d462bea4272b8740571e9fc3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@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>
* Use Q_ENUM and Q_FLAG for types in QtCoreOlivier Goffart2015-02-041-1/+1
| | | | | | Change-Id: I33590a9c4c6d87c5bbba1d201e32c6bf1bd3e00b Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Allow exposing QItemSelectionModel to QMLGabriel de Dietrich2015-02-031-10/+22
| | | | | | | | | | | | | | | | | | | | | This requires being able to create a QItemSelectionModel without specifiying its model, and also setting the model later. Also, several classes, like QPersistentModelIndex, need to be declared as meta-type. Finally, and in order to introduce the 'model' property, we need to have a type compatible getter. Hence the new, non-const model() function. Where needed, meta-type declarations have been removed from auto-tests. [ChangeLog][QtCore][Item Models] QItemSelectionModel can now be created without a model and have one set later. Change-Id: If49bed061a5d1012331f335ca7f6e3959ecd3f1c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-291-4/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.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>
* Use the layout change hint to speed up QItemSelectionModel.Stephen Kelly2012-10-221-2/+2
| | | | | | | | | | | The testcase in the bug report takes 370035 ms to sort the rows with Qt 4, and 5646 ms in Qt 5 (when using the extra hints to layout*Changed). That's an improvement of more than 98%. Task-number: QTBUG-17732 Change-Id: If78f972d80c501e0cb39078228086c4f4ac8a65b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Return QPersistentModelIndexes from QItemSelectionRange.Stephen Kelly2012-10-011-2/+2
| | | | | | | | | They are stored as such anyway, and this allows clients to not have to convert between QModelIndex and back so much. This should be fully source-compatible. Change-Id: Ia606ea082442089a0aae1583380c3710ce61d3d1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Deprecate QItemSelectionModel::intersect().Stephen Kelly2012-04-021-3/+6
| | | | | | | It is already obsolete since the beginning of time (Qt 4.5). Change-Id: Ia2f9d934f0c0bd2038d693a29d1315867a526dfe Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-251-1/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Move proxy and selection models to QtCore.Stephen Kelly2011-12-161-0/+256
Change-Id: I71097855cb9e28105238e496778f29f99f7fc84e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>