summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels
Commit message (Collapse)AuthorAgeFilesLines
* 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>
| * Merge remote-tracking branch 'origin/5.9.0' into 5.9Liang Qi2017-05-191-1/+4
| |\ | | | | | | | | | Change-Id: Ia8ac1960387c0f78c32f9d0385bb0aa9a8209af1
| | * QItemSelectionRange: don't compare pointers with op<Marc Mutz2017-04-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | ... use std::less<> to avoid undefined behavior. Change-Id: Ib6736f86359c4a16fd90ca63b57a8517c6137ead Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | Remove a QT_STRICT_ITERATORS ifdefSérgio Martins2017-05-201-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | Having special code paths defeats the purpose of QT_STRICT_ITERATORS and is ugly. Change-Id: Ie0bdbf1a9639a0903bcd020f526629ab2e69883b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Merge remote-tracking branch 'origin/5.9' into devFrederik Gladhorn2017-05-101-1/+2
|\| | | | | | | | | | | Change-Id: I172e3e19ddcc5b7665e6c8382d725e7cc4f9794f
| * | Fix missing handling of columns when merging selection rangesFilippo Cucchetto2017-05-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes two bugs: 1) Two ranges should not be merged if they are of different columns. The old code would have merged (0,0) with (1, 1). Tranforming a selection of just two indexes in a rectangle of four indexes. 2) The QItemSelectionRange appended had wrong column and worked only for indexes of the first column. For example if 'tl' was (0, 1) than br was (0, 1) so the QItemSelectionRange would have be ((0,1), (0, 1-1)) so ((0,1), (0,0)). This QItemSelectionRange is invalid because topLeft columns is greater than bottomRight column. The fix take in consideration the bottomRight column. Task-number: QTBUG-58871 Change-Id: I591ef0bcc63926f24a7b1ced002af9b7737a4b6e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-072-0/+4
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
| * | QtCore: include mocsThiago Macieira2017-05-052-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compilation and link times in CPU seconds with GCC 7, using precompiled headers (not including moc, rcc, uic, etc. steps or headersclean): Before After Debug -O0 198,1 180,3 Debug -Og 240,7 229,2 Release -O3 267,1 249,2 Release LTO 239,4 229,8 QtCore required a little manual adjusting because some files are bootstrapped into moc itself and into qmake. Change-Id: I84e363d735b443cb9beefffd14b8b57c10e7da36 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | QSFPM optimization in dataChanged: don't re-sort if the order didn't changeDavid Faure2017-03-231-12/+43
| | | | | | | | | | | | | | | | | | | | We can quickly check if the change affects sorting by checking whether lessThan(N-1, N) and lessThan(N, N+1) are still true. If this is the case for all changed rows, then we can skip the whole remove+insert+layoutChanged(). Task-number: QTBUG-1548 Change-Id: Ia778b3e8880cc9909eef1f8a016c84235870353d Reviewed-by: Stephen Kelly <steveire@gmail.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-201-1/+1
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemengine_win.cpp src/gui/text/qdistancefield.cpp src/plugins/platforms/xcb/qxcbconnection.h Change-Id: I1be4a6f440ccb7599991159e3cb9de60990e4b1e
| * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-131-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| | * Fix documentation typosChristian Gagneraud2017-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes 2 simple typos in QGraphicsItem and QPainter documentation and a copy/paste error between QAbstractItemModel's beginRemoveColumns and beginRemoveRows documentation. Change-Id: I32bdc4dc69154a40fe30a5b8c08d0c3a001853f8 Reviewed-by: Harri Porten <porten@froglogic.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Add support for recursive filtering in QSFPMFilipe Azevedo2017-03-142-98/+253
| | | | | | | | | | | | | | | | | | | | | | | | You can now use the recursiveFiltering property to recurse into children to find potential matching children to filter in. Change-Id: I411a2fb29489fd56b9c881b3e6b8d1860cce630c Reviewed-by: Stephen Kelly <steveire@gmail.com>
* | | QStringListModel: fix corner-case in sibling()Giuseppe D'Angelo2017-02-171-1/+1
|/ / | | | | | | | | | | | | | | A negative row can be passed but should not result in a spurious index returned. Change-Id: I57f180615020d24826e9b3807557ba172ed469c3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-253-84/+50
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Merge remote-tracking branch 'origin/5.8.0' into 5.8Liang Qi2017-01-141-0/+18
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qcoregraphics.mm Change-Id: I4d49535cd75f2cdf0151c1dbff312cce5e159760
| | * 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>
| * | QIPM: Persist model indexes after emitting layoutChange, not beforeStephen Kelly2016-12-211-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Callers can persist a QModelIndex which was not persisted before in a slot connected to the signal, and such a persisted index must be updated in the course of the layoutChange. Store the indexes to persist after emitting the signal. Task-number: QTBUG-32981 Change-Id: Ibee4c0d84817d72603a03fe5b22fdeefeac0695e Reviewed-by: David Faure <david.faure@kdab.com>
| * | QSFPM: Remove data manipulation from move handlersStephen Kelly2016-12-211-55/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the fix in the parent commit, incorrect updating of the internal data structures during layout changes can lead to dangling pointers being dereferenced later. Moves are treated as layoutChanges by this proxy by forwarding to the appropriate method. However, data is incorrectly cleared prior to that forwarding. Remove that, and let the layoutChange handling take appropriate action. Change-Id: Iee951e37152328a4e6a5fb8e5385c32a2fe4c0bd Reviewed-by: David Faure <david.faure@kdab.com>
| * | QSFPM: Fix handling of source model layout changeStephen Kelly2016-12-211-20/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In sourceLayoutAboutToBeChanged the source model update is ignored if the affected parents are filtered out anyway. The same logic is attempted in the sourceLayoutChanged slot, but there the early-return logic is applied too late - the mapping is cleared before performing the early-return. Because pointers into the mapping are used in the internalPointer of QModelIndexes in this class, persistent indexes used later will segfault when attempting to dereference it. Additionally, if a parent becomes invalid as a result of the layoutChange, it would be filtered out by the condition in the loop, resulting in a different result in the comparison of emptiness of the parents container. Fix that by persisting the parent's container, and performing the test for early-return before clearing the mapping. Task-number: QTBUG-47711 Task-number: QTBUG-32981 Change-Id: If45e8a1c97d39454160f52041bc9ae7e337dce97 Reviewed-by: David Faure <david.faure@kdab.com>
* | QStringListModel: default data()s 'role' argumentMarc Mutz2017-01-191-1/+1
| | | | | | | | | | | | | | | | | | ... the way it's done elsewhere, too. Change-Id: Icbb6802c2244469cda7db7eb9e088cf3b7729c89 Task-number: QTBUG-58160 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Remove qtypetraits.h's contents altogetherGiuseppe D'Angelo2017-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So that QFlags can use an (un)signed int matching the underlying type as identified by the compiler and not by us. Requires fixing a few warnings about sign conversion due to QFlags misusages in qtbase that were either plain wrong, or were relying on the enum being backed by an (un)signed int when it wasn't. Keep qtypetraits.h in the source tree in order to prevent source breaks if some downstream #includes it (note however that it did not contain any public API). Change-Id: Ib3a92b98db7031e793a088fb2a3b306eff4d7a3c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QItemSelectionRange: de-inline op<Marc Mutz2016-12-022-26/+28
|/ | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-221-1/+1
|\ | | | | | | | | | | | | Conflicts: src/plugins/platforms/ios/qiosviewcontroller.mm Change-Id: I2dda31867cbc79ea7fe965f52afb518aefa4ad20
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-211-1/+1
| |\ | | | | | | | | | Change-Id: I9cfefaf22b010fca937be77979f5fb50574bb71e
| | * QAbstractProxyModel: fix sentence structure in apidocFrederik Schwarzer2016-09-191-1/+1
| | | | | | | | | | | | | | | Change-Id: Ib3371549ecb80da326260b1df431f20e7a04f07e 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>
* | | Deprecate Q(Persistent)ModelIndex::childGiuseppe D'Angelo2016-08-162-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to how invalid model indices are handled in Qt, child() is unsuitable for general purpose usage. In particular you can never get a top level item in the model because the root model index by definition hasn't got a pointer to the model it belongs. That makes child() useless for anything but tree models (and even there you'd need to special case your code anyhow). [ChangeLog][QtCore][QModelIndex] QModelIndex::child has been deprecated due to its lack of generality. Use model->index(row, column, index) instead. [ChangeLog][QtCore][QPersistentModelIndex] QPersistentModelIndex::child has been deprecated due to its lack of generality. Use model->index(row, column, index) instead. Change-Id: Ice73c17133aaf71355fa2af1eacfe64da01bd456 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-161-1/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/global/qglobal.cpp src/corelib/tools/qstring.cpp src/network/socket/qabstractsocket.cpp src/network/socket/qnativesocketengine_unix.cpp src/plugins/platforms/eglfs/api/qeglfsglobal.h Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-131-1/+7
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/io/qsettings.cpp src/corelib/itemmodels/qstringlistmodel.cpp tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp Change-Id: I1c6c306ef42c3c0234b19907914b19da706b4a03
| | * QStringListModel: fix dataChanged's roles parameterMarc Mutz2016-08-121-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QStringListModel, the display and the edit roles are synonyms, so when one is changed, the other changes with it. However, in setData() we only emitted a vector with just the role that was passed in by the user. Fix by always passing both roles, regardless of which one was used to set the data. Change-Id: I498e7cb33796fae266901817b01ad85d861d4bb4 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-092-4/+6
|\| | | | | | | | | | | Change-Id: I36e6b890b65d12bf6931757540bcc9c553b5eb8f
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-052-4/+6
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: I6f3878b204464313aa2f9d988d3b35121d4d9867
| | * QStringListModel: begin/endResetModel() are no signalsMarc Mutz2016-08-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | ... so don't use emit on them. Just confuses readers. Change-Id: I24365fc533b5b35f8942d6014dbc68387aa23e22 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * QSortFilterProxyModel: Don't forward the hint from source's layoutChanged signalOlivier Goffart2016-08-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't forward a VerticalSortHint or HorizontalSortHint hint, because we might be filtering extra items. The documentation of QAbstractItemModel::LayoutChangeHint states: Note that VerticalSortHint and HorizontalSortHint carry the meaning that items are being moved within the same parent, not moved to a different parent in the model, and not filtered out or in. And some of the views rely on this assumption (QQmlDelegateModel for example) What happens in the test is the following: - 'model' emit the dataChanged signal when its data is changed. - 'proxi1' QSortFilterProxyModelPrivate::_q_sourceDataChanged does not forward the dataChanged signal imediatly, it will instead first re-sort the model and call layoutAboutToBeChanged / layouChanged with the VerticalSortHint - 'proxy2' would forward the layoutAboutToBeChanged with the hint, but in QSortFilterProxyModelPrivate::_q_sourceLayoutChanged, it will redo the mapping which will cause the changed data to be filtered. So proxy2 can't forward the VerticalSortHint as it removed rows in the process. Change-Id: I20b6983e9d18bf7509fe6144c74f37d24e4a18c2 Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | | ItemModel: Extract Method isVariantLessThan()Anton Kudryavtsev2016-07-023-34/+41
|/ / | | | | | | | | | | | | | | | | | | | | | | | | As noted in comments, QSortFilterProxyModel and QStandardItemModel duplicate code to compare QVariant; extract this into a separate method they can share. Since there is only one common suitable header for both files, the method was placed in qabstractitemmodel.cpp Change-Id: I82bb4a2d6084059b8a70a8d556c16f1a29f4f686 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp src/network/access/qnetworkaccessmanager.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h src/widgets/widgets/qlineedit_p.cpp src/widgets/widgets/qlineedit_p.h src/winmain/winmain.pro tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp tools/configure/configureapp.cpp Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a