summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels
Commit message (Collapse)AuthorAgeFilesLines
* Make QAbstractItemModel::resetInternalData virtual for Qt 6Frederik Gladhorn2018-11-081-1/+3
| | | | | | | Change-Id: I9cfeb93addb717abc187a8dab8d24076f68bd61d Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* New proxy model: QTransposeProxyModelLuca Beldi2018-11-055-0/+613
| | | | | | | | | | | | 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>
* doc: Add \since 6.0 to future functionsMartin Smith2018-10-302-0/+2
| | | | | | | | | | | | | | | | | qdoc needs to know that a qdoc comment should not be part of the documentation until a future version. In this case, some new functions were declared to become active in Qt 6.0, but qdoc had no way of detecting this and reported errors about them incorrectly. Adding \since 6.0 to the qdoc comments for these functions allows qdoc to ignore them without printing the errors. It is also not allowed to document static functions declared in .cpp files, because these functions are not in the public API. The qdoc comment marker was removed from the comments for a few such static functions. Change-Id: I55ce0e8fb823b1dcf498d5a2436ddb20ad0a7527 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-10-082-2/+3
|\ | | | | | | | | | | | | Conflicts: src/widgets/styles/qstylesheetstyle.cpp Change-Id: I3a503b44ae413fbc0a90f4af70b8f84daffd86ad
| * QSFPM: don't let setFilterRegExp(QString) overwrite CaseSensitivityDavid Faure2018-10-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * QSFPM: setFilterRegExp and setFilterRegularExpression overloads to slotsSamuel Gaist2018-10-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The setters of both filterRegExp and filterRegularExpression are currently normal functions. This patch moves them to slots to make them usable using the old syntax. This can be done since there are already overloads for both of them so people using the new connect syntax would have needed to use qOverload already therefore there is no SIC. [ChangeLog][QtCore][QSortFilterProxyModel] Setters of both the filterRegExp and filterRegularExpression properties are now slots and can be used with the old as well as the new syntax. Change-Id: Id5cd9a50fa4a62e2bbd6bd665b44bd25a0402852 Fixes: QTBUG-18113 Reviewed-by: David Faure <david.faure@kdab.com>
* | Fix a few overrides in Qt CoreAlessandro Portale2018-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change removes redundant 'virtual' from function declarations. Clang Tidy's modernize-use-override check reports: warning: 'virtual' is redundant since the function is already declared 'override' CppCoreGuidelines say: C.128: Virtual functions should specify exactly one of virtual, override, or final Change-Id: I9a4bdd6cc041d46ae64b25597ba4f7268ac4c2b7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* | New proxy model: QConcatenateTablesProxyModelDavid Faure2018-09-093-0/+858
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Reimplement QStringListModel::setItemDataLuca Beldi2018-09-062-7/+40
| | | | | | | | | | | | | | | | | | | | | | | | 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 clearItemData in common modelsLuca Beldi2018-09-064-0/+27
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-062-2/+6
|\| | | | | | | Change-Id: I2f6e1c0f649c5098723b776c774a8a689bb60582
| * QSFPM: cleanup QRegularExpression includesSamuel Gaist2018-09-032-2/+6
| | | | | | | | | | | | | | | | Add feature guard around the include in the header and remove the one from the implementation file. Change-Id: I8dc133cce786ead6059cc66b40a0ffb6c420096f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-08-231-2/+2
|\| | | | | | | Change-Id: I1114f90a2ed04a784a66505960b0f2460778726d
| * Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-08-221-2/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * QSortFilterProxyModel inserting at bottom of source modelLuca Beldi2018-08-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, if you try to insert a row at the bottom of QSortFilterProxyModel the row will be inserted in the source model at position proxy->rowCount rather than at the bottom. This causes insert at apparently random positions in the source. [ChangeLog][QtCore][QSortFilterProxyModel] QSortFilterProxyModel::insertRows(row,count,parent) with row == QSortFilterProxyModel::rowCount will insert at the bottom of the source model rather than at the row QSortFilterProxyModel::rowCount of the source model Task-number: QTBUG-58499 Task-number: QTBUG-69158 Change-Id: Ie78416c8fbc429303b8c9c98375630e3e4d85f6d Reviewed-by: David Faure <david.faure@kdab.com>
* | | Implement QStringListModel::moveRowsLuca Beldi2018-08-232-0/+33
|/ / | | | | | | | | | | | | | | | | | | Implemented the virtual method moveRows to allow row movement [ChangeLog][QtCore][QStringListModel] Implemented moveRows Task-number: QTBUG-69807 Change-Id: I518f48a321bd755ab56f2fe84883d27324cc42ec Reviewed-by: David Faure <david.faure@kdab.com>
* | Add support for QRegularExpression to QSortFilterProxyModelSamuel Gaist2018-08-192-19/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the support for QRegularExpression in QSortFilterProxyModel. [ChangeLog][QtCore][QSFPM] QSortFilterProxyModel now supports QRegularExpression. Task-number: QTBUG-46810 Change-Id: If932d55f98f9b8bcf3a72c03ffd51da52cb50ad1 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: David Faure <david.faure@kdab.com>
* | Add a method to clear the data to QStandardItemModelLuca Beldi2018-08-172-0/+20
| | | | | | | | | | | | | | | | | | | | After the behavior of setItemData has been changed following QTBUG-45114, QStandardItemModel was lacking an interface to clear all the data from a single index. Task-number: QTBUG-69616 Change-Id: Ide0b5bb6358439fc42c474df8b044fbace6def8d Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-07-022-11/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
| * Doc: Improve description of QModelIndex::operator==Paul Wicking2018-06-211-10/+8
| | | | | | | | | | | | | | | | | | | | List the values that are compared by the comparison operator overloads, rather than the less specific "all values". Task-number: QTBUG-68877 Change-Id: Id4df02b9019e13113fd38a598b8349293fab7915 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Doc: Add missing full stops in briefsPaul Wicking2018-06-211-1/+1
| | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: I3f2a9f8c562f9a44bb32bddd31d75abbfe6de04d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-291-1/+4
|\| | | | | | | Change-Id: I8d8b03ea46c537b091b72dc7b68aa6aa3a627ba6
| * QSortFilterProxyModel: don't assert when old model gets destroyedChristian Ehrlicher2018-05-261-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a new model was set with setSourceModel() and the mapping was built up, the destruction of the old model caused a reset in the QSortFilterProxyModel which lead to an empty view or an assertion. Now we properly disconnect the old model again and also clean up the old mapping/persistent indexes when a new source model is set. Task-number: QTBUG-44962 Task-number: QTBUG-67948 Task-number: QTBUG-68427 Change-Id: I2e0612899c210bde3ac0cfa59aefd78269deee5b Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-021-23/+46
|\| | | | | | | Change-Id: Ia082e20e2eb4b76afd4c1a1584ff4e5514655d7a
| * QItemSelectionModel: More fixes for is(Column/Row)SelectedDaniel Teske2018-04-301-27/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the code for isRowSelected and isColumnSelected with a much simpler algorithm for deciding if a row/column is selected. In a model with a cross-hatch of unselectable indexes, the return values of is(Column/Row)Selected would depend on the order in which the selections were done. Task-number: QTBUG-18001 Change-Id: I6aa4b1df7c07fae469a686041927fa8c42bc9b16 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * QitemSelectionModel: Fix a bug in isColumnSelectedDaniel Teske2018-04-301-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the code for isColumnSelected and isRowSelected differed slightly, in how unselectable indexes would be treated. This made isColumnSelected return false for a column, which mixed unselectable indexes and selected indexes. Thus in some situations, the user could not deselect a column via a QTableView header. By copying the isRowSelected code to isColumnSelected, rows and columns behave identical. Task-number: QTBUG-18001 Change-Id: I6ca85ac64b31a481fafeaa3bec958b18283eed8d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-03-2814-51/+53
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_mouse.mm src/testlib/testlib.pro Change-Id: Ia0ce4243418fe6a485b0f290c67bd433b3b04ff2
| * Make sure we can build with -no-feature-itemmodelUlf Hermann2018-03-2114-51/+53
| | | | | | | | | | | | | | Various pieces of code have to be disabled in this case. Change-Id: I83b133f17e9f024016a79c9103293627185449d2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | QSFPM: Faster row removesTim Angus2018-03-131-0/+13
|/ | | | | | | | | | | | | | | When the source model of a QSortFilterProxyModel has rows removed, a mapping is performed in order to figure out which corresponding rows in the sorted and filtered view of the model are affected. In doing so it constructs a vector of removal intervals which are subsequently used to emit rowsRemoved signals. In the case where many rows are removed (e.g. all of them), many removal intervals are identified that are often adjacent and could be simplified, which is what this patch does. i.e. instead of emitting 3 rowsRemoved for 0-3, 4-6, 7-12, now a single rowsRemoved is emitted for 0-12. Change-Id: Ia503091cc4928378c88257cd8b431582e9ff454e Reviewed-by: David Faure <david.faure@kdab.com>
* doc: Fix remaining qdoc warnings in qabstractitemmodel.cppMartin Smith2018-01-181-9/+9
| | | | | | | | Some enum values were qualified with the enum name, which is not required in the \value command. The qualifications were removed. Change-Id: Ic67003ae04b558f437b331bd3e01af88ace0e888 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QSortFilterProxyModel: annotate some deprecated functions as deprecatedChristian Ehrlicher2018-01-172-9/+12
| | | | | | | | | QSortFilterProxyModel::clear() and filterChanged() are deprecated since Qt4.3 but not annotated with QT_DEPRECATED. Change-Id: Ia468203802b6be0596f0a48d51f1da3fa55b724b Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add QModelIndex::siblingAtColumn and ::siblingAtRowAndre Somers2018-01-122-1/+29
| | | | | | | | | | | | | | | | | | | | Data in item models is most often organized in rows, where each column contains an attribute of the item represented by the row. Often when sibling is used, it is to request another piece of data from the same row. Having a specialized version makes this easier and less awkward to do, simplifying auto sibling = index.sibling(index.row(), columnOfInterest); to auto sibling = index.siblingAtColumn(columnOfInterest); For symmetry reasons, siblingAtRow(rowOfInterest) was also added. Change-Id: Ib203b2cdb16154cbb2680d16fb5c6a7538f33d07 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* Introduce QAbstractItemModel::checkIndex()Giuseppe D'Angelo2018-01-082-0/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When implementing a custom model there's the habit, in each and every function that takes a QModelIndex, to carefully checking the index passed by the caller. This index is checked for "legality" (*): does the index belong to this model, is the index pointing to an existing row and column, and so on. These checks are hand-rolled and, as such, slightly different and possibly incomplete (i.e. wrong) every time. What's worse, these checks are implemented via "ordinary" code (if statements). However, passing an illegal index to a QAIM function is a precondition violation, and as such does not (and must not) be checked in ordinary conditions, as it triggers undefined behavior. On the other hand, while debugging a custom model or a custom hierarchy of (proxy) models, having such checks in place can be a significant aid. Enter checkIndex(): a debugging helper for QAbstractItemModel and its subclasses. checkIndex() centralizes the checks for legality of a given index. User code is free to assert on it, or have some other fallback mechanism in case a check fails. (*) Using "legality" here instead of "validity" in order to avoid confusion between QModelIndex::isValid() and what checkIndex() really does. [ChangeLog][QtCore][QAbstractItemModel] Added QAbstractItemModel::checkIndex(), a debugging function for QAbstractItemModel subclasses. Change-Id: I1eea0586b1ac3ededdbfbf46759145022dc5ad86 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-022-7/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * Fix naming of new property QSortFilterProxyModel::recursiveFilteringDavid Faure2017-11-282-7/+7
| | | | | | | | | | | | | | | | | | | | | | Add "Enabled" to match Qt API naming rules. + fix \since tag. Change-Id: Iaf312648f7385cd7e8d3d101b561fbd4e955df25 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QAbstractItemModel: add more checks in begin{Insert,Remove}{Rows,Columns}Giuseppe D'Angelo2017-12-141-0/+4
| | | | | | | | | | | | | | Check that the inserted/removed range is indeed valid. Change-Id: Ifccbe13f0753252ee1450c8668df782dc699f05b Reviewed-by: David Faure <david.faure@kdab.com>
* | QSortFilterProxyModel: Clear persistent indexes on source model changeChristian Ehrlicher2017-11-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | When a new source model was set to QSortFilterProxyModel, the model tried to remap the persistent indexes to the new model which was wrong. The correct solution is to clear the persistent indexes with _q_sourceModelDestroyed() since the old source model went away. Task-number: QTBUG-44962 Change-Id: Id39e9ac83324250e8bfa434aae467a9206d2590e Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | QItemSelectionRange: speedup intersects() in negative caseChristian Ehrlicher2017-11-301-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QItemSelectionRange::intersects() needs to check if the parent of both QItemSelectionRanges is the same. This is a very expensive operation which should be done last. Same goes for isValid() which itself calls parent() for two indexes. This rearrangement speeds up some worst-case usecases by at least 30% as shown in the bug report. Task-number: QTBUG-60940 Change-Id: If6111a73cb8b97a8a0d0640527b34448d21f3143 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-261-1/+1
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h src/plugins/platforms/cocoa/qcocoawindow.h src/testlib/qtestsystem.h Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-061-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/qopenglwidget/main.cpp src/3rdparty/pcre2/src/pcre2_printint.c src/plugins/platforms/cocoa/qnsview.mm src/widgets/widgets/qcombobox.cpp Change-Id: I37ced9da1e8056f95851568bcc52cd5dc34f56af
| | * QModelIndex: use std::less to compare pointersGiuseppe D'Angelo2017-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Comparing pointers not belonging to the same array requires using std::less. Change-Id: I2725aa0899f6b9fece73dadd9ee5c10242d50ae1 Reviewed-by: David Faure <david.faure@kdab.com>
* | | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-196-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-197-104/+104
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.9' into devOswald Buddenhagen2017-08-023-11/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/widgets/qdockarealayout.cpp src/widgets/widgets/qmainwindow.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmainwindowlayout_p.h tests/auto/corelib/tools/qlocale/tst_qlocale.cpp tests/auto/other/macnativeevents/BLACKLIST tests/auto/widgets/widgets/qmenu/BLACKLIST Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
| * Convert features.itemviews to QT_[REQUIRE_]CONFIGStephan Binner2017-07-253-11/+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>
* | QSFPM: Avoid following a reset with unnecessary layoutChangedStephen Kelly2017-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the pattern used to guard Private::sort() calls elsewhere in the class. Because QAbstractItemModel::sort() is not called in the unit test, the content is not sorted after resetting. [ChangeLog][QtCore][QSortFilterProxyModel] QSortFilterProxyModel now does not emit an unnecessary layoutChanged() following a model reset. Change-Id: I0a36c7fbb172bdd06ecddb489c5595debbef6cb9 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-071-1/+1
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
| * QAbstractItemModel::supportedDragActions: fix regressionDavid Faure2017-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | This method now returns -1 by default, due to commit 6255cb893d which mistakenly replaced -1 with Qt::IgnoreAction (0x0). As a result, dropping is forbidden in a number of applications (I detected this in zanshin). Change-Id: I4922451216e08d5d3fe36f8ba87364a361b691bf Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-291-13/+24
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/common/msvc-desktop.conf mkspecs/win32-g++/qmake.conf mkspecs/win32-icc/qmake.conf src/platformsupport/fontdatabases/mac/coretext.pri src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: I74a6f7705c9547ed8bbac7260eb4645543e32655
| * QItemSelection: fix a quadratic loopMarc Mutz2017-05-221-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QList::erase(it) is a linear operation. Calling it in a loop constitutes quadratic behavior. Fix by using the erase-remove idiom. Write a generic function object QtFunctionObjects::IsNotValid, instead of a lambda, because I am building up a collection of such function objects in my tree, to be submitted any time now™, so this will reduce the churn once that gets merged. Wrap it in the unnamed namespace to avoid ODR violations in case this pattern repeats. Replace an existing erase-remove idiom's isNotValid lambda function with the new function object. Change-Id: I4f0af04e7b201eb168e79beeda332eee3c6f33c3 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>