summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews
Commit message (Collapse)AuthorAgeFilesLines
* Fix compilation on mac.Olivier Goffart2010-08-301-2/+2
| | | | Commit d34287af6fc1c forgot to update this platform dependent code.
* Fix crash introduced with d34287af6fc1c7558e8ed15dbb29c0e6b58b7b00Olivier Goffart2010-08-301-6/+10
| | | | | | | | | | Crash occured in tst_QTreeWidget::task253109_itemHeight When we use loop over editorIndexHash, we cannot garantee that the key is still a valid valid pointer, we need to confirm it with the QWeakPointer in indexEditorHash Reviewed-by: Gabriel
* QAbstractItemView: optimize handling of editors for view with large numbers ↵Stephen Bowline2010-08-274-82/+87
| | | | | | | | | | | | | | | | | | 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
* Merge branch 'qt-master-from-4.7' of ↵Qt Continuous Integration System2010-08-251-3/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scm.dev.nokia.troll.no:qt/qt-integration into master-integration * 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: (168 commits) Remove enums from bitfield, since all compilers do not support them. Don't circumvent onDestruction handlers when clearing expression in delegate cleanup Fix responseText to check the charset encoding field and also to not Re-insert and emit the correct NOTIFY signals following the removal Fix poor flicking behavior with slower flicks. Alignment of shadow for rich text is broken when using text styles typo Setting one dimension of the sourceSize should set the other dimension. Document calling QObject methods from QML in Extending QML in C++ docs. Stabilize tst_qgraphicsscene QDeclarativeDebug: send a message when new object are added QDeclarativeEngineDebugServer: make it a singleton. Fixed compile error in runonphone. Fix mispositioned text with QStaticText and OpenVG graphics system Use binarysort to find items. Use QImage 'convertInPlace' versions in QVGPixmapData load functions. QGraphicsView: Fix assert that may occurs if there are 'empty' item to draw, and changed() signal connected Added an install target to runonphone. Fix tst_Collections::QTBUG13079_collectionInsideCollection Fix few declarative code issues discovered by static code analysis ...
| * Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-08-251-3/+5
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/win32/msbuild_objectmodel.cpp src/declarative/qml/qdeclarativexmlhttprequest.cpp src/opengl/opengl.pro src/opengl/qgl_p.h src/plugins/bearer/connman/qconnmanservice_linux.cpp tests/auto/qpainter/tst_qpainter.cpp tools/assistant/tools/assistant/helpviewer_qwv.h tools/assistant/tools/assistant/openpageswidget.h
| | * Keyboard navigation regression in QTreeViewGabriel de Dietrich2010-08-161-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Ammends commit 8da7252de0badb818302763cbe62c38ad699f1f3 Auto-test included. Reviewed-by: Olivier Task-number: QTBUG-11466
* | | Don't toggle selected state when checking/unchecking an itemPierre Rossi2010-08-252-5/+8
|/ / | | | | | | | | | | | | | | | | When selecting items with the mouse (and a keyboard modifier), clicking in the check rect of a checkable item shouldn't toggle the selected state but only check/uncheck it. Task-number: QTBUG-4435 Reviewed-by: Thierry
* | Make the QItemSelectionRange and QItemSelectionModel ensure that the model ↵Stephen Kelly2010-08-191-1/+2
| | | | | | | | | | | | | | is correct. Merge-request: 720 Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-08-132-2/+7
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qpainter.cpp src/gui/text/qtextengine.cpp tests/auto/qimage/tst_qimage.cpp tests/auto/qpainter/tst_qpainter.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf
| * Correcting spelling mistakes in documentation. Part of fix for QTBUG-11938.Jerome Pasion2010-08-091-1/+1
| | | | | | | | | | Reviewer: David Boddie Task number: QTBUG-11938
| * Merge remote branch 'origin/4.6' into 4.7-from-4.6Rohan McGovern2010-07-291-1/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebKit/qt/ChangeLog src/gui/itemviews/qlistview.cpp tests/auto/qlistview/tst_qlistview.cpp tests/auto/qnetworkreply/test/test.pro tests/auto/qsocks5socketengine/qsocks5socketengine.pro
| | * Fix crash when all the items in a QListView are hiddenGabriel de Dietrich2010-07-271-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling QIconModeViewBase::initDynamicLayout() on the second and successive segments would return QPoint(-1,-1), resulting in a totally empty area rectangle for all the items while in QIconModeViewBase::doDynamicLayout(). This rectangle is used to initialize the BSP tree, and produces an arithmetic exception when empty. Furthermore, a rendering bug was also apparent when displaying the first item of a segment while the last item of the previous segment was hidden. Auto-tests included. Reviewed-by: Olivier Task-number: QTBUG-12308
* | | Remove the use of deprecated qVariant*Olivier Goffart2010-08-064-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test directory untouched. This just apply those regexp: git grep -O"sed -i 's/qVariantValue</qvariant_cast</'" qVariantValue git grep -O"sed -i 's/qVariantSetValue(\([^&*\(),]*\), */\\1.setValue(/'" qVariantSetValue git grep -O"sed -i 's/qVariantSetValue *<\([^>]*\)> *(\([^&*\(),]*\), */\\2.setValue<\\1>(/'" qVariantSetValue git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*([^&*\(),]*)\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert git grep -O"sed -i 's/qVariantFromValue\( *[(<]\)/QVariant::fromValue\\1/'" qVariantFromValue git checkout src/corelib/kernal/qvariant* Rev-by: dev mailing list
* | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-07-283-32/+43
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qapplication.cpp tests/auto/qfileinfo/tst_qfileinfo.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt.qdocconf
| * | Fix a Headerview layout bugPierre Rossi2010-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When the sections were moved calling logicalIndex on what was already a logical index messed up the hidden sections. Task-number: QTBUG-12268 Reviewed-by: Gabriel
| * | QFileIconProvider: Load icons on demand.Friedemann Kleint2010-07-091-30/+41
| | | | | | | | | | | | | | | | | | | | | | | | Drawing icons is quite costly and mostly, only 'file' and 'directory' are required. Speeds up application startup considerably. Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
| * | doc: Fixed several qdoc warnings.Martin Smith2010-07-091-1/+1
| | |
* | | Small fix in iteviews for sizeHintForColumn/RowThierry Bastian2010-07-091-3/+3
| | | | | | | | | | | | | | | | | | | | | We were trying to check the column/row count but always from the root of the model insteal of the root that can be defined in the view. Task-number: QTBUG-5773
* | | Incorrect assertion in item viewsThierry Bastian2010-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | we were checking if the parent of main items was QModelIndex instead if checking if it is just invalid (it might have a pointer to its model and still be invalid). Task-number: QTBUG-12090 Reviewed-by: Ian Walters
* | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-07-081-0/+24
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (29 commits) Fixes the double spinbox not updating geometry when suffix is changed Made QGL2GradientCache thread safe. Add QItemSelectionRange::operator<() Don't call GetDC() nedlessly. Make QScriptAnalysis fit in two bytes again QGLPixelBuffer should not rely on temporary QGLWidgets. Initialize pex. Remove warning. Fix the tests for the internal GL resource system. Rework how QGLTextureGlyphCache makes use of the resource system. The group pointer should no longer be a part of the 64 bit int. Enable glyph uploads from a thread in the X11 font engine. Make qt_pixmap_serial thread-safe. Clean up debug output. Clarification regarding the WA_X11InitThreads flag. Rework the internal GL resource system yet again. Check Qt::AA_X11InitThreads to determine pixmap usage in threads. Add an application attribute to control XInitThreads(). Unnecessary alloc + remove unused headers. QGLPixelBuffer should manage its own paint engines. ...
| * | | Add QItemSelectionRange::operator<()Stephen Kelly2010-07-071-0/+24
| | | | | | | | | | | | | | | | | | | | Reviewed-by: Olivier Goffart Merge-Request: 688
* | | | fix qtconfig builds with drag and drop disabledJeremy Katz2010-07-061-1/+2
|/ / / | | | | | | | | | Reviewed By: Christian
* | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-07-012-2/+12
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt src/gui/text/qtextlayout.cpp tools/assistant/tools/assistant/helpviewer_qwv.cpp tools/assistant/tools/assistant/helpviewer_qwv.h tools/configure/configureapp.cpp
| * | Doc: Small change to QAbstractItemDelegate::editorEvent()Geir Vattekar2010-06-171-2/+8
| | | | | | | | | | | | | | | Task-number: QTBUG-2446 Reviewed-by: Marius Bugge Monsen
| * | Doc: QTreeWidgetItems remove themselves from views when deleted.Geir Vattekar2010-06-041-0/+4
| | | | | | | | | | | | Task-number: QTBUG-10640
* | | Auto expand of QTreeWidget does not work correctly if animatedThierry Bastian2010-07-013-5/+7
| | | | | | | | | | | | | | | | | | | | | 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-293-26/+3
| | | | | | | | | | | | | | | | | | | | | The editor was always considered opaque and clipping was set on the painter. This assumption can't be verified. Task-number: QTBUG-11367
* | | QListView: speedup QListView::setRowHidden()Olivier Goffart2010-06-162-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Basically the same optimisation that had been made long ago in the tree view: Use the right data structure for QListViewPrivate::hiddenRows (QSet instead of QVector) Task-number: QTBUG-11438 Reviewed-by: Gabriel
* | | Reimplement more of QAbstractItemModel in QAbstractProxyModelStephen Kelly2010-06-042-0/+108
| | | | | | | | | | | | | | | | | | | | | The non-structural parts of the API are implemented to forward calls to the source model. Merge-request: 656 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* | | QItemSelectionModel: When rows are removed from the middle of the range, ↵Stephen Kelly2010-06-031-5/+13
| | | | | | | | | | | | | | | | | | | | | remove them from the selection. Merge-request: 2403 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-06-033-9/+90
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix LeftToRight + setSpacing + setWrapping when drag-and-dropping Remove tst_QStringRef::localeAwareCompare Itemviews: use localeAwareCompare for comparing in the widget classes tst_qstringref.cpp: Fix licence header and compilation on windows Add some convenience functions for QStringRef
| * | Fix LeftToRight + setSpacing + setWrapping when drag-and-droppingIan Walters2010-06-023-9/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quite a number of assumptions in qlistview assume either wrapping or spacing, but not both. This fixes the Flow left to right case. The TopToBottom case is not affected. TopToBottom + wrapping still works TopToBottom + spacing still works, TopToBottom + spacing + wrapping is still as broken as ever. Drag move prior to this patch was correct, but also need the drop to use the spacing when determining what index to apply to, not just the drag move. Reviewed-by: gabi Merge-Request: 586 Task-number: QTBUG-8938
* | | Removed unused variableThorbjørn Lindeijer2010-05-271-1/+0
| | | | | | | | | | | | Reviewed-by: Olivier Goffart
* | | Merge remote branch 'origin/4.7' into oslo-staging-1Aaron McCarthy2010-05-271-1/+1
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: doc/src/declarative/advtutorial.qdoc
| * | | 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
* | | doc: Fixed many broken links.Martin Smith2010-05-204-8/+8
|/ /
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-05-191-1/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix platform regression: Support QFont::setStretch() on Cocoa Fix a memory leak from QItemSelectionModel when changing the model Small hack to allow forcing off font smoothing on Mac OS X
| * | Fix a memory leak from QItemSelectionModel when changing the modelThierry Bastian2010-05-191-1/+5
| | | | | | | | | | | | | | | Reviewed-By: ogoffart Task-Number: QTBUG-10806
* | | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-05-171-1/+4
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/demos.pro mkspecs/features/resources.prf mkspecs/features/uic.prf src/corelib/io/qurl.cpp src/corelib/tools/qlocale_symbian.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/graphicsview/qgraphicswidget_p.cpp src/gui/graphicsview/qgraphicswidget_p.h src/gui/util/qsystemtrayicon_win.cpp src/multimedia/audio/qaudioinput.cpp tests/auto/qhostinfo/qhostinfo.pro
| * QS60Style: In S60 3.x and 5.0 Qt itemviews behaviour is not nativelikeSami Merila2010-05-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently style defines QStyle::SH_ItemView_ActivateItemOnSingleClick, which leads to itemview item activation only occur on double-click (or tap). The item selection work native-like on Sym^3. As a correction, style needs to check the passed styleoption and check whether or not the state "Selected" is on. In these cases, the itemactivation can proceed. Task-number: QTBUG-10697 Reviewed-by: Miikka Heikkinen
* | 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
* | Fixed the sizehint for cols/rows in qtableviewThierry Bastian2010-04-281-4/+4
| | | | | | | | | | | | | | | | It could return wrong values because we were not always checking the right cols/rows. Reviewed-By: gabi Task-Number: QTBUG-10169
* | QListView: Re-fix scrollbar rangesGabriel de Dietrich2010-04-151-4/+10
| | | | | | | | | | | | | | | | | | | | | | Commit 11dea4a8b227801c110f791f350632bf6f0c958d fixing QTBUG-2678 was the wrong solution and introduced some regressions. Auto-test included. Reviewed-by: Thierry Task-number: QTBUG-2678 Task-number: QTBUG-9455
* | QTreeView: remove dead code.Olivier Goffart2010-04-132-20/+0
| | | | | | | | | | | | Not in use since p4 change 221452 Reviewed-by: Gabriel
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-04-125-2/+35
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (44 commits) QSlider and StyleSheet: fix one pixel error while drawing the SliderAddPage accelerate QWindowsPipeWriter for bigger chunks of data Fix antialiasing with transformed text in OpenGL2 paint engine Fix flattening of largely scaled, thin, dashed beziers. Increased the precision used to flatten beziers Fix QT_NO_MOVIE Fix compile error with QT_NO_ACTION in QtGui Fix QT_NO_COMPLETER Fix QT_NO_FSCOMPLETER Fix QT_NO_FILESYSTEMMODEL Build fix Safeguard ourselves against corrupt registry values for cleartype gamma fix cetest build properly qdrawhelper: optimize the fetch transformed bilinear functions Compile fix for WinCE Make sure the selectionChanged signal is not called too much Implement heightForWidth support for QTabWidget and QStackedLayout. Fix the doc for QFrame::frameStyle Don't use texture-from-pixmap if the target isn't GL_TEXTURE_2D Add runtime check for GLX >= 1.3 before using glXCreatePixmap ...
| * | Make sure the selectionChanged signal is not called too muchThierry Bastian2010-04-123-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | It could happen that it was called with empty selectionrange Now we check to see if the selection ranges are empty Task-number: QTBUG-9507 Reviewed-by: gabi
| * | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-04-102-1/+9
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (27 commits) Fix the doc for QFrame::frameStyle Don't use texture-from-pixmap if the target isn't GL_TEXTURE_2D Add runtime check for GLX >= 1.3 before using glXCreatePixmap QDrawHelper: Reduce code duplications Improve matching X11 VisualIDs to EGL configs Remove obsolete function set_winapp_name() Speedup fetchTransformedBilinear in the fast_matrix case Allow y-interted pixmaps for brushes in GL2 paint engine Build fix for mingw Fix build with mingw (64 bit) Make configure.exe compatible with mingw 64 Adjust indentation e-Ink support cleanup Tweak the display update IOCTL calls Support 8-Track e-Ink devices Get stride from LinuxFB instead of calculating it ourselves. Use DIR_SEPARATOR when setting up variables for RCC and UIC in features. Fixed bug in QPainterPath::intersected(). Fix compile error with QT_NO_ANIMATION O(n^2) to O(n) optimization in QTreeWidget::selectedItems() ...
| | * | O(n^2) to O(n) optimization in QTreeWidget::selectedItems()Gabriel de Dietrich2010-04-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we need to ensure that there will be no duplicates in the list returned by QTreeWidget::selectedItems() (see commit ea75d434e40100a9abf56195b646a8efdf3c1288), we now use a QSet to ensure unicity while keeping the same order as before. Reviewed-by: Olivier Task-number: QTBUG-9485
| | * | 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