From ae8406d82f541f6d9112bdac192e5e4e114d56aa Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 6 May 2015 17:57:36 +0200 Subject: Deprecate ItemIsTristate in favor of ItemIsAutoTristate. This makes the behavior much more clear. You can get a tristate checkbox just by setting the CheckStateRole to PartiallyChecked, no tristate flag needed. The flag, on the other hand, enables the automatic-tristate behavior in QTreeViews (and only there), hence the new name for it. Change-Id: I18d292a8b8294c863eab806f3874d15dfb72556c Reviewed-by: Jarek Kobus --- tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/auto/widgets/itemviews/qitemdelegate') diff --git a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp index 439eeff005..3bd4112122 100644 --- a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp +++ b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp @@ -1154,7 +1154,7 @@ void tst_QItemDelegate::editorEvent_data() QTest::newRow("unchecked, tristate, release") << (int)(Qt::Unchecked) - << (int)(defaultFlags | Qt::ItemIsTristate) + << (int)(defaultFlags | Qt::ItemIsAutoTristate) << true << (int)(QEvent::MouseButtonRelease) << (int)(Qt::LeftButton) @@ -1163,7 +1163,7 @@ void tst_QItemDelegate::editorEvent_data() QTest::newRow("partially checked, tristate, release") << (int)(Qt::PartiallyChecked) - << (int)(defaultFlags | Qt::ItemIsTristate) + << (int)(defaultFlags | Qt::ItemIsAutoTristate) << true << (int)(QEvent::MouseButtonRelease) << (int)(Qt::LeftButton) @@ -1172,7 +1172,7 @@ void tst_QItemDelegate::editorEvent_data() QTest::newRow("checked, tristate, release") << (int)(Qt::Checked) - << (int)(defaultFlags | Qt::ItemIsTristate) + << (int)(defaultFlags | Qt::ItemIsAutoTristate) << true << (int)(QEvent::MouseButtonRelease) << (int)(Qt::LeftButton) -- cgit v1.2.3