diff options
author | Tobias Koenig <tokoe@kde.org> | 2009-06-10 15:11:59 (GMT) |
---|---|---|
committer | Tobias Koenig <tokoe@kde.org> | 2009-06-10 15:11:59 (GMT) |
commit | f1e6e89f7ee452af0e4404af537f5fed2a2b2dc5 (patch) | |
tree | 045fbf67a4806e4e217ef23cdf4f363ac359bef1 /src/gui/itemviews/qtablewidget.cpp | |
parent | 5d87f2542bbcb0877f4a9a9b5be4df80cd6aa4cd (diff) | |
parent | 5b24c5793607c809b1bac82c7cc3696001ee9217 (diff) | |
download | Qt-f1e6e89f7ee452af0e4404af537f5fed2a2b2dc5.zip Qt-f1e6e89f7ee452af0e4404af537f5fed2a2b2dc5.tar.gz Qt-f1e6e89f7ee452af0e4404af537f5fed2a2b2dc5.tar.bz2 |
Merge branch 'master' of git://gitorious.org/qt/qt
Diffstat (limited to 'src/gui/itemviews/qtablewidget.cpp')
-rw-r--r-- | src/gui/itemviews/qtablewidget.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gui/itemviews/qtablewidget.cpp b/src/gui/itemviews/qtablewidget.cpp index e88301e..8cb2e55 100644 --- a/src/gui/itemviews/qtablewidget.cpp +++ b/src/gui/itemviews/qtablewidget.cpp @@ -1662,10 +1662,9 @@ void QTableWidgetPrivate::_q_emitCurrentItemChanged(const QModelIndex ¤t, void QTableWidgetPrivate::_q_sort() { - Q_Q(QTableWidget); if (sortingEnabled) { - int column = q->horizontalHeader()->sortIndicatorSection(); - Qt::SortOrder order = q->horizontalHeader()->sortIndicatorOrder(); + int column = horizontalHeader->sortIndicatorSection(); + Qt::SortOrder order = horizontalHeader->sortIndicatorOrder(); model()->sort(column, order); } } @@ -1673,11 +1672,10 @@ void QTableWidgetPrivate::_q_sort() void QTableWidgetPrivate::_q_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) { - Q_Q(QTableWidget); if (sortingEnabled && topLeft.isValid() && bottomRight.isValid()) { - int column = q->horizontalHeader()->sortIndicatorSection(); + int column = horizontalHeader->sortIndicatorSection(); if (column >= topLeft.column() && column <= bottomRight.column()) { - Qt::SortOrder order = q->horizontalHeader()->sortIndicatorOrder(); + Qt::SortOrder order = horizontalHeader->sortIndicatorOrder(); model()->ensureSorted(column, order, topLeft.row(), bottomRight.row()); } } |