summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/itemmodels
Commit message (Collapse)AuthorAgeFilesLines
* Add ; to Q_UNUSEDLars Schmertmann2020-07-072-12/+12
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use QList instead of QVector in corelib testsJarek Kobus2020-07-075-37/+37
| | | | | | Task-number: QTBUG-84469 Change-Id: Ic80fde5517aed363f17d0da55cadcc958c3c8895 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove the deprecated QDirModelVolker Hilsheimer2020-06-041-39/+2
| | | | | | | | | QFileSystemModel is the documented replacement. It uses threads to populate the model, which QDirModel doesn't. Change-Id: I7818ecd8f849eb566ac176612f382e17a0471c47 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add a property to QSFPM to show children of accepted itemsGiulio Camuffo2020-05-261-0/+32
| | | | | | | | [ChangeLog][QtCore][QSortFilterProxyModel] Add a 'autoAcceptChildRows' property to always show children rows of accepted rows. Change-Id: I2402469ece438179d0f19888b9775cc27cf5c749 Reviewed-by: David Faure <david.faure@kdab.com>
* Remove QRegExp support from QSortFilterProxyModelLars Knoll2020-04-158-145/+8
| | | | | | | | Map setFilterWildcard() and setFilterFixedString() to now use QRegularExpression. Change-Id: I2dff2015234decb2badfd306975dcff8553cdd7f Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Make MatchRegExp an alias to MatchRegularExpressionLars Knoll2020-03-301-2/+2
| | | | | | | All matching happens using QRegularExpression now. Change-Id: I10bfcefbf4d9c79d235242e3e05116cdf7af02d1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Speed up QSortFilterProxyModel filteringChristian Ehrlicher2020-03-272-0/+102
| | | | | | | | | | Speed up the QSortFilterProxyModel filtering by only updating the source_to_proxy entries which are really changed - When proxy intervals are added or removed, it is not needed to update the proxy_to_source indexes which were not touched. Change-Id: I35459ff1b04f4610ec74f4b01d58a71832a9ae22 Reviewed-by: David Faure <david.faure@kdab.com>
* Add a way to filter only rows or columns in QSortFilterProxyModelGiulio Camuffo2020-03-182-0/+82
| | | | | | | | | | | | | If we want to filter away a column without changing the filtering for the rows calling invalidateFilter() is wasteful because it will call filterAcceptsRow() for all rows even though that is not needed. This commit add two functions, invalidateRowsFilter() and invalidateColumnsFilter() that work the same way as invalidateFilter() except that they will invoke respectively only filterAcceptsRow() and filterAcceptsColumn(). Change-Id: Ib4351cf08c229bd97bbbfee6da92397dca579a84 Reviewed-by: David Faure <david.faure@kdab.com>
* Merge remote-tracking branch 'origin/dev' into merge-devLeander Beernaert2020-01-244-65/+98
|\ | | | | | | Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
| * QIdentityProxyModel: implement moveRows / moveColumnsGiuseppe D'Angelo2020-01-021-35/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-28/+25
| | | | | | | | | | | | | | | | | | 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-0/+4
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket.cpp src/widgets/kernel/qapplication.cpp Change-Id: Ib7421cc2df59d0969f89b3fbd65a17ea76ffef3b
| | * Let QItemSelectionModel::columnIntersectsSelection honor the parentChristian Ehrlicher2019-12-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Avoid initializing QFlags with 0 or nullptr in testsFriedemann Kleint2019-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | Amends qtbase/af2daafde72db02454d24b7d691aa6861525ab99. Change-Id: Ib5d17611e43e7ab2c63c7f0587f549377f262e32 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | Deprecate constructing QFlags from a pointerAllan Sandfeld Jensen2019-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2019-11-193-311/+249
|\| | | | | | | | | | | Change-Id: Ifecc2d9db396d783124df8567553ba5f846f30bb
| * | cleanup QSortFilterProxyModel testsChristian Ehrlicher2019-10-243-311/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QSortFilterProxyModel tests: - adjust includes - use nullptr - use override - avoid unneeded casts - use new signal/slot syntax Change-Id: I05f7c18cd2642bc8251bf1560803e7635684d24d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeSimon Hausmann2019-10-171-0/+28
|\| | | | | | | | | | | Change-Id: Ia1da879a7bd8f71a649661a1844144dd67d60b3a
| * | QAbstractItemModel: implement QRegularExpression support for matchSamuel Gaist2019-10-161-0/+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>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-141-4/+14
|\| | | | | | | | | | | Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
| * | Deprecate QDirModelFriedemann Kleint2019-09-041-4/+14
| |/ | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-10-113-55/+60
|\| | | | | | | Change-Id: I3a1d7673c3c20019ab12a2ea0a60f1619920a34c
| * Itemmodel tests: remove foreach usageChristian Ehrlicher2019-08-193-55/+60
| | | | | | | | | | | | | | | | | | Replace foreach with range-based for loop, replace some int values with the correct Qt flag enum as drive-by. Change-Id: I41c52f6ae6c537fa9ad4f9e169485533936952d1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | cmake: add tests/auto/corelib/itemmodelsFrederik Gladhorn2019-10-0412-6/+172
| | | | | | | | | | | | | | Fixes: QTBUG-78217 Change-Id: Ic2c343ab3cb1d86b9649e8ef242c7cd180f73c60 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-07-112-3/+3
|\| | | | | | | Change-Id: I715b1d743d5f11560e7b3fbeb8fd64a5e5ddb277
| * test: migrate ModelsToTest to QRegularExpressionSamuel Gaist2019-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part of the migration of qtbase from QRexExp to QRegularExpression. Task-number: QTBUG-72587 Change-Id: Ifea720470541000481fbacc510b4cb589c9990d9 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
| * test: migrate QItemSelectionModel test to QRegularExpressionSamuel Gaist2019-06-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part of the migration of qtbase from QRexExp to QRegularExpression. Task-number: QTBUG-72587 Change-Id: Ibbd161700bf9e75736652b99dfa1ffd47e584249 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-06-034-23/+23
|\| | | | | | | | | | | Take 5. Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
| * Tests: Fix some warnings about deprecated functions not under testFriedemann Kleint2019-05-274-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings like: baselineserver/shared/baselineprotocol.cpp:295:72: warning: ‘int QImage::byteCount() const’ is deprecated: Use sizeInBytes [-Wdeprecated-declarations] tst_qnetworkreply.cpp:1560:17: warning: ‘static QList<QSslCertificate> QSslSocket::defaultCaCertificates()’ is deprecated [-Wdeprecated-declarations] tst_qnetworkreply.cpp:1560:39: warning: ‘static QList<QSslCertificate> QSslSocket::defaultCaCertificates()’ is deprecated [-Wdeprecated-declarations] tst_qnetworkreply.cpp:8153:60: warning: ‘T* QWeakPointer<T>::data() const [with T = const QNetworkSession]’ is deprecated: Use toStrongRef() instead, and data() on the returned QSharedPointer [-Wdeprecated-declarations]. ... st_qprinter.cpp:1318:74: warning: ‘QList<QPagedPaintDevice::PageSize> QPrinterInfo::supportedPaperSizes() const’ is deprecated [-Wdeprecated-declarations] tst_qprinter.cpp:1362:74: warning: ‘QList<QPagedPaintDevice::PageSize> QPrinterInfo::supportedPaperSizes() const’ is deprecated [-Wdeprecated-declarations] tst_largefile.cpp:492:85: warning: ‘bool qEqual(InputIterator1, InputIterator1, InputIterator2) [with InputIterator1 = char*; InputIterator2 = char*]’ is deprecated: Use std::equal [-Wdeprecated-declarations] tst_largefile.cpp:498:91: warning: ‘bool qEqual(InputIterator1, InputIterator1, InputIterator2) [with InputIterator1 = char*; InputIterator2 = char*]’ is deprecated: Use std::equal [-Wdeprecated-declarations] tst_qabstractitemmodel.cpp:312:25: warning: ‘void QAbstractItemModel::reset()’ is deprecated [-Wdeprecated-declarations] ... tst_qabstractitemmodel.cpp:1793:28: warning: ‘void QAbstractItemModel::setRoleNames(const QHash<int, QByteArray>&)’ is deprecated [-Wdeprecated-declarations] ... tst_qcolor.cpp:1425:33: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations] tst_qcolor.cpp:1432:31: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations] tst_qprinterinfo.cpp:303:61: warning: 'QList<QPagedPaintDevice::PageSize> QPrinterInfo::supportedPaperSizes() const' is deprecated [-Wdeprecated-declarations] tst_qprinterinfo.cpp:304:65: warning: 'QList<QPair<QString, QSizeF> > QPrinterInfo::supportedSizesWithNames() const' is deprecated [-Wdeprecated-declarations] tst_qtextdocumentfragment.cpp:947:52: warning: ‘QString QTextCharFormat::anchorName() const’ is deprecated: Use anchorNames() instead [-Wdeprecated-declarations] tst_qtextlayout.cpp:2261:61: warning: ‘void QTextLayout::setAdditionalFormats(const QList<QTextLayout::FormatRange>&)’ is deprecated: Use setFormats() [-Wdeprecated-declarations] tst_qtextlayout.cpp:2330:42: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] tst_qitemselectionmodel.cpp:2214:37: warning: ‘QModelIndex QModelIndex::child(int, int) const’ is deprecated: Use QAbstractItemModel::index [-Wdeprecated-declarations] ... tst_qtextlist.cpp:317:68: warning: 'bool QTextList::isEmpty() const' is deprecated: Use count() instead [-Wdeprecated-declarations] tst_qpainter.cpp:373:32: warning: ‘void QPainter::setMatrixEnabled(bool)’ is deprecated: Use setWorldMatrixEnabled() instead [-Wdeprecated-declarations] tst_qpainter.cpp:374:40: warning: ‘bool QPainter::matrixEnabled() const’ is deprecated: Use worldMatrixEnabled() instead [-Wdeprecated-declarations] tst_qpainter.cpp:702:45: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] tst_qpainter.cpp:1573:29: warning: ‘void QPainter::drawRoundRect(const QRect&, int, int)’ is deprecated: Use drawRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations] tst_qpdfwriter.cpp:76:38: warning: ‘virtual void QPdfWriter::setPageSize(QPagedPaintDevice::PageSize)’ is deprecated: Use setPageSize(QPageSize(id)) instead [-Wdeprecated-declarations] tst_qpdfwriter.cpp:81:41: warning: ‘virtual void QPdfWriter::setPageSizeMM(const QSizeF&)’ is deprecated: Use setPageSize(QPageSize(size, QPageSize::Millimeter)) instead [-Wdeprecated-declarations] tst_qpdfwriter.cpp:105:30: warning: ‘virtual void QPdfWriter::setMargins(const QPagedPaintDevice::Margins&)’ is deprecated: Use setPageMargins(QMarginsF(l, t, r, b), QPageLayout::Millimeter) instead [-Wdeprecated-declarations] tst_qpdfwriter.cpp:172:37: warning: ‘virtual void QPdfWriter::setPageSizeMM(const QSizeF&)’ is deprecated: Use setPageSize(QPageSize(size, QPageSize::Millimeter)) instead [-Wdeprecated-declarations] tst_qpdfwriter.cpp:258:38: warning: ‘virtual void QPdfWriter::setPageSize(QPagedPaintDevice::PageSize)’ is deprecated: Use setPageSize(QPageSize(id)) instead [-Wdeprecated-declarations] qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp:3980:54: warning: ‘QModelIndex QModelIndex::child(int, int) const’ is deprecated: Use QAbstractItemModel::index [-Wdeprecated-declarations] tst_qlocale.cpp:434:26: warning: 'QString::null' is deprecated: use QString() [-Wdeprecated-declarations] ... Change-Id: I77c1a934b27119eedeb26a77c913686314a2a5c7 Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge commit 'dev' into 'wip/cmake-merge'Tobias Hunger2019-04-169-11/+1001
|\| | | | | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
| * Replace qMove with std::moveAllan Sandfeld Jensen2019-04-061-1/+1
| | | | | | | | | | | | Change-Id: I67df3ae6b5db0a158f86e75b99f422bd13853bc9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-03-264-4/+52
| |\ | | | | | | | | | Change-Id: I71cc71881fb638e207d83a8733bad8f267701c0f
| | * Fix tree recursion in QAbstractItemModel::match()Friedemann Kleint2019-03-222-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Silence the item model testsFriedemann Kleint2019-03-214-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a logging category for the qDebug()-output. Add a meta type registration for QList<QPersistentModelIndex>, fixing numerous warnings like: WARN : tst_QItemModel::remove(QStandardItemModel:invalid start, valid count 5) QSignalSpy: Unable to handle parameter 'parents' of type 'QList<QPersistentModelIndex>' of method 'layoutChanged', use qRegisterMetaType to register it. Fix a Clang warning about potential misuse of operator , Task-number: QTBUG-73864 Change-Id: I60998403a44f5df8767926951ee13d1ed1e93c37 Reviewed-by: David Faure <david.faure@kdab.com>
| * | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-041-0/+20
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also blacklist tst_QRawFont::unsupportedWritingSystem() and tst_QGlyphRun::mixedScripts() on windows for now. Conflicts: qmake/generators/makefile.cpp src/corelib/itemmodels/qstringlistmodel.cpp src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp tests/auto/gui/text/qglyphrun/BLACKLIST tests/auto/gui/text/qrawfont/BLACKLIST Task-number: QTBUG-72836 Change-Id: I10fea1493f0ae1a5708e1e48d0a4d7d6b76258b9
| | * Fix QStringListModel::setData to check for actual changesLuca Beldi2018-12-241-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QStringListModel::setData documentation states that "The dataChanged() signal is emitted if the item is changed." This patch actually respects the doc. setData will check that the data actually changed before sending the dataChanged signal. [ChangeLog][QtCore][QStringListModel] setData will now emit the dataChanged() signal only if the string set is different from the one already contained in the model Change-Id: I4308a6f3b4851203fb899c5e29a36076e0c32f2f Reviewed-by: David Faure <david.faure@kdab.com>
| * | New proxy model: QTransposeProxyModelLuca Beldi2018-11-053-0/+922
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented a new proxy model to transpose the source model. Rows will become columns and vice-versa. Both flat and tree models supported. [ChangeLog][QtCore] New class QTransposeProxyModel to swap rows and columns of the source model. Change-Id: I902963c6b81aa0f63b5ad2bddca538f28b565084 Reviewed-by: David Faure <david.faure@kdab.com>
| * | Fix use of deprecated ItemDataRoles Background/TextColorRoleChristian Ehrlicher2018-11-052-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace BackgroundColorRole/TextColorRole with BackgroundRole/ForegroundRole and explicit deprecate them for 5.13 Change-Id: I6b0d99844a32d2f5fdfd1878317a7b7422b800d3 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-10-251-2/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/animation/qpropertyanimation.cpp src/gui/image/qicon.cpp tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp Change-Id: I3698172b7b44ebb487cb38f50fd2c4a9f8a35b21
| | * Fix building tests with -no-guiJüri Valdmann2018-10-201-2/+2
| | | | | | | | | | | | | | | Change-Id: I37307080e5adc334fcfcdd2fee650d675228a746 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Begin port of qtbase to CMakeSimon Hausmann2018-11-014-0/+10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-10-081-0/+10
|\| | | | | | | | | | | | | Conflicts: src/widgets/styles/qstylesheetstyle.cpp Change-Id: I3a503b44ae413fbc0a90f4af70b8f84daffd86ad
| * QSFPM: don't let setFilterRegExp(QString) overwrite CaseSensitivityDavid Faure2018-10-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression from commit 346c15102b, which creates a new QRegExp in setFilterRegExp, losing previously set case sensitivity property (i.e. when the code does proxy->setFilterCaseSensitivity(Qt::CaseInsensitive) before setFilterRegExp). Interestingly that commit ensured that setFilterFixedString would still preserve CaseSensitivity, but not setFilterRegExp(QString). Change-Id: I3d37d001ce6e86dd90e7e07431440a42607172f9 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
* | New proxy model: QConcatenateTablesProxyModelDavid Faure2018-09-093-0/+829
| | | | | | | | | | | | | | | | | | | | | | | | | | It takes multiple source models and concatenates their rows into a single model. With full unit tests. [ChangeLog][QtCore] New class QConcatenateTablesProxyModel, to concatenate the rows from multiple source models. Change-Id: Iaf4f325473adef106f423677fdc5ee0e35e87d35 Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-072-0/+55
|\| | | | | | | Change-Id: I799e2ca2fefa140c8b73b73aa959c6ed8da6eae6
| * QSortFilterProxyModel: add test for inserting via a QComboBoxOlga Radko2018-09-062-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This new test double-checks the bugfix for QSortFilterProxyModel::insertRows in commit 70ba75519d. Previously, when using QComboBox on top of QSortFilterProxyModel and calling QComboBox::addItem with row==rowCount(), an empty item was inserted in one place, and then another item was modified (instead of the inserted empty one). This test checks that the above bugfix indeed fixes the behavior of QComboBox::addItem when used in this manner. Task-number: QTBUG-69158 Change-Id: Id01345e0525694a57250c656222d626e2267aa8e Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: David Faure <david.faure@kdab.com>
* | Reimplement QStringListModel::setItemDataLuca Beldi2018-09-061-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | Before this patch QStringListModel::setItemData emitted dataChanged twice if the roles map contained both DisplayRole and EditRole. This fixes the duplication. Increased efficiency of QStringListModel::itemData Task-number: QTBUG-67511 Change-Id: Ibaea17530f15627a3cb8003e5284e54001731ded Reviewed-by: David Faure <david.faure@kdab.com>
* | Implement QListModel::moveRowsLuca Beldi2018-09-061-8/+8
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-08-232-0/+236
|\| | | | | | | Change-Id: I1114f90a2ed04a784a66505960b0f2460778726d
| * Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-08-222-0/+236
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/text/qtextengine.cpp tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.h Change-Id: Ib9f968edbb0f3387c89bc25e914321d0738bfadc