diff options
author | Christian Stenger <christian.stenger@qt.io> | 2023-04-27 08:03:48 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2023-04-27 13:26:49 +0000 |
commit | 927c34df2f9a1acb9da12b41aff9ca28f1843df1 (patch) | |
tree | 9d4d93d9fd04169716e08678810e78eef3ecf2e5 | |
parent | 3aec6b776c163be922ebd22f6e07671962c118d8 (diff) | |
download | qt-creator-927c34df2f9a1acb9da12b41aff9ca28f1843df1.tar.gz |
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>
-rw-r--r-- | src/plugins/coreplugin/locator/locatorsettingspage.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/locator/locatorsettingspage.cpp b/src/plugins/coreplugin/locator/locatorsettingspage.cpp index 9940680aa2..0193a791c3 100644 --- a/src/plugins/coreplugin/locator/locatorsettingspage.cpp +++ b/src/plugins/coreplugin/locator/locatorsettingspage.cpp @@ -85,7 +85,7 @@ QVariant FilterItem::data(int column, int role) const return m_filter->shortcutString(); break; 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; break; default: @@ -102,7 +102,7 @@ Qt::ItemFlags FilterItem::flags(int column) const if (column == FilterPrefix) return Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable; if (column == FilterIncludedByDefault) - return Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsUserCheckable; + return Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable; return Qt::ItemIsSelectable | Qt::ItemIsEnabled; } |