summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-141-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
| * Reset the QItemSelectionModel when its model is reset.Stephen Kelly2013-08-131-0/+2
| | | | | | | | | | Change-Id: I12af41adb18a2ecf8825b23d5715766dcae55436 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | qdoc: Clarify documentation of member functionsMartin Smith2013-08-131-76/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When implementing a custom subclass of QAbstractItemModel, if the custom model will use MIME types other than the default internal MIME type, the mimeTypes() member must be reimplemented to return the list of allowed MIME types. If mimeTypes() is reimplemented, mimeData(), canDropMimeData(), and dropMimeData() must also be reimplemented to use the allowed MIME types. Task-number: QTBUG-32362 Change-Id: Iee5cf5d2dbed8a6c1f7ab47a7a4b9b03e80e8e59 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-231-2/+4
|\| | | | | | | | | | | | | Conflicts: tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp Change-Id: I18a9d83fc14f4a9afdb1e40523ec51e3fa1d7754
| * Doc: Update description of QAbstractItemModel::supportedDragActions()Topi Reinio2013-07-161-2/+4
| | | | | | | | | | | | | | | | | | | | Update documentation for the QAbstractItemModel::supportedDragActions() (virtual since 5.0) and the obsoleted setter function. Task-number: QTBUG-32410 Change-Id: I4f77601bca63e5f782ade1f577104500f541bbb1 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
* | Merge branch 'stable' into devSergio Ahumada2013-07-111-1/+4
|\| | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
| * Remove default argument from declarations of qHash as friendGiuseppe D'Angelo2013-07-021-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's illegal in C++11: §8.3.6.4 [dcl.fct.default] "If a friend declaration specifies a default argument expression, that declaration shall be a definition and shall be the only declaration of the function or function template in the translation unit." Clang is starting to enforce this, thus it's making qtbase not compiling. Task-number: QTBUG-32100 Change-Id: Ifd9d4f62354d7cf4ccf275f36aab64e05c59efff Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-231-1/+1
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/corelib/json/qjsonwriter.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbkeyboard.cpp Change-Id: I46fef1455f5a9f2ce1ec394a3c65881093c51b62
| * Remove references to inexisting enums in Q_ENUMSOlivier Goffart2013-05-081-1/+1
| | | | | | | | | | | | | | | | | | moc currently silently ignores them, but I have a version which display a warning. Change-Id: I9a239cb7e99d40a57a013fb66357c4a6426d6e8b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-04-291-1/+1
|\| | | | | | | Change-Id: I2a54058b64ac69c78b4120fdaf09b96e025a4c6c
| * Fix QAbstractItemModel::moveColumn()J-P Nurmi2013-04-231-1/+1
| | | | | | | | | | | | | | Task-number: QTBUG-30346 Change-Id: I3d6dbe1e88bb5e2748eadabb2663f30be16f8d18 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Merge branch 'stable' into devSergio Ahumada2013-04-102-5/+5
|\| | | | | | | Change-Id: Icff019d74ae04c628a80f66aa478e4db40fae464
| * Don't bypass overwritten [set]data() methods in the proxy.Volker Krause2013-04-081-4/+2
| | | | | | | | | | | | | | | | | | By calling itemData() of the source model directly, the result cannot contain data provided by the proxy model itself. The base class implementation however will call data() on the proxy instead. Change-Id: Ib0ef5f5621457adbfa4bd896a756dfcb98d0ae54 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| * Don't call virtual methods after the source model is destroyed.Stephen Kelly2013-04-052-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Calling clear_mapping causes the persistent indexes to be queried, and mapped using map_to_source, so that they can be restored later. That is not the appropriate response to the source model being deleted because there won't be anything to restore. Simply clear the stored mapping information instead so that the source model actually exists when mapToSource is called by the framework. Change-Id: I99692ee7aa9c6714aec45c68fe4a2d62be189d60 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Add some easy move constructorsMarc Mutz2013-04-051-0/+5
|/ | | | | | | | | | | | | These are easy, since they can be inline. Most types that would benefit from move constructors can't have inline move constructors because these types use smart pointers whose destructor is invoked in the type's move constructor. Implementing move constructors out-of-line would break binary compatibility between C++98 and C++11 builds of Qt and its users, so that is not attempted here. Change-Id: I7f14437c2069cce54c498c7858f4e9060ff05e7b Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Document undefined behavior regarding Qt::ItemNeverHasChildren.Stephen Kelly2013-03-261-0/+3
| | | | | | Change-Id: I4c044b206ad6dd57f11d791d8a6a6f3f931acf4f Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Merge branch 'dev' into stableOswald Buddenhagen2013-03-209-26/+65
|\ | | | | | | | | | | | | | | | | | | | | | | This starts Qt 5.1 release cycle Conflicts: src/gui/text/qfontdatabase.cpp src/gui/text/qharfbuzz_copy_p.h src/widgets/kernel/qapplication.cpp src/widgets/kernel/qcoreapplication.cpp Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-054-10/+9
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/generators/mac/pbuilder_pbx.cpp src/corelib/kernel/qtimerinfo_unix.cpp src/plugins/platforms/cocoa/qcocoabackingstore.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
| * | Update roleNames in QAbstractProxyModel if sourceModel resets.Nils Jeisecke2013-01-302-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a sourceModel resets, it's roleNames might have changed. This is most likely the case if sourceModel itself is also a proxy model of which the sourceModel was changed. Task-number: QTBUG-28982 Change-Id: I102788f2c9bf97b4002b350673f9219e32e7a052 Reviewed-by: Nils Jeisecke <jeisecke@saltation.de> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| * | Provide the resetInternalData slot to cleanly reset data in proxy subclasses.Stephen Kelly2013-01-302-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | This was part of Qt 4.8, but Qt 5.0 was branched before that, so the commit was lost. Change-Id: I2a2ab3c75a0943ac734d588ebd74bc158dd6aaaf Reviewed-by: Nils Jeisecke <jeisecke@saltation.de> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-01-291-1/+1
| |\ \ | | | | | | | | | | | | refs/staging/dev
| | * \ Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-281-1/+1
| | |\ \ | | | | | | | | | | | | | | | Change-Id: I12b4d8b99bdccae53b1a978cd6eb8f4ac6fb3c76
| * | | | Add the Qt::ItemNeverHasChildren flag and use it in QTreeView.Stephen Kelly2013-01-292-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can be used to determine whether expand() should really expand. Change-Id: If79d8c295a4ca1356e60051682b227524a065126 Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| * | | | Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-296-24/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
| * | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-2213-13/+13
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * \ \ \ Merge branch 'stable' into devSergio Ahumada2013-01-091-14/+14
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Change-Id: I7f0dab6bdb1f3cc1d3e6c30166ff6db9dfae37e9
| * \ \ \ \ Merge branch 'stable' into devFrederik Gladhorn2013-01-043-3/+7
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/painting/shared/shared.pri src/corelib/tools/qharfbuzz_p.h src/corelib/tools/qunicodetools.cpp src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp Change-Id: Ibc9860abf570e5ce8b052fb88feb73ec35e64bd3
| * | | | | | Get the default flags from the direct-base, not the indirect.Stephen Kelly2013-01-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QStringListModel inherits QAbstractListModel. Change-Id: I942321b2e5949f54041e11089f4131a646618b9e Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | | | | | Clarify mention of QAbstractItemView in the canFetchMore docs.Stephen Kelly2013-03-191-3/+2
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic93054d8fc68497fb0bcc2c5491924b9c57b78ad Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | | | | Doc: Added the missing example snippetsVenugopal Shivashankar2013-02-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The snippet files referred were outside the scope exampledirs for QtCore. I made of a copy of those files in the snippets folder to fix this issue. Task-number: QTBUG-29755 Change-Id: I2f765104394071d035e9cee610945ae290033deb Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
* | | | | | Forward the 3rd parameter of dataChangedAlbert Astals Cid2013-02-212-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I94f893bf65cd150c3cb1099c91cb13882bcca79a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | | | | Emit which role actually changedAlbert Astals Cid2013-02-211-1/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | Change-Id: I596a81628e5553779986a94769e114d89a44b264 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | | | Doc: Fix module name formatSze Howe Koh2013-01-251-1/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtCore -> Qt Core QtDBus -> Qt D-Bus QtDesigner -> Qt Designer QtGui -> Qt GUI QtImageFormats -> Qt Image Formats QtNetwork -> Qt Network QtPrintSupport -> Qt Print Support QtScript -> Qt Script QtSql -> Qt SQL QtSvg -> Qt SVG QtTest -> Qt Test QtWebKit -> Qt WebKit QtWidgets -> Qt Widgets QtXml -> Qt XML QtConcurrent -> Qt Concurrent (partial) QtQuick -> Qt Quick (partial) Also, distinguish between "module" and "library" Change-Id: Icb8aa695ae60b0e45920b0c8fce4dc763a12b0cd Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | | | Update copyright year in Digia's license headersSergio Ahumada2013-01-1813-13/+13
| |_|/ |/| | | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Replace macro qdoc with Q_QDOCDebao Zhang2013-01-081-14/+14
| |/ |/| | | | | | | | | | | | | Both qdoc and Q_QDOC are used in source code, which looks not good. Change-Id: I4f3a71670278b0758d92bfa5db086a07e1b1acfd Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | QAbstractProxyModel: Document setSourceModel a bit moreDavid Faure2012-12-201-0/+4
| | | | | | | | | | | | | | Especially so that subclasses remember to emit reset. Change-Id: Iadcae3fc5fe72584465d4134f385ed0a1d77bfcd Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Docs: Fix referencesChristian Stenger2012-12-132-3/+3
|/ | | | | Change-Id: I48173186afb874d307010f4f303d0e4f97ec0287 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Add more qtbase implictly-shared classes to the listGiuseppe D'Angelo2012-11-301-0/+1
| | | | | | | QText*Format and QDns* ones are still missing. Change-Id: I8e87fba596e87289ca935717e0a90bfc0b0a26c0 Reviewed-by: hjk <qthjk@ovi.com>
* QtCore: Make more signals private.Stephen Kelly2012-11-282-2/+6
| | | | | | Change-Id: Ida190e8b9c1ff47a6f54a5bf68673ab50a2f1bfe Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QAbstractProxyModel: fix sibling() reimplementationMark Brand2012-11-081-1/+1
| | | | | | | | | | | The previously missing mapFromSource() sets the proxy model in the returned index. Otherwise, the returned index refers incorrectly to the source model. Follow-up to 9dfba89c28bbff3316cb7aed6c07f90c0f2d5a22 and e5ac4fb9b236c782e3ed6f15044eb9956246931a Change-Id: I25cd7baa4a93284ab14ede988ac524971870794e Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Remove qSort/qStableSort usages from itemmodelsGiuseppe D'Angelo2012-11-073-12/+18
| | | | | Change-Id: I53c650f170fc8a6142373c1e7da0f4876188a39e Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QIdentityProxyModel: fix sibling() reimplementationMark Brand2012-11-021-1/+1
| | | | | | | | | | | The previously missing mapFromSource() sets the proxy model in the returned index. Otherwise, the returned index refers incorrectly to the source model. Follow-up to 9dfba89c28bbff3316cb7aed6c07f90c0f2d5a22. Change-Id: I78ab9183820909b646a7333f28aa5ec7266fa675 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add implementations of QAIM::sibling in public APIs.Stephen Kelly2012-11-029-0/+50
| | | | | | Change-Id: I2248641f2ed8735c28bd9572470520995a4a5b62 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Strip trailing whitespace in itemviews.Stephen Kelly2012-11-011-1/+1
| | | | | | | | | | | Using git ls-files -z | xargs -0 sed -i 's/ \+$//' in the relevant directories. Change-Id: I861ef9952fb32ed2db9ec8b67864ec7d0d61f0f2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use the layout change hint to speed up QItemSelectionModel.Stephen Kelly2012-10-223-28/+110
| | | | | | | | | | | The testcase in the bug report takes 370035 ms to sort the rows with Qt 4, and 5646 ms in Qt 5 (when using the extra hints to layout*Changed). That's an improvement of more than 98%. Task-number: QTBUG-17732 Change-Id: If78f972d80c501e0cb39078228086c4f4ac8a65b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Handle the case where persistent indexes have gone invalid.Stephen Kelly2012-10-191-0/+6
| | | | | | | | | | | | | | | | | | | Don't add invalid ranges to the result. They will be removed whenever d->ranges is processed for public consumption anyway. For example, QItemSelectionModel::selection() calls merge() with another selection. The merge() method removes invalid ranges already. But the invalid ranges don't need to be there in the first place, so this patch removes them. A longer-term goal is to maintain d->ranges as an always-sorted list. This method can be called with a vector containing invalid QPersistentModelIndexes when those persistent indexes are made invalid in between layoutAboutToBeChanged and layoutChanged. It's a normal thing to happen and a case that should be handled deliberately. Change-Id: I741ed9208d8a75644975c9e8d61f0d6d78e20576 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add docs to clarify and restrict what the LayoutChangeHint means.Stephen Kelly2012-10-051-0/+4
| | | | | Change-Id: I1b786c5151bcce253b6afa1eebc85e864ed7e91f Reviewed-by: David Faure <david.faure@kdab.com>
* Forward the layout change hint through QSortFilterProxyModel.Stephen Kelly2012-10-022-20/+20
| | | | | Change-Id: Ic9ae7f011f63c4a53fec4d9425ac6cd6776153ee Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Return QPersistentModelIndexes from QItemSelectionRange.Stephen Kelly2012-10-011-2/+2
| | | | | | | | | They are stored as such anyway, and this allows clients to not have to convert between QModelIndex and back so much. This should be fully source-compatible. Change-Id: Ia606ea082442089a0aae1583380c3710ce61d3d1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Emit layout change hint from QStringListModel.Stephen Kelly2012-09-301-2/+2
| | | | | Change-Id: I8b4a01cfcca59103f2616b72645994a22bff40dd Reviewed-by: Marc Mutz <marc.mutz@kdab.com>