diff options
author | Thorbjørn Martsum <tmartsum@gmail.com> | 2013-04-08 15:40:11 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-09 06:45:01 +0200 |
commit | 03c761287f1a007c7177d90ed81341d0147eae05 (patch) | |
tree | ffa6c4022f414cee643d3875050bb7f375bfc8f2 /src/widgets/itemviews/qtreeview_p.h | |
parent | 03c5eacfbb7f8fa294368bff812428680a0b9f3b (diff) |
resizeToContents - move some of sizeHint into separate functions
Some of sizeHintForColumn is now moved into widthHintForIndex.
(and in QTreeView some of sizeHintForRow into heightHintForIndex)
This makes the code a bit more readable and it prepares some
extensions that will use these functions more. There should
be no semantic changes in this patch.
In releasemode this does not seem to have a performance cost.
(QTableView actually seemed to be a bit faster)
Change-Id: I940432ee01715ce94cd6aab5f3b2aa00dcd19ace
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/widgets/itemviews/qtreeview_p.h')
-rw-r--r-- | src/widgets/itemviews/qtreeview_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/itemviews/qtreeview_p.h b/src/widgets/itemviews/qtreeview_p.h index 90e83cb58c..4212e5bce0 100644 --- a/src/widgets/itemviews/qtreeview_p.h +++ b/src/widgets/itemviews/qtreeview_p.h @@ -171,7 +171,7 @@ public: // logicalIndices: vector of currently visibly logical indices // itemPositions: vector of view item positions (beginning/middle/end/onlyone) void calcLogicalIndices(QVector<int> *logicalIndices, QVector<QStyleOptionViewItem::ViewItemPosition> *itemPositions, int left, int right) const; - + int widthHintForIndex(const QModelIndex &index, int hint, const QStyleOptionViewItem &option, int i) const; QHeaderView *header; int indent; |