summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-10-23 14:03:05 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-25 14:10:04 +0200
commit92c739cf50b18b8abdc1b30480b75cc6b27cf5bf (patch)
treef2b169ae42ed17669d8d6a26e3491f3a01d0044a /tests
parent1550c461795d952afd98d6282e538e8894fa923b (diff)
Implement viewOptions logic in QTableViewPrivate.
This is similar to the patch 05aa8c6c12509cce87d1a3811c5ea1dd83fa0898 which was applied to QListView. Task-number: QTBUG-26548 Change-Id: I38ff07230673a93a32b01a7f1951d0378d94185b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
index 2fbd90a3fe..2bccb03845 100644
--- a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
+++ b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
@@ -199,6 +199,7 @@ private slots:
void task234926_setHeaderSorting();
void changeHeaderData();
+ void viewOptions();
};
// Testing get/set functions
@@ -477,6 +478,10 @@ public:
return QTableView::sizeHintForRow(row);
}
+ QStyleOptionViewItem viewOptions() const {
+ return QTableView::viewOptions();
+ }
+
bool checkSignalOrder;
public slots:
void currentChanged(QModelIndex , QModelIndex ) {
@@ -4074,5 +4079,12 @@ void tst_QTableView::taskQTBUG_10169_sizeHintForRow()
QCOMPARE(orderedHeight, reorderedHeight);
}
+void tst_QTableView::viewOptions()
+{
+ QtTestTableView view;
+ QStyleOptionViewItem options = view.viewOptions();
+ QVERIFY(options.showDecorationSelected);
+}
+
QTEST_MAIN(tst_QTableView)
#include "tst_qtableview.moc"