summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qtableview.cpp
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@edeltech.ch>2013-10-17 14:10:46 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-17 15:58:32 +0200
commitb329c8ffb960da492d90c7bf70ed93f23fa2d400 (patch)
treef9672c8613bca4464c678ae42d06e6d35436d5ac /src/widgets/itemviews/qtableview.cpp
parentc3bf3bd8b74187b44ec91582e1cf2be546a73349 (diff)
Move the viewOptions code back to public implementation
The code generating the QStyleOptionViewItem has been moved back to the public implementation and the private QAbstractItemView::viewOptions calling it (like the Qt 4 implementation does). This makes the item views behave properly again e.g. QListView drag & drop in Icon mode gets the correct options to draw the moving items Task-number: QTBUG-1180 Change-Id: I068861e1485252f12d73f9acaf12933d0ec84e2c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/widgets/itemviews/qtableview.cpp')
-rw-r--r--src/widgets/itemviews/qtableview.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/widgets/itemviews/qtableview.cpp b/src/widgets/itemviews/qtableview.cpp
index 34e881571e..2aff170732 100644
--- a/src/widgets/itemviews/qtableview.cpp
+++ b/src/widgets/itemviews/qtableview.cpp
@@ -1346,20 +1346,14 @@ void QTableView::scrollContentsBy(int dx, int dy)
}
}
-QStyleOptionViewItem QTableViewPrivate::viewOptions() const
-{
- QStyleOptionViewItem option = QAbstractItemViewPrivate::viewOptions();
- option.showDecorationSelected = true;
- return option;
-}
-
/*!
\reimp
*/
QStyleOptionViewItem QTableView::viewOptions() const
{
- Q_D(const QTableView);
- return d->viewOptions();
+ QStyleOptionViewItem option = QAbstractItemView::viewOptions();
+ option.showDecorationSelected = true;
+ return option;
}
/*!