summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qsortfilterproxymodel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix crash when invalidating a QSortFilterProxyModelStephen Kelly2012-09-141-6/+22
| | | | | | | | Backport of d7a15fbfd93fb566c7793596ea50d8786b9eb654 from qtbase. Task-number: QTBUG-27122 Change-Id: I0b1eda292fd9648e6f08629f7a069b66bb8b59e8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Avoid crashes when invalidating a proxy model filter.Stephen Kelly2012-08-081-3/+4
| | | | | | | | | | Backport of b84e180263d0da3d1e6967fcf759225a778ea6ea from qtbase. Task-number: QTBUG-26107 Change-Id: I8323b19ce7b641165de21ad9a6e6b05bf4d93b1c Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Add the QIdentityProxyModel.Stephen Kelly2011-04-121-1/+1
| | | | | | | | | | Older commit history is in KDE svn: http://websvn.kde.org/trunk/KDE/kdelibs/kdeui/itemviews/kidentityproxymodel.cpp?view=log Ammended to update the license headers. Merge-request: 900 Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-03-011-7/+8
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/text/qfontengine_mac.mm src/opengl/qpixmapdata_gl.cpp src/opengl/qwindowsurface_gl.cpp src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def tests/auto/qtextlayout/tst_qtextlayout.cpp
| * QSortFilterProxyModel::reset() should invalidate.Olivier Goffart2011-02-251-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | This was broken by: d149a3faca9b97ce806249bc7ef73fe2f59589d5 The connection was removed in that commit because we did not want the layoutChanged signal to be emitted. So instead of calling invalidate(), we call clearMapping() directly. In order to do that, clear_mapping has been turned into a private slot Task-number: QTBUG-17812 Reviewed-by: Gabriel
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-12-131-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/gui/graphicsview/qgraphicslayout.cpp src/gui/text/qfontengine_s60.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qwindowsurface_gl.cpp src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
| * Fix filtering of columns in QSFPM.Stephen Kelly2010-11-231-2/+2
| | | | | | | | | | | | | | Fixes a crash introduced in 315c09c3873f7c5d8b785443372bf975bae47ee7 Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> Reviewed-by: Olivier
* | An an assert when a QModelIndex from the wrong model is used with QSFPM.Stephen Kelly2010-09-281-0/+2
|/ | | | | Merge-request: 818 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* Doc: Note on updating proxy models with dynamic sort filtersGeir Vattekar2010-09-151-0/+8
| | | | | Task-number: QT-689 Reviewed-by: David Boddie
* Correcting spelling mistakes in documentation. Part of fix for QTBUG-11938.Jerome Pasion2010-08-091-1/+1
| | | | | Reviewer: David Boddie Task number: QTBUG-11938
* Fixes a proxymodel sorting odity.Pierre Rossi2010-05-261-1/+1
| | | | | | | Sort order was modified when sorted according to an empty column always in the same order Reviewed-by: Thierry
* QSortFilterProxyModel: Warning or assert failureGabriel de Dietrich2010-05-051-1/+1
| | | | | | | | | | | | | A mapping was being created after QStandardItem::dataChanged() signal, even though one of the item's ancestors was being filtered out by the filter proxy. This let the QSortFilterProxyModel in a unstable state, triggering warnings and failing asserts. This patch partialy reverts commit f4bce41c10988. Auto-test included. Reviewed-by: mbm Task-number: QTBUG-10287
* Fix bug when resetting QSortFilterProxyModelStephen Kelly2010-03-181-2/+2
| | | | | | | | | | | | | | If multiple proxies are connected to one source model which gets reset, the order of execution of the sourceModelAboutToBeReset slots could cause QPersistentModelIndexes to be invalidated in one proxy model before the same slot is executed in the other proxy model. Additionally, the persistent indexes in the QSFPM are invalidated before the persistent indexes in the source model. This patch makes them invalidated afterward now, which makes more sense. Merge-request: 503 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
* Fix a crash in QSortFilterProxyModel when deleting a rowThierry Bastian2010-03-151-1/+33
| | | | | | | ...while changing data. Reviewed-By: gabi Task-Number: QTBUG-8841
* Optimize QSortFilterProxyModelOlivier Goffart2010-03-111-7/+9
| | | | | | | - use QHash instead of QMap - use QVector::reserve when the size is known Reviewed-by: Gabriel
* QSortFilterProxyModel: Sorting occured unnecessarily when the ↵Olivier Goffart2010-02-221-4/+4
| | | | | | | | | | | | | | dynamicSortFilter is turned off We should not sort when inserting items if the dinamicSortFilter flag is set to false. Note that some of the test used to rely on the fact that it was sorted. Those test have been fixed. The patch has been contributed to us in the task. Task-number: QTBUG-7716 Reviewed-by: Thierry
* QSortFilterProxyModel: Fix dynamic sorting when severals rows are added.Olivier Goffart2010-02-021-6/+10
| | | | | | | | | | | | | | | | | | We need to update the sorting column in clear_mapping. But the problem is that updating the source column create a mapping (because it uses mapToSource). So we need to clear that wrong mapping again In _q_sourceLayoutChanged there was an uneeded special case. The case where the source_sort_column might change was never triggered because of that. So now that the special case has been removed, we need to do as in clear_mapping. The test cover the change in clear_mapping and in _q_sourceLayoutChanged The problem was shown in the Kopete: https://bugs.kde.org/show_bug.cgi?id=199850 Reviewed-by: Thierry Task-number: QTBUG-7537
* Merge branch '4.6'Thiago Macieira2010-01-131-1/+1
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt doc/src/deployment/deployment.qdoc src/corelib/io/qfsfileengine_win.cpp src/corelib/xml/qxmlstream.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h tools/assistant/tools/assistant/centralwidget.cpp tools/linguist/lupdate/main.cpp
| * Update copyright year to 2010Jason McDonald2010-01-071-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Don't call invalidate when resetting the QSortFilterProxyModel.Stephen Kelly2010-01-061-1/+0
|/ | | | | | | | | | | | | | | The invalidate connection is made before connecting the source model, which means it gets called first. If a second proxy model is used with it, the sourceLayoutAboutToBeChanged of the second proxy is therefore called before its sourceReset slot, but after the persistent indexes of the first model have been invalidated. The invalidate call is not needed because clear_mappings is called when the source model is reset anyway. Merge-request: 416 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
* Make the layout{,AboutToBe}Changed signals in the QSortFilterProxyModel ↵Stephen Kelly2009-12-181-2/+4
| | | | | | | match its source. Merge-request: 2266 Reviewed-by: Olivier Goffart
* Make sure mappings are created for columns when indexes newly become parents.Stephen Kelly2009-12-181-0/+27
| | | | | | | Also move the modeltest related tests to the modeltest subdirectory Merge-request: 2262 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
* QSortProxyModel: Crash when changing model with 2-level proxy and selected itemsGabriel de Dietrich2009-11-261-1/+5
| | | | | | | | The index mapping to the base model was being cleared before the persistant model indices. Reviewed-by: Olivier Task-number: QTBUG-6237
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Fix the API for resetting QAbstractItemModels.Stephen Kelly2009-08-281-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit deprecates the QAIM::reset() method, and adds beginResetModel() and endResetModel() methods, addressing Qt issue 247023. http://www.qtsoftware.com/developer/task-tracker/index_html?method=entry&id=247023 If models and proxies use QAIM::reset() alone, then proxies will emit modelAboutToBeReset after its source model is reset. This means that mapToSource will not behave as expected (Will always return an invalid index) in a slot connected to modelAboutToBeReset. The usecase for this is maintaining viewstate (which items are selected, expanded) when the model is reset. See BrowserWidget::modelChanged here: http://websvn.kde.org/trunk/KDE/kdepim/akonadi/akonadiconsole/browserwidget.cpp?view=markup Task-number: 247023 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com> Merge-request: 1072
* | Doc - mentioned that if no QRegExp is set, or an empty string is set,Kavindra Devi Palaraja2009-08-171-3/+5
| | | | | | | | | | | | | | | | everything in the source model will be accepted. Task: 251308 Reviewed-By: Olivier Goffart
* | Doc - some clean ups to QSortFilterProxyModel's documentationKavindra Devi Palaraja2009-08-171-89/+82
| | | | | | | | Reviewed-By: TrustMe
* | QVariant: added toFloat and toRealThierry Bastian2009-08-141-1/+3
| | | | | | | | | | | | | | | | Made better use of qreal all over the place. We were previously using QVariant::toDouble a lot. That is triggering unnecessary conversions between float and double on embedded. Reviewed-by: ogoffart
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Fixes: Do not create a mapping for filtered items in QSortFilterProxyModel.Marius Bugge Monsen2009-07-171-16/+26
| | | | | | | | | | Task: 258227 Details: This patch fixes the problem where items that are filtered, can sometime still have a mapping. This creates a problem when they become visible again, and the outdated mapping already exists.
* | Merge license header changes from 4.5Volker Hilsheimer2009-06-161-2/+2
|\|
| * Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | | | | | Reviewed-by: Trust Me
* | small code cleanup that improves some loopsThierry Bastian2009-06-101-3/+4
| | | | | | | | it uses les foreach
* | Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qtSimon Hausmann2009-05-271-1/+2
|\| | | | | | | | | Conflicts: tests/auto/qtreeview/tst_qtreeview.cpp
| * Fixed: QSortFilterProxyModel setDynamicSortFilter doesn't works when setting ↵Olivier Goffart2009-05-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the model initially This was caused by two different bug: - In the QSortFilterProxyModel, we need to re-sort when setting the source model change the sorting column (happen when setting a model initially) - In the treeview, we need to activate the sorting even if there is no column yet (because the initial model is empty Task-number: 254234 Reviewed-by: Thierry BT:
* | Merge commit 'origin/4.5'Olivier Goffart2009-05-041-0/+9
|\| | | | | | | | | Conflicts: src/gui/itemviews/qabstractitemview.cpp
| * Do not crash when passing wrong indexes to ↵Olivier Goffart2009-05-041-0/+9
| | | | | | | | | | | | | | | | | | QSortFilterProxyModel::indexFomSource and *ToSource Show a warning instead Task-number: 252507 Reviewed-by: Marius Bugge Monsen
* | QSortFilterProxyModel: remove the mapping of the child that are filtered awayOlivier Goffart2009-04-271-15/+36
|/ | | | | | | when the filter change Task-Number: relates to 251296 Reviewed-by: Marius Bugge Monsen
* CompileOlivier Goffart2009-04-161-1/+1
| | | | Reviewed-by: TrustMe
* QSortFilterProxyModel: In dynamic filter model, childs of temporarlyOlivier Goffart2009-04-161-1/+13
| | | | | | | | | | filtered items are not correctly updated. when filtering away a row, we should remove all the mapping of the children Task-number: 251296 Reviewed-by: Marius Bugge Monsen