summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-161-0/+5
|\ | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qshortcut.cpp tests/auto/network/access/spdy/tst_spdy.cpp Change-Id: If76c434beac2c0a393440aa365f89f77439774ce
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-151-0/+5
| |\ | | | | | | | | | Change-Id: I8dbcf23835d52d3aa7d018ed250814d60c68aa83
| | * Doc: Correct non-link related qdoc compilation errorsNico Vertriest2020-01-141-0/+5
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-79824 Change-Id: I94dc566c9fb11bc8c598c0d5c043b6f388ebdc80 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Don't mix QHash and QMultiHashLars Knoll2020-01-061-17/+11
| | | | | | | | | | | | | | | Change-Id: I8a6ec788f995ef2609e971e0a2f330973975657a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-01-044-20/+46
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | QIdentityProxyModel: implement moveRows / moveColumnsGiuseppe D'Angelo2020-01-022-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It makes sense for it (instead of triggering the QAbstractItemModel base class implementation, which doesn't do anything). Safe to override virtuals in this case -- code calling the old version could not do anything useful, so at least new code gets those functions properly implemented for free. Change-Id: Iefe1ff25e15d877435e93ab28289ad2579616f72 Task-number: QTBUG-48076 Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: David Faure <david.faure@kdab.com>
| * | QStringListModel: fix moveRows()Christian Ehrlicher2019-12-161-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | QStringListMode::moveRows() had an issue when the destination was before the source row. Change-Id: Icf64e5b4cdd6a39faf3ba4ccc3883196b247ccbd Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: David Faure <david.faure@kdab.com>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-161-8/+9
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket.cpp src/widgets/kernel/qapplication.cpp Change-Id: Ib7421cc2df59d0969f89b3fbd65a17ea76ffef3b
| | * Let QItemSelectionModel::columnIntersectsSelection honor the parentChristian Ehrlicher2019-12-141-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QItemSelectionModel::columnIntersectsSelection() should honor the parent according to the docs. For rowIntersectsSelection() this was fixed a long time ago but columnIntersectsSelection() was forgotten. Sync the both functions and use range-based for loops as a drive-by. Fixes: QTBUG-80644 Change-Id: Iaf08f85e2225204d1e6564fa4bb0bc826352ed53 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-094-13/+13
|\| | | | | | | | | | | Change-Id: Ia24cc8b86def0d9d9c17d6775cc519e491b860b1
| * | Tidy nullptr usageAllan Sandfeld Jensen2019-12-064-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-253-8/+24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qhash.h src/gui/kernel/qevent.h src/widgets/kernel/qshortcut.cpp src/widgets/kernel/qshortcut.h Change-Id: If61c206ee43ad1d97f5b07f58ac93c4583ce5620
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-232-6/+22
| |\| | | | | | | | | | Change-Id: I1c68f2f6bc35d344c60a1898b68bf2ca79e54a9d
| | * QSortFilterProxyModel: Add change signals for propertiesKai Uwe Broulik2019-11-222-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes it more easily consumable from QML. This patch only adds them for properties where no behavior change (i.e. no "if (m_foo == foo) return" changes) is necessary. The other ones will be done in a follow-up patch. Change-Id: If9f35cf9ac382e6f626db138a88eb14cebda1d52 Reviewed-by: David Faure <david.faure@kdab.com>
| * | Deprecate constructing QFlags from a pointerAllan Sandfeld Jensen2019-11-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This was used to support QFlags f = 0 initialization, but with 0 used as a pointer literal now considered bad form, it had been changed many places to QFlags f = nullptr, which is meaningless and confusing. Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Make QList an alias to QVectorLars Knoll2019-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is almost 100% source compatible with Qt 5. Exceptions are * Stability of references for large or non movable types * taking a PMF for types that are now overloaded with r-value references in QVector * The missing prepend optimization in QVector (that is still planned to come for Qt 6) Change-Id: I96d44553304dd623def9c70d6fea8fa2fb0373b0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-261-4/+4
|\| | | | | | | | | | | Change-Id: I379794a01cbf6fb39d94b24cc8c90b1971a212b9
| * | QItemSelectionModel: make parent an optional parameterChristian Ehrlicher2019-10-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make parent an optional parameter to be consistent with the rest of the API. Change-Id: I5942fee69ca33bd87d4d14b6919d2b8d5b60c0b4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-211-10/+30
|\| | | | | | | | | | | Change-Id: I642be6de9ef32491b09db97185146c671266240e
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-191-10/+30
| |\| | | | | | | | | | Change-Id: I69f44ea7254cb2643a00b040bbb46f41b7f76a87
| | * QSortFilterProxyModel: Add a cheaper way to find source_sort_columnUlf Hermann2019-10-181-10/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two places where we are only interested in the mapping of proxy to source sort column, rather than the full mapping. Creating the full mapping is rather expensive as it iterates all rows and columns and allocates a large number of objects. Just figuring out the n-th accepted column can be much cheaper. Fixes: QTBUG-41659 Change-Id: I7ea914cb695518b4d47cdc3ad67c7786380d8709 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-171-4/+28
|\| | | | | | | | | | | Change-Id: Ica69de99be9c8af4d28a52e4b69e6af748ed983c
| * | QAbstractItemModel: implement QRegularExpression support for matchSamuel Gaist2019-10-161-4/+28
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part of the migration of qtbase from QRexExp to QRegularExpression. [ChangeLog][QtCore][QAbstractItemModel] The match() method now supports the new Qt::RegularExpression match flag value. This will allow users to use either a string or a fully configured QRegularExpression when doing searches. In the second case, the case sensitivity flag will be ignored if passed. Task-number: QTBUG-72587 Change-Id: I07c8d72a661c48b7f4fcf13ef8e95980bcdcb998 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Get rid of QList forward declarationsLars Knoll2019-10-041-1/+0
| | | | | | | | | | | | | | | | Include qcontainerfwd.h instead where required. This prepares for unifying QList and QVector. Change-Id: I6c85e2bdd44fb41aedd884b0d551f682760df5b5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/dev' into wip/qt6Alexandru Croitor2019-09-041-4/+11
|\| | | | | | | Change-Id: I54741635460bb2d8f3fd0be535ee1968d6c442bb
| * Micro-optimize QAbstractItemModel::setItemDataGiuseppe D'Angelo2019-08-221-4/+11
| | | | | | | | | | | | | | | | | | If b becomes false, we won't call setData ever again. Just bail out the loop early and return in that case. Change-Id: I4b0ed7e21546d686bc3f785209a314a8bed08471 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/dev' into wip/qt6Lars Knoll2019-08-062-48/+39
|\| | | | | | | Change-Id: Ib719a6249069e6bd6c9311bbec7f364855ab82ff
| * QSortFilterProxyModel: avoid some unnecessary copiesChristian Ehrlicher2019-07-311-34/+30
| | | | | | | | | | | | | | | | Clean up QSortFilterProxyModel by using const refs instead copies and range-based for loops instead plain loops Change-Id: Ic1250f33e7c311a9e1d3c19cc5dc7a9578423e74 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * QAbstractItemModel: don't inherit QHash just to add elementsMarc Mutz2019-07-161-14/+9
| | | | | | | | | | | | | | | | | | Now that we can depend on C++11, use _WITH_ARGS and std::initializer_list. Saves ~400B in text size on optimized AMD64 GCC 9.1 Linux LTO builds. Change-Id: I37fce1c63a5f74f6dfc059febf0152ac93c8be7f Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge remote-tracking branch 'origin/dev' into wip/qt6Alexandru Croitor2019-07-081-0/+2
|\| | | | | | | Change-Id: I02cbc4f77a82100b96cdb90c160ce0207f180d7f
| * Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-011-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket_openssl.cpp src/platformsupport/vkconvenience/qvkconvenience.cpp Change-Id: I97ce6ed185f7fdad8102cc58d3cfec0119fd7bb4
| | * QTransposeProxyModel: include the moc in the .cppThiago Macieira2019-06-281-0/+2
| | | | | | | | | | | | | | | | | | | | | All the other QtCore files do. Change-Id: Ie7ae7616eadf4035bec6fffd15ac3b5479716ff3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Merge remote-tracking branch 'origin/dev' into wip/qt6Simon Hausmann2019-06-261-1/+1
|\| | | | | | | | | | | Change-Id: I4ea2b77cc201daed94fbe321f146dfd20365a534
| * | Port from QAtomic::load() to loadRelaxed()Giuseppe D'Angelo2019-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Semi-automated, just needed ~20 manual fixes: $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} + $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} + It can be easily improved (e.g. for store check that there are no commas after the opening parens). The most common offender is QLibrary::load, and some code using std::atomic directly. Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Merge remote-tracking branch 'origin/dev' into wip/qt6Alexandru Croitor2019-06-062-0/+4
|\| | | | | | | | | | | Change-Id: Iac12a37fa6536ebe30e6548f7c54ec0c402c9f5d
| * | Fix build without features.itemmodelTasuku Suzuki2019-05-142-0/+4
| | | | | | | | | | | | | | | | | | | | | The macro needed to avoid generating headers_*.o from the header files. Change-Id: I4fc5ec2432661493e337e1779d79373dedff0132 Reviewed-by: David Faure <david.faure@kdab.com>
* | | Bump version to Qt 6Lars Knoll2019-05-142-1/+9
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Needed to disable QT_NO_UNSHARABLE_CONTAINERS, as this triggers asserts. QMetaType also has some Qt 6 specific code disabled to get things to compile. Fix various details in autotests to accommodate for the changes with Qt 6. Add a workaround for black lists on macos, where QSysInfo::productType() now returns 'macos' and not 'osx' anymore. Change-Id: Ie26afb12a2aac36521472715934a7e34639ea4d0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-04-241-1/+1
|\| | | | | | | | | | | | | | | | | Conflicts: src/gui/util/qshaderformat.cpp src/gui/util/qshaderformat_p.h src/widgets/graphicsview/qgraphicsitem_p.h Change-Id: Idafd88eb9a0a15b4af29f6143d009c1ec8ceecca
| * Optimize QAbstractTableModel::hasChildrenDavid Faure2019-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | Valid indexes cannot have children, in a table model, so there's no point in asking the model about it (by calling rowCount and columnCount). Change-Id: Ic2d7b52538a7b67acb2c35b26e69bba5956ef5af Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | QRegExp include cleanupSamuel Gaist2019-04-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRegExp includes can be found in several files where there's not even a use of the class. This patch aims to avoid needless includes as well as follow the "include only what you use" moto. This patch removes a QRegExp include from the QStringList header which means that there is likely going to be code breaking since QStringList is used in many places and would get QRegExp in. [ChangeLog][Potentially Source-Incompatible Changes] qstringlist.h no longer includes qregexp.h. Change-Id: I32847532f16e419d4cb735ddc11a26551127e923 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove handling of missing Q_COMPILER_RVALUE_REFSAllan Sandfeld Jensen2019-04-082-4/+0
| | | | | | | | | | Change-Id: I7bc6c455fbae4cdad584c76773299a6d8cd40c82 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/5.13' into dev" into ↵Qt Forward Merge Bot2019-04-044-29/+33
|\ \ | | | | | | | | | refs/staging/dev
| * | Replace Q_DECL_NOEXCEPT with noexcept in corelibAllan Sandfeld Jensen2019-04-032-23/+23
| | | | | | | | | | | | | | | | | | | | | In preparation of Qt6 move away from pre-C++11 macros. Change-Id: I44126693c20c18eca5620caab4f7e746218e0ce3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Replace Q_NULLPTR with nullptr in corelibAllan Sandfeld Jensen2019-04-031-1/+1
| | | | | | | | | | | | | | | Change-Id: I9cdb5b7015c62c50b35f8a6519ea4e777db97683 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-03-311-5/+9
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/configure.json Change-Id: I93ac67f3bf4844bc7c691183e94bceb922b7b919
| | * Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-03-261-5/+9
| | |\ | | | | | | | | | | | | Change-Id: I71cc71881fb638e207d83a8733bad8f267701c0f
| | | * Fix tree recursion in QAbstractItemModel::match()Friedemann Kleint2019-03-221-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recurse down the sibling at column 0 of the index instead down the index. Change-Id: Ie78d8b28eab7438ca3f83ee0df177115ca82806e Fixes: QTBUG-73864 Reviewed-by: David Faure <david.faure@kdab.com>
* | | | Remove remaining Q_DECL_NOEXCEPT/Q_DECL_NOTHROW usageAllan Sandfeld Jensen2019-04-041-2/+2
|/ / / | | | | | | | | | | | | Change-Id: I91ac9e714a465cab226b211812aa46e8fe5ff2ab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* / / More nullptr usage in headersKevin Funk2019-03-143-3/+3
|/ / | | | | | | | | | | | | | | | | | | | | Diff generated by running clang-tidy's modernize-use-nullptr checker on the CMake-based Qt version. Skipping src/3rdparty, examples/, tests/ Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix some qdoc warningsFriedemann Kleint2019-03-072-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/corelib/itemmodels/qtransposeproxymodel.cpp:166: (qdoc) warning: Unknown command '\details' src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp:102: (qdoc) warning: '\brief' statement does not end with a full stop. src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp:233: (qdoc) warning: Undocumented parameter 'index' in QConcatenateTablesProxyModel::flags() src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp:165: (qdoc) warning: Undocumented parameter 'proxyIndex' in QConcatenateTablesProxyModel::mapToSource() src/corelib/io/qresource.cpp:275: (qdoc) warning: Can't link to 'isCopressed()' src/corelib/io/qresource.cpp:555: (qdoc) warning: Can't link to 'compressionType()' src/network/ssl/qocspresponse.cpp:47: (qdoc) warning: '\brief' statement does not end with a full stop. src/network/ssl/qocspresponse.cpp:47: (qdoc) warning: Can't link to 'QSslSocket::ocspResponse()' src/gui/image/qimage.cpp:2247: (qdoc) warning: Undocumented parameter 'f' in QImage::convertTo() src/gui/image/qimage.cpp:2247: (qdoc) warning: No such parameter 'format' in QImage::convertTo() src/gui/text/qtextformat.cpp:1420: (qdoc) warning: Undocumented parameter 'styleName' in QTextCharFormat::setFontStyleName() src/gui/text/qtextformat.cpp:1420: (qdoc) warning: No such parameter 'style' in QTextCharFormat::setFontStyleName() src/widgets/dialogs/qdialog.cpp:151: (qdoc) warning: Unknown command '\p' src/widgets/dialogs/qdialog.cpp:167: (qdoc) warning: Unknown command '\p' src/widgets/dialogs/qdialog.cpp:167: (qdoc) warning: Unknown command '\p' src/widgets/dialogs/qdialog.cpp:168: (qdoc) warning: Unknown command '\p' Change-Id: Ide52b70f8e72d53767d489ce1a413cf4c2dce7df Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>