summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qtreeview.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-02-231-5/+6
|\ | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qcocoaview_mac.mm src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def src/testlib/qtestcase.cpp
| * Fix crash in KPackageKitGabriel de Dietrich2011-02-151-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | QTreeViewPrivate::itemHeight() may refer to an invalid QModelIndex after calling QTreeView::indexRowSizeHint(). Same thing inside QTreeView::indexRowSizeHint(), since QHeaderView::count() will call QAbstractItemViewPrivate::executePostedLayout() which may invalidate all the QModelIndex. Reviewed-by: Olivier Task-number: QTBUG-16292
* | 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-101-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-09-281-0/+4
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/gui/painting/qrasterizer.cpp src/network/access/qnetworkaccessmanager.cpp tests/auto/qpainter/tst_qpainter.cpp tools/assistant/tools/assistant/mainwindow.cpp
| * QTreeView: do not scroll to top if last item is removedFrank Reininghaus2010-09-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | When the last item is the current item and is removed, QTreeViewPrivate::updateScrollBars() is called after QTreeViewPrivate's viewItems member is cleared. This commit makes sure that viewItems is restored by calling QTreeView::doItemsLayout() in this case, preventing that the scroll bar range is set to zero temporarily and the view is scrolled to the top unexpectedly (this was a regression in 4.7.0: QTBUG-13567). Merge-request: 2481 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* | QAbstractItemView: optimize handling of editors for view with large numbers ↵Stephen Bowline2010-08-271-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of editors. This change improves algorithmic time complexity for item views during operations which directly (or indirectly such as layout) require bi-directional lookups between model indices and persistent editor widgets. The previous implementation scaled as O(n^2) due to the unordered search through a QVector. Implementations that use large numbers of persistent editors are most dramatically improved. In one "real world" test case with 648 persistent editors, profiling indicates an improvement of layout from 45 seconds to 8 seconds with this change alone. Reviewed-by: Olivier Goffart Merge-Request: 2452
* | Auto expand of QTreeWidget does not work correctly if animatedThierry Bastian2010-07-011-5/+5
| | | | | | | | | | | | | | The problem was that the internal state of the tree was not correctly reset. Patch comes from the task. Task-number: QTBUG-10850
* | Code simplification in treeviewsThierry Bastian2010-06-301-3/+1
| |
* | Fixed the itemviews so that the editor is not considered opaque any moreThierry Bastian2010-06-291-8/+1
|/ | | | | | | The editor was always considered opaque and clipping was set on the painter. This assumption can't be verified. Task-number: QTBUG-11367
* QTreeView: remove dead code.Olivier Goffart2010-04-131-19/+0
| | | | | | Not in use since p4 change 221452 Reviewed-by: Gabriel
* QTreeView: fix PageUp/PageDown with disabled items.Olivier Goffart2010-04-071-0/+4
| | | | | | | | The problem was seen in Qt Creator (in the 'Sources' tab of the debugger). Same logic as in above() and bellow() Reviewed-by: Gabriel
* Fix qcombobox:flaggedItems autotest failure.Thiago Macieira2010-03-241-6/+5
| | | | | | | | | QElapsedTimer doesn't initialise itself on construction, which means we were actually depending on uninitialised data. QTime does initialise itself to NullTime. This means the test didn't actually work if you ran it precisely at midnight... Reviewed-By: Trust Me
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-03-231-3/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (114 commits) Fix the test of QDirIterator with NoDot and NoDotDot Split QDir::NoDotAndDotDot into QDir::NoDot and QDir::NoDotDot QFSFileEngine: don't look through NTFS junctions After showing modal windows, WM_LBUTTONUP for double click is ignored. Possible fix for missing QML properties in the qt.qhp file. Use standard theme icons in Linguist where possible Use more standard icons from the theme in Assistant Use more standard icons for standard actions in Designer Drag & drop operations wont end while using Remote Desktop sessions _close(fd) closes the associated handle and not the other way around Fixed locale mapping on Symbian. Revert change 7bf4512659 on Cocoa. Extended the high_attributes array, since we have more than 127 widget attributes now. Added instructions for MinGW users wanting to build the MySQL driver. Designer: Fix broken resource view. Add missing ,. get rid of build warning messages Quiet unnecessary configure/qmake warnings when EPOCROOT is not set. Add configure test for Maemo Internet Connection Daemon. fix warning ...
| * Merge remote branch 'origin/4.7' into oslo-staging-1Aaron McCarthy2010-03-191-11/+11
| |\ | | | | | | | | | | | | Conflicts: mkspecs/common/symbian/symbian.conf
| * \ Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-03-181-3/+12
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (58 commits) Dont force height for filter widget - Fix importdir option on unix/linux configure Remove incorrect semi-colons after Q_PROPERTY 10n: Update German translation for 4.7.0 Redesigned filter widgets Add a test case for commit 76d767080a6be7b025f36d6778dfaedbd31a9f07 Add Japanese/Korean keyboard specific keys to QKeySequence Fixed qmdiarea autotest regression on Cocoa Fix JSC export macros Minor update for f3f979cbd37f47892cd0c0a9fc23b802ed6f7890 Incorrect translation for Application menu items in Mac. doc: Fixed use of Qt 3 support function in QIcon doc snippet Build and run QElapsedTimer test. Fix license headers. Add flag to indicate that network sessions are expected on a platform. Don't fail unit test when there is no default network configuration. Make destructor virtual. Optimized QLocale to access system locale on demand. Remove unwanted code in f8d5f2594a9b268b9eeecf95b24b23fc940c71ce Compile fix on keypad-navigation systems ...
| | * \ Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-03-181-3/+12
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (46 commits) Build and run QElapsedTimer test. Fix license headers. Add flag to indicate that network sessions are expected on a platform. Don't fail unit test when there is no default network configuration. Make destructor virtual. Optimized QLocale to access system locale on demand. Remove unwanted code in f8d5f2594a9b268b9eeecf95b24b23fc940c71ce Compile fix on keypad-navigation systems Force qt-zlib to be used for host system when cross compiling. qmake: fix to create proper install target in Makefile at first run compile fix for Windows Fixed focus handling when Qt is embedded into Cocoa app. Do not beep on Mac when pressing some keys. Do not deliver the same key event multiple times in Cocoa. Implement Idle-priority threads for Linux. Improved qt_x11_wait_for_window_manager Doc: document QElapsedTimer Added missing "const" for mac. qdoc3: Fixed some ifdef typos and removed some whitespace. Manual test for QTBUG-8933. ...
| | | * | Do not beep on Mac when pressing some keys.Denis Dzyubenko2010-03-171-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a key event is delivered to widgets, we should accept the event if the widget reacted to it in any way - if either the current item has changed or if the widget scrolled. Task-number: QTBUG-6444 Reviewed-by: Prasanth
| | | * | Rename QTimestamp to QElapsedTimerThiago Macieira2010-03-171-1/+1
| | | | |
| | | * | Port QtGui uses of QTime as a stopwatch to QTimestampThiago Macieira2010-03-171-1/+2
| | | | |
* | | | | Wrong repaint when changing the default row height in QTreeViewGabriel de Dietrich2010-03-231-4/+8
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When in QTreeView::dataChanged(), we didn't check for the actual change in the value before setting QTreeViewPrivate::defaultItemHeight. Hence, if uniformRowHeights is true, we completely miss any resizing of the items. Reviewed-by: Thierry Task-number: QTBUG-9216
* | | | 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-181-4/+11
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-210/+24
|/ | | | | | | | | | | 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
* 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
* QTreeView: speedup more QTreeViewPrivate::layout(-1)Olivier Goffart2010-03-111-15/+23
| | | | | | 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-101-14/+43
| | | | | | | | | | | | | | 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
* Delay the resize section for better performance.Pierre Rossi2010-03-041-4/+2
| | | | | | | | This was particularly unusable when combining a QSortFilterProxyModel with resize mode ResizeToContents. Task-number: QTBUG-8540 Reviewed-by: Thierry
* 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
* QTreeView: Fix premature pessimizationJoão Abecasis2010-02-181-4/+5
| | | | Reviewed-by: Olivier Goffart
* Merge remote branch 'qt/4.6' into oslo-staging-2/4.6Paul Olav Tvete2010-01-121-2/+2
|\ | | | | | | | | Conflicts: dist/changes-4.6.1
| * typo fixRitt Konstantin2010-01-111-1/+1
| | | | | | | | | | Merge-request: 2077 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-081-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (49 commits) Reverted two commits that were pushed to the wrong branch. Use the new QTextCodec api in the QXmlStreamWriter. Added new functions to QTextCodec that accept ConversionFlags. Fix passing of arguments to syncqt doc: Fixed typos. Fixes: Fix spinbox with NoButton style in QGtkStyle doc: Explained parameter value defaults where appropriate. Cocoa: Fix painting errors on QGLWidget resizing. Fix broken QGLWidget::renderPixmap on Mac/Carbon Fixes: Setting any style sheet breaks checkbox positioning Fixes: MenuItem size fixes and missing separator with Gtk+ Autotest: add a test for QNAM's HTTP cache handling code QNAM HTTP: just use the expirationDate in the code that validates the cache QNAM HTTP: change the caching semantics to match documentation QNAM HTTP: fix the caching algorithm from RFC 2616 Avoid repeatedly calling LookupAccountSid in QFSFileEngine::owner improve readability a bit more fix styling; improve readability make it possible to retrieve name of the user who owns the file Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 99ccc1c3e4db5354246720f9b9aa3d282e64497d ) ...
| | * Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | | | | | | | | | Reviewed-by: Trust Me
* | | Fix incorrect drawing of the hovered row on QTreeView with some styles.Olivier Goffart2010-01-111-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some styles such as oxygen, or gtk, require the whole row to be redrawn in case of mouse hover the items. There was special code that handle that in the MouseMove event of the QTreeView, but that did not covered all the case (such as scrolling with the mouse wheel) Reviewed-by: Gabriel
* | | QTreeView::selectAll() wouldn't work when first column hiddenGabriel de Dietrich2010-01-111-2/+5
|/ / | | | | | | | | | | | | | | | | | | QTreeView::selectAll() called QTreeView::select() on the first column, first and last rows, and rows selection flags. As the first row was hidden, this range spanned to void. We now pass the upper-left and lower-right indices to select(). Auto-test included. Reviewed-by: Olivier Task-number: QTBUG-6450
* | Fix a painter warningPierre Rossi2010-01-071-0/+2
|/ | | | | | | | when using a treewidget with animations in a splitter and the tree is collapsed, and then select an item in the tree that requires expanding, it might end up trying to paint to an invalid pixmap Reviewed-by: Gabi
* Itemviews: we needed to call ensurePolishedwhen asking for sizehintsThierry Bastian2009-12-111-0/+1
| | | | Reviewed-by: Pierre Rossi
* Item views: make sure the model is connected/disconnected correctlyThierry Bastian2009-11-191-0/+7
| | | | Reviewed-by: ogoffart
* Ran the script utils/normalizeOlivier Goffart2009-11-181-2/+2
| | | | Over src/ tools/ examples/ and demos/
* QTreeView navigation now inverts left and right in RTLThierry Bastian2009-10-301-0/+6
| | | | | Task-number: QTBUG-5007 Reviewed-by: ogoffart
* QTreeView: fix drawing branches of model that adds or remove rows dynamicallyOlivier Goffart2009-10-301-3/+35
| | | | | | | | The lasts commits in the treeview did put the flags weither item has child or is the last in cache in the viewItem vector. But the cache was not updated while the model is modified. Reviewed-by: Thierry
* Compile with -no-qt3supportAaron Kennedy2009-10-291-2/+2
| | | | Reviewed-by: andreas
* Fixed missing repaints on QTreeView when moving the mouseThierry Bastian2009-10-281-2/+6
| | | | | | | ..from the decoration to the item itself. QAbstractItemView can't handle that because it doesn't know anything about decoration. Reviewed-by: gabi
* Fixed QTreeView not emitting doubleCliked when 1st col is spannedThierry Bastian2009-10-271-3/+1
| | | | | Task-number: QTBUG-976 Reviewed-by: ogoffart
* QTreeView: Make sure the state QStyle::State_Sibling is correctly setOlivier Goffart2009-10-271-9/+8
| | | | | | | | That state used not to be set for drawing the content of the items. Also, it could be wrong for branches if there was hidden items. Reviewed-by: Thierry Task-number: related to 234930