diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-11 08:51:54 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-11 14:07:01 (GMT) |
commit | 0f60b6e05a707630e02655c60ae60884262a4b8e (patch) | |
tree | 564982f5dc6a2266818e050b2576ef4f5e74eaf5 /src/gui/itemviews | |
parent | f0a4a37a5182660580fd361110d3fd51463221d8 (diff) | |
download | Qt-0f60b6e05a707630e02655c60ae60884262a4b8e.zip Qt-0f60b6e05a707630e02655c60ae60884262a4b8e.tar.gz Qt-0f60b6e05a707630e02655c60ae60884262a4b8e.tar.bz2 |
remove q->layout() and q->parentWidget() code where unnecessary
Diffstat (limited to 'src/gui/itemviews')
-rw-r--r-- | src/gui/itemviews/qtreewidget.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gui/itemviews/qtreewidget.cpp b/src/gui/itemviews/qtreewidget.cpp index 5604f8d..24713c4 100644 --- a/src/gui/itemviews/qtreewidget.cpp +++ b/src/gui/itemviews/qtreewidget.cpp @@ -2280,10 +2280,9 @@ void QTreeWidgetPrivate::_q_emitCurrentItemChanged(const QModelIndex ¤t, void QTreeWidgetPrivate::_q_sort() { - Q_Q(QTreeWidget); if (sortingEnabled) { - int column = q->header()->sortIndicatorSection(); - Qt::SortOrder order = q->header()->sortIndicatorOrder(); + int column = header->sortIndicatorSection(); + Qt::SortOrder order = header->sortIndicatorOrder(); model()->sort(column, order); } } @@ -2311,12 +2310,11 @@ void QTreeWidgetPrivate::_q_selectionChanged(const QItemSelection &selected, con void QTreeWidgetPrivate::_q_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) { - Q_Q(QTreeWidget); if (sortingEnabled && topLeft.isValid() && bottomRight.isValid() && !model()->sortPendingTimer.isActive()) { - int column = q->header()->sortIndicatorSection(); + int column = header->sortIndicatorSection(); if (column >= topLeft.column() && column <= bottomRight.column()) { - Qt::SortOrder order = q->header()->sortIndicatorOrder(); + Qt::SortOrder order = header->sortIndicatorOrder(); model()->ensureSorted(column, order, topLeft.row(), bottomRight.row(), topLeft.parent()); } |