Don't display checkboxes for data tags...

..as they can't be (un)checked at all. Might make sense later on
but at the current state of data tag support they're completely useless.

Change-Id: I3b2b79e1d2aa445fcd12d6794151d1833040aa76
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
Christian Stenger
2015-10-29 12:16:30 +01:00
parent 128995b272
commit fa9912f3ad
2 changed files with 2 additions and 0 deletions

View File

@@ -101,6 +101,7 @@ QVariant TestTreeItem::data(int /*column*/, int role) const
case ROOT:
case TEST_DATAFUNCTION:
case TEST_SPECIALFUNCTION:
case TEST_DATATAG:
return QVariant();
case TEST_CLASS:
return m_name.isEmpty() ? QVariant() : checked();

View File

@@ -169,6 +169,7 @@ Qt::ItemFlags TestTreeModel::flags(const QModelIndex &index) const
return Qt::ItemIsEnabled;
case TestTreeItem::TEST_DATAFUNCTION:
case TestTreeItem::TEST_SPECIALFUNCTION:
case TestTreeItem::TEST_DATATAG:
default:
return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
}