summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | | | | | | Set role names for QFileSystemModel and QDirModelMartin Jones2010-03-221-0/+6
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-7479 Reviewed-by: Alexis Menard
* | | | | | | | | Fix a problem with the selection losing items when layout is changedThierry Bastian2010-03-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-2804 Reviewed-by: ogoffart
* | | | | | | | | refactor connections/disconnections in QItemSelectionModelThierry Bastian2010-03-222-60/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ther was duplicated code and useless disconnections in the destructor
* | | | | | | | | small little change to the initialization of item viewsThierry Bastian2010-03-221-3/+1
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we don't need to calldoDelayedItemLayout, setting the flag that the widget needs the item layout is enough
* | | | | | | | Dragging headers in item views done rightGabriel de Dietrich2010-03-221-8/+16
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, the dropped position depended on the position of the middle of the dragged header w.r.t. the hovered header. Now, it only depends on the mouse cursor position and the middle of the hovered header, closer to what happens on Windows or Mac OS. Reviewed-by: Thierry Task-number: QTBUG-6968
* | | | | | | clicking on a non focused ItemView would change the cirrent item twiceThierry Bastian2010-03-191-1/+1
| |_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-8086 Reviewed-by: gabi
* | | | | | 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>
* | | | | | Fixed problem in painting of QTreeViewThierry Bastian2010-03-181-11/+11
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It could beseen that not a full row was updated when moving the mouse from the decoration to its attached item. Reviewed-by: gabi
* | | | | Optimized visualRegionForSelection in various item views classesGabriel de Dietrich2010-03-183-18/+49
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the number of selected items is large (a few thousands), the computation of visualRegionForSelection can take a long time (up to a few seconds). Analysis with valgrind shows that most of the time is spent in miRegionOp (in qregion.cpp), which is being called by QRegion::operator+=. The visualRegionForSelection virtual method being called only to update the view after selection, we can safely ignore those item's rectangles outside the viewport, thus both reducing the number of calls to miRegionOp and the actual cost of each call. This, however, introduces a behaviour change in visualRegionForSelection, as the returned region will *not* contain any rectangle *not* intersecting the viewport. Reviewed-by: Thierry Task-number: QTBUG-884
* | | | QTreeView: Remove a lot of useless and slow code.Olivier Goffart2010-03-172-213/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit cd2afafbc9c29393a80d415145c49eb5f439da55, we are always doing full relayout when adding or removing rows. So there is no point of doing the expensive incremental update of the viewItems. This has also the nice side effect to fix QTCREATORBUG-886 (see comment in the task) Reviewed-by: Thierry
* | | | Fixed a potential crash in headerview when inserting a sectionThierry Bastian2010-03-171-6/+3
|/ / / | | | | | | | | | | | | | | | | | | This could happen if a section was moved andthen hidden Task-number: QTBUG-8650 Reviewed-by: Andy Shaw
* | | add default values to parameter of virtual methods in QProxyModelThierry Bastian2010-03-171-12/+13
|/ / | | | | | | | | | | | | That makes it consistent with the other models. Task-number: QTBUG-8766 Reviewed-by: gabi
* | CompileEskil Abrahamsen Blomfeldt2010-03-161-1/+1
| | | | | | | | | | | | Fix typo in qabstractitemview.cpp Reviewed-by: Thierry
* | Revert "small cleanup regarding delayed layout in itemviews"Thierry Bastian2010-03-164-17/+35
| | | | | | | | This reverts commit 8e98c4c159c38ea48b6321674105762b2d3f517b.
* | Make sure the delete and backspace keys are ignored when keyb-searchingThierry Bastian2010-03-161-0/+2
| | | | | | | | | | Task-number: QTBUG-8270 Reviewed-by: gabi
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-03-155-36/+50
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix a crash in QSortFilterProxyModel when deleting a row small cleanup regarding delayed layout in itemviews Fixed wasted space in the texture cache. Get debug code compiling since function signature changes --warn; That file was forgotten when adding SSE support under mingw
| * | Fix a crash in QSortFilterProxyModel when deleting a rowThierry Bastian2010-03-151-1/+33
| | | | | | | | | | | | | | | | | | | | | ...while changing data. Reviewed-By: gabi Task-Number: QTBUG-8841
| * | small cleanup regarding delayed layout in itemviewsThierry Bastian2010-03-154-35/+17
| | |
* | | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-03-151-1/+1
|\ \ \ | |/ / |/| / | |/ | | Conflicts: src/gui/styles/qs60style_s60.cpp
| * QTableView: fix navigating with keyboard with spans not scrollingOlivier Goffart2010-03-081-1/+1
| | | | | | | | | | | | | | | | We cannot use isIndexHidden in ScrollTo because that would return true if the index is in a span. Task-number: QTBUG-8777 Reviewed-by: Markus Goetz
* | QTreeView: Optimise QTreeViewPrivate::viewIndexOlivier Goffart2010-03-111-35/+27
| | | | | | | | | | | | | | | | | | | | ... by first looking around the last find item. This was already done, but only for the 4 closest item. Now start searching from the last index and continue. Reviewed-by: Gabriel Task-number: QTBUG-8886
* | Optimize QSortFilterProxyModelOlivier Goffart2010-03-111-7/+9
| | | | | | | | | | | | | | - use QHash instead of QMap - use QVector::reserve when the size is known Reviewed-by: Gabriel
* | QTreeView: speedup more QTreeViewPrivate::layout(-1)Olivier Goffart2010-03-112-16/+27
| | | | | | | | | | | | Specially when called from expandAll Reviewed-by: Gabriel
* | QTreeView: Optimize by avoiding calling detachOlivier Goffart2010-03-111-4/+6
| | | | | | | | | | | | | | | | QVector::operator[] calls detach. and we should avoid calling it in a loop. QVector::at() cannot be used here because we need a non const reference. Reviewed-by: Gabriel
* | Cleaning commit 7baaea978200c82fdf65e3934cfa373edeca6524Gabriel de Dietrich2010-03-111-1/+0
| | | | | | | | Reviewed-by: Trust me
* | Slow QTreeView::layout() with many (> 10000) childrenGabriel de Dietrich2010-03-102-15/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When updating the QTreeViewItem::total field in layout(), we used to call QTreeViewPrivate::viewIndex() to get the parent item, which is O(n). We have now introduced 'parentItem' in QTreeViewItem wich makes this O(1), with a small penality when inserting and removing elements in QTreeViewPrivate::viewItems. The QTreeViewPrivate::checkViewItems() is left inside the code for further debugging. Reviewed-by: Olivier Task-number: QTBUG-8885
* | QTreeView: let the dataChanged signal refresh the hasChildren attribute.Olivier Goffart2010-03-091-1/+5
| | | | | | | | | | | | | | That is required for the Locals & Watchers view in Creator. Task-number: QTBUG-7115 Reviewed-by: Thierry
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Rohan McGovern2010-03-064-18/+20
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe examples/multimedia/audioinput/audioinput.cpp src/corelib/io/qfsfileengine.cpp src/gui/egl/qegl_wince.cpp src/gui/egl/qeglproperties.cpp src/gui/egl/qeglproperties_p.h src/gui/embedded/directfb.pri src/gui/kernel/qapplication_win.cpp src/gui/painting/qdrawutil.cpp src/opengl/qgl_p.h src/sql/drivers/odbc/qsql_odbc.cpp src/sql/drivers/odbc/qsql_odbc.h tests/auto/auto.pro tests/auto/qgl/tst_qgl.cpp translations/assistant_adp_ru.ts
| * Wrong dirty region after row selection in right-to-left mode in QTableViewGabriel de Dietrich2010-03-051-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | When computing the region from the selection range, we didn't take care of the actual position of the cells, which is reverted when in RtoL mode. Also gets fixed a 2-pixel error introduced in commit 718905c097a7f3bbf9805a2561cd855a0b2d8f59, and that was responsible for (potentialy) painting more cells than needed. Auto-test included. Reviewed-by: Olivier Task-number: QTBUG-7774
| * Expand indicator would not be displayed after removal of a collapsed item's ↵Gabriel de Dietrich2010-03-021-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | child While setting the hasChildren property of QTreeViewItem, "collapsed" and "not visible" were being mistaken. Auto-test included. Reviewed-by: Olivier Task-number: QTBUG-7443 (cherry picked from commit 77670c3c0fdc3021356e212e94042a0b5a4f4f8c)
| * 2nd part of revert of commit 435bbd4be73768f617e4aThierry Bastian2010-03-021-6/+1
| | | | | | | | | | | | After a mess-up by git rebase... Reviewed-by: ogoffart
| * Revert "ItemViews: make it possible for chekcable items to get partiallyChecked"Thierry Bastian2010-03-021-7/+1
| | | | | | | | | | | | This reverts commit 435bbd4be73768f617e4a4083a345d1d8d62daa3. Reviewed-By: ogoffart
| * Fix crash using openPersistentEditor and setRowHidden on a QTableViewOlivier Goffart2010-03-011-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Hiding widget might result in focus changes that will modify the list of editors while iterating over it. Same fixe as in commit 386726f7184cc77f0692e2ba24d85ebc53a39569 The test comes from the Task Task-number: QTBUG-8585 Reviewed-by: Thierry
| * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-02-261-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: QAbstractItemView::setIndexWidget: remove the old widget from the QSet of persistent editors Fixed qgl autotest failures on Maemo. Skip complex FBO tests if combined depth-stencil isn't supported
| | * QAbstractItemView::setIndexWidget: remove the old widget from the QSet of ↵Olivier Goffart2010-02-261-0/+1
| | | | | | | | | | | | | | | | | | | | | persistent editors Task-number: QTBUG-8422 Reviewed-by: Thierry
* | | Delay the resize section for better performance.Pierre Rossi2010-03-043-12/+5
| | | | | | | | | | | | | | | | | | | | | | | | This was particularly unusable when combining a QSortFilterProxyModel with resize mode ResizeToContents. Task-number: QTBUG-8540 Reviewed-by: Thierry
* | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into master-s60axis2010-02-262-4/+37
|\ \ \ | |/ / | | | | | | | | | | | | Conflicts: qmake/generators/symbian/initprojectdeploy_symbian.cpp qmake/generators/symbian/symmake_abld.h
| * | Build break fix for commit d8465414e6fd543cfc20e732030dedd8d2bc685f.Janne Anttila2010-02-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | RVCT does not like static inline, and variables should not be defined in case statement without braces. In this case the temp variable was actually unnecessary. Reviewed-By: TrustMe
| * | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-02-251-4/+37
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Removed an export that shouldn't be exported. Reduced the code and memory footprint of the keymap. Enabled Qt key events to work also when native key code is missing. Crash in QGraphicsScenePrivate::setFocusItemHelper Improvements to itemview keypad navigation in S60. Fix SymbianMakefileGenerator::absolutizePath for clean builds Misc fixes to FLM files
| | * Improvements to itemview keypad navigation in S60.Janne Anttila2010-02-251-4/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic used in this commit is partially taken from sliders. This commit makes it possible to interact (change row or column) in itemview even itemview does not have editFocus. Interacting without editFocus is enabled when it is not possible to keypad navigate to reuqested direction. In addition if keypad navigation to any direction is not possible (i.e there is only one listwidget on screen), there is no sense to add "done" softkey to get out of edit focus. Task-number: QTBUG-4802 Reviewed-by: Alessandro Portale
| * | Set the roleNames of proxy models to the roleNames of the source model.Stephen Kelly2010-02-251-0/+1
| |/ | | | | | | | | | | | | This simplifies the use of model view with qml and proxies. Merge-request: 2315 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
* | Expand indicator would not be displayed after removal of a collapsed item's ↵Gabriel de Dietrich2010-02-241-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | child While setting the hasChildren property of QTreeViewItem, "collapsed" and "not visible" were being mistaken. Auto-test included. Reviewed-by: Olivier Task-number: QTBUG-7443
* | Fixed hypersensitive drag on QHeaderViewsGabriel de Dietrich2010-02-241-7/+2
| | | | | | | | | | | | | | | | | | | | | | The header section was in a moving state before the drag actually started. That is, before we moved more than QApplication::startDragDistance(). This could cause a click to be considered as a move in some cases. No auto-test as it would involve dragging. Task-number: QTBUG-7327 Reviewed-by: Olivier
* | 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
* | Merge remote branch 'origin/4.6' into qt-master-from-4.6Thiago Macieira2010-02-191-4/+5
|\ \ | |/ | | | | | | Conflicts: tools/assistant/lib/qhelpsearchindexreader_clucene_p.h
| * QTreeView: Fix premature pessimizationJoão Abecasis2010-02-181-4/+5
| | | | | | | | Reviewed-by: Olivier Goffart
* | Merge remote branch 'origin/4.6' into integration-master-from-4.6Rohan McGovern2010-02-181-0/+5
|\ \ | |/ | | | | | | Conflicts: src/corelib/codecs/qtextcodec.h
| * Support for dynamic localization in Symbian softkeys.Janne Anttila2010-02-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | This commit adds support for dynamic i.e. runtime localization of S60 softkeys. Note that translations are not provided yet with qt.sis (QTBUG-4919), meaning that localization does not actually happen unless application developer provides its own translation (including translation for softkeys). Task-number: QTBUG-6785 Reviewed-by: Jason Barron
* | Merge remote branch 'origin/4.6' into qt-master-from-4.6Thiago Macieira2010-02-121-1/+1
|\ \ | |/
| * QListView: fix crash when hiding many of the lasts item in a QListViewOlivier Goffart2010-02-091-1/+1
| | | | | | | | | | | | | | | | Since 6c1388ee5a3c4796d hidden items are not taken in account when counting the scrollbar position, and so the vector may be smaller. Reviewed-by: Gabriel Task-number: QTBUG-7929