forked from qt-creator/qt-creator
Core: Fix item flag on locator settingspage
Do not make the 'included by default' column editable as this would make the column act strange on double clicks. Instead of providing a non-functional change opportunity for the checkstate's value this is now handled similar to the double click on other columns. Change-Id: Id2851b2bfe2b7cda8c3231f58bf436196a533171 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -85,7 +85,7 @@ QVariant FilterItem::data(int column, int role) const
|
|||||||
return m_filter->shortcutString();
|
return m_filter->shortcutString();
|
||||||
break;
|
break;
|
||||||
case FilterIncludedByDefault:
|
case FilterIncludedByDefault:
|
||||||
if (role == Qt::CheckStateRole || role == SortRole || role == Qt::EditRole)
|
if (role == Qt::CheckStateRole || role == SortRole)
|
||||||
return m_filter->isIncludedByDefault() ? Qt::Checked : Qt::Unchecked;
|
return m_filter->isIncludedByDefault() ? Qt::Checked : Qt::Unchecked;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -102,7 +102,7 @@ Qt::ItemFlags FilterItem::flags(int column) const
|
|||||||
if (column == FilterPrefix)
|
if (column == FilterPrefix)
|
||||||
return Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable;
|
return Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable;
|
||||||
if (column == FilterIncludedByDefault)
|
if (column == FilterIncludedByDefault)
|
||||||
return Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsUserCheckable;
|
return Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable;
|
||||||
return Qt::ItemIsSelectable | Qt::ItemIsEnabled;
|
return Qt::ItemIsSelectable | Qt::ItemIsEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user