summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews
Commit message (Collapse)AuthorAgeFilesLines
* QTreeView: fix drawing branches of model that adds or remove rows dynamicallyOlivier Goffart2009-10-302-4/+37
| | | | | | | | 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
* QItemSelectionModel could emit selectionChanged with no changeThierry Bastian2009-10-301-1/+2
| | | | | Task-number: QTBUG-560 Reviewed-by: ogoffart
* In ItemViews, right click on the viewport clear the ext selectionThierry Bastian2009-10-301-1/+1
| | | | | Task-number: QTBUG-435 Reviewed-by: Gabriel
* QListView: make sure we relayout items when data changes in the modelThierry Bastian2009-10-292-1/+8
| | | | | Task-number: QTBUG-633 Reviewed-by: ogoffart
* ItemViews: make the geometries update when header data changesThierry Bastian2009-10-293-0/+6
| | | | | | | autotest included Task-number: QT-711 Reviewed-by: ogoffart
* Compile with -no-qt3supportAaron Kennedy2009-10-291-2/+2
| | | | Reviewed-by: andreas
* Fixed bug in QTableView spans.Gabriel de Dietrich2009-10-282-2/+47
| | | | | | | | In some cases, the spans internal structure was left in an inconsistent state. Auto-test included. Bonus: spans consistency checking method. Task-number: QTBUG-5062 Reviewed-by: Olivier
* 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
* Merge branch 'fixes' of ↵Jan-Arve Sæther2009-10-281-1/+1
|\ | | | | | | | | | | | | | | git://gitorious.org/~fleury/qt/fleury-openbossa-clone into openbossa-fleury-fixes3 Conflicts: src/gui/graphicsview/qgraphicsanchorlayout_p.cpp src/gui/graphicsview/qgraphicsanchorlayout_p.h
| * Line spacing fixesJoerg Bornemann2009-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTextEdit (via QTextLayout) and QPlainTextEdit in Qt used to ignore any font leading but added one extra pixel in QFontMetrics. With many freetype fonts, this resulted in a "spacy" text layout. The necessary fixes on X11 and Windows were to take (positive) leading into account, to make the font database convert point sizes to pixel sizes without rounding to plain integer values, and to subtract the extra pixel from QFontMetrics from the font engines' descent value. The change also fixes several places in styles and widgets, where QFontMetrics::lineSpacing() was wrongly used instead of QFontMetrics::height(). Ideally we should also handle negative leading, which would require additional and bigger code changes in QTextLayout and QPlainTextEdit. In addition, all other editors we have tested seem to ignore leading on X11. If we choose to believe the values provided by freetype, our text layout would be one pixel smaller than everybody else's. On the Mac, this change does nothing. There our layout is still too spacy, and for smaller fonts quite ugly compared to native Mac applications. Done with mae. Reviewed-by: mae
* | Fix incomplete documentation for Qt::DecorationRoleDavid Faure2009-10-272-2/+2
| | | | | | | | | | | | | | As noticed by Laurent Montel. Merge-request: 1812 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
* | 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-272-10/+10
| | | | | | | | | | | | | | | | 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
* | Fixes QTreeView: stylesheet :has-children pseudo selector doesn't works for ↵Olivier Goffart2009-10-272-13/+18
| | | | | | | | | | | | | | | | | | | | | | the ::item pseudo-class The State_Children was not set on the QStyleOption. Refactorized a little bit the way it was computed. Reviewed-by: Thierry Task-number: 234930 Task-number: QTBUG-3129
* | QTableView would not correctly resize to contentsThierry Bastian2009-10-272-0/+6
| | | | | | | | | | | | | | | | The problem was that we didn't call ensurePolished when getting the size of the sections. Task-number: QTBUG-1002 Reviewed-by: ogoffart
* | Fixed typoGabriel de Dietrich2009-10-261-1/+1
| | | | | | | | | | | | | | Would not have introduced any bug as invald QModelIndex are currently initialised with -1 for row and column. Reviewed-by: trust me
* | Drag and drop in QListWidget would not preserve the selectionGabriel de Dietrich2009-10-262-13/+21
| | | | | | | | | | | | | | | | | | | | Now, when dropping items, these will remain selected, and in the same visual order as when dragged. Auto-test included for the items moving part. For the rest, it's a drag-and-drop thing. Reviewed-by: Olivier
* | Added visual DnD indicator for left to right flow in QListViewGabriel de Dietrich2009-10-234-3/+119
|/ | | | | | | | | | | | Extended the behaviour already present in QAbstractItemView into QListView. This means some code duplication which should maybe be refactored at some point. (Seems to be the price to pay when some delegate does almost the same thing as the base class). No auto-test, as it's a drag-and-drop related task. Reviewed-by: Thierry Task-number: QTBUG-3730
* Fixed crash in tst_qabstractitemview.Gabriel de Dietrich2009-10-211-3/+11
| | | | Reviewed-by: trust-me
* Extended commit 6c1388ee for LeftToRight flowGabriel de Dietrich2009-10-201-6/+6
| | | | | | | | Auto-test updated. As a bonus, stabilized tst_QListView::task262152_setModelColumnNavigate. Reviewed-by: Thierry
* fix for QTreeView to not animate if there are no visible childrenThierry Bastian2009-10-201-4/+6
|
* Fixed QTreeView trying to animate when parent item has no childThierry Bastian2009-10-201-3/+3
| | | | | | We now check that the item has children before animating. Reviewed-by: Alexis
* Fixed wrong scrolling in QListView with hidden rows in ListModeGabriel de Dietrich2009-10-202-7/+18
| | | | | | | | | | | The flow positions in ScrollPerItem mode did not take the hidden rows into account when configuring the vertical scroll bar. A mapping between the scroll bar value and the flow position has been added. Auto-test included. Task-number: QTBUG-2233 Reviewed-by: Thierry
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-widget-team into 4.6Alexis Menard2009-10-202-4/+4
|\
| * Fix a bug affecting keyboard navigation in the table viewOrgad Shaneh2009-10-191-2/+2
| | | | | | | | | | Reviewed-by: thierry Reviewed-by: pierre
| * Fixed typo in qtableview.cpp.Gabriel de Dietrich2009-10-161-1/+1
| | | | | | | | | | | | Auto-test included. Will timeout on fail. Reviewed-by: Alexis
| * Fixed updating problems QListView with IconModeGabriel de Dietrich2009-10-151-1/+1
| | | | | | | | | | | | | | The updated rectangle coordinates didn't use the viewport offsets. Reviewed-by: Olivier Task-number: QTBUG-4819
* | Merge commit 'origin/4.5' into origin/4.6Olivier Goffart2009-10-151-1/+1
|\ \ | |/ |/| | | | | | | | | | | Conflicts: src/gui/kernel/qcocoaview_mac.mm src/network/access/qhttpnetworkconnection.cpp src/opengl/qgl_qws.cpp src/opengl/qglpixelbuffer_egl.cpp
| * Fix regression while updating items in itemview.Olivier Goffart2009-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | geometry() is in parent coordinate. We want the coordinate in viewport coordinate. There is an offset (the header geometry) between the two. So the first item was not refreshed. (Regression because of e5b32fbe0efc8 and a54c18e27bbb) Reviewed-by: Gabriel Reviewed-by: Alexis Task-number: QTBUG-4849
* | Make the autotest pass for descending order in QTableWidgetPierre Rossi2009-10-142-2/+2
| | | | | | | | | | | | | | It failed after this commit: 19030e2af098e319e3c3f3883c51e28364bf3ccf Reviewed-by: ogoffart
* | Sorting bug in QTableView fixPierre Rossi2009-10-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | When the DisplayRole is identical for two or more items, any modification of one item (e.g. backgroundColorRole) may trigger a re-ordering, which is obviously not an behaviour to be expected. Same fix as the one used for QTreewidget in c9eacfa1c791e2d228a3c8f0c119d02d7f46ee02. Task-number: QTBUG-4856 Task-number: 262056 Reviewed-by: Olivier Goffart
* | Fix sorting after changing a QTableView's headerOlivier Goffart2009-10-131-0/+3
| | | | | | | | | | | | | | | | | | Keep the sorting states in sync with the header when setting custom headers Reviewed-by: Gabriel Task-number: QTBUG-3128 task-number: 234926
* | Itemview: fix regression concerning Ctrl+rubber band selectionsFrank Reininghaus2009-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When making a rubber band selection while Control is pressed in an itemview with extended selection, make sure that the selection state of the items inside the rubber band is toggled. This ammend commit 0644e3dce532b1df00a77d3a30c61d6b75d3ff30 Merge-request: 1759 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com> Reviewed-by: Gabriel Task-number: QTBUG-1435 Task-number: 191545
* | Merge commit '8df79a473e1a7e5c79b9b10827985bf3e9501002' into 4.6Alexis Menard2009-10-121-3/+1
|\ \
| * | Revert merge commit 3945fd75a93d790434b33c2d23aOlivier Goffart2009-10-121-1/+1
| | | | | | | | | | | | | | | The resolution of conflicts introduced regressions. And the commit was already in 4.6
| * | Fixed compilation warning by removing unused variables.Denis Dzyubenko2009-10-091-2/+0
| | | | | | | | | | | | Reviewed-by: trustme
* | | Fixed keyboard navigation for QTableViewGabriel de Dietrich2009-10-123-71/+140
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | Keyboard navigation didn't work in the following cases: - The last column was disabled and we pressed the tab key when at the 2nd last column. (See ref. task). - Spans with their anchor column or row hidden or disabled. - Navigation would not preserve the original row/column when traversing a span horizontally/vertically. Auto-tests submitted with this commit. Task-number: QTBUG-3878 Reviewed-by: Olivier
* | Merge branch '4.5' into 4.6Thiago Macieira2009-10-081-1/+3
|\ \ | |/ | | | | | | Conflicts: src/gui/itemviews/qheaderview.cpp
| * QHeaderView: fixed the sizeHint with hidden sectionsThierry Bastian2009-10-071-4/+8
| | | | | | | | | | | | | | We used to check the 100 first sections and 100 last sections Now we make sure we check 100 visible sections Task-number: 255574
* | QGuiPlatformPlugin: QFileIconProvider and QIcon backend.Olivier Goffart2009-10-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a backend for QFileIconProvider in the platform plugin Also change the QIcon::fromTheme backend in the platform plugin: On KDE, we unfortunately can't use KIcon as backend, as the current API doesn't let us know easily (and quickly) wether we should use the fallback or not (KDE always fallback to the question mark "unknown" icon) So we will use the QIconLoader even on KDE. But we need to make sure that the theme name and the icon search paths are correct. Ask that to the platform plugin Reviewed-by: Jens Bache-Wiig
* | viewport()->update() after delegate set for QAbstractItemViewJeremy Katz2009-10-071-3/+3
| | | | | | | | Reviewed-by: Olivier
* | Span update after row and column insertion and removal in QTableView.Gabriel de Dietrich2009-10-063-3/+426
| | | | | | | | | | | | | | | | | | The feature had not been implemented yet. Auto-test and benchmark included. As a bonus, single cell spans are no longer added to the span collection. Reviewed-by: Thierry Task-number: 245327 Task-number: QTBUG-3610
* | Add GNOME implementation for native filesystem iconsJens Bache-Wiig2009-10-061-0/+15
| | | | | | | | | | | | | | | | | | | | | | This adds some code to support native filesystem icons on GNOME. It works by resolving gnome libs and gnome-vfs dynamically, hence we are explicitly running it on GNOME only and not KDE. Even if it would work there as well. We are planning on adding this functionality to the platform plugin as well. Task-number: QTBUG-2195 Reviewed-by: joao
* | QAbstractItemView: Make sure the view is updated when a delegate is set.Olivier Goffart2009-10-051-1/+3
| | | | | | | | | | | | | | The test tst_QListView::task254449_draggingItemToNegativeCoordinates was failing in cocoa because of this. (on, cocoa, the call to show was doing the first paintEvent) Reviewed-by: Thierry
* | Add QAbstractItemView::setDefaultDropAction(Qt::DropAction)David Faure2009-10-023-5/+36
| | | | | | | | | | | | | | | | | | | | Needed when a list or tree supports both moving and copying, but moving should be the default (e.g. tree of bookmarks, or any other item that doesn't really make sense being copied in general, but moved often). Merge-request: 1668 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com> Reviewed-by: Thierry
* | Fix an issue that was uncovered by two tst_QAbstractItemView fails.Alessandro Portale2009-10-011-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tst_QAbstractItemView::shiftArrowSelectionAfterScrolling() and tst_QAbstractItemView::shiftSelectionAfterRubberbandSelection() are two relatively new test cases that always failed when Qt was configured with QT_KEYPAD_NAVIGATION. And that even though we set the navigation mode to Qt::NavigationModeNone when running autotests for Symbian. Fix: in QAbstractItemViewPrivate::extendedSelectionCommand(), we make sure that even with keypad navigation enabled, the shift-arrow feature is available. Reviewed-by: Jani Hautakangas modified: src/gui/itemviews/qabstractitemview.cpp
* | Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2009-09-242-4/+7
|\ \ | |/ | | | | | | | | | | Conflicts: examples/webkit/formextractor/formextractor.pro mkspecs/features/qt.prf src/gui/painting/qpaintengineex.cpp
| * Ensure that QStandardItem::clone() is used when a prototype is setAndy Shaw2009-09-222-4/+7
| | | | | | | | | | | | | | | | This fixes a regression introduced in Qt 4.5.0, when dragging an item within a QTreeView it would not call clone() when it was dropped even if a prototype was set on the QStandardItemModel. Reviewed-by: Marius Bugge Monsen
| * Update license headers again.Jason McDonald2009-09-0866-264/+264
| | | | | | | | Reviewed-by: Trust Me
* | Doc: Moved the note about QFileSystemModel to the start of the document.David Boddie2009-09-221-4/+4
| | | | | | | | Reviewed-by: Alexis Ménard