summaryrefslogtreecommitdiff
path: root/src/plugins/clangtools
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/clangtools')
-rw-r--r--src/plugins/clangtools/clangtoolsdiagnosticmodel.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/plugins/clangtools/clangtoolsdiagnosticmodel.cpp b/src/plugins/clangtools/clangtoolsdiagnosticmodel.cpp
index 1f1dba4039..1834ef02d7 100644
--- a/src/plugins/clangtools/clangtoolsdiagnosticmodel.cpp
+++ b/src/plugins/clangtools/clangtoolsdiagnosticmodel.cpp
@@ -221,9 +221,15 @@ DiagnosticItem::DiagnosticItem(const Diagnostic &diag, const OnCheckedFixit &onC
Qt::ItemFlags DiagnosticItem::flags(int column) const
{
- if (column == DiagnosticView::FixItColumn && m_diagnostic.hasFixits)
- return TreeItem::flags(column) | Qt::ItemIsUserCheckable;
- return TreeItem::flags(column);
+ const Qt::ItemFlags itemFlags = TreeItem::flags(column);
+ if (column == DiagnosticView::FixItColumn) {
+ if (m_diagnostic.hasFixits)
+ return itemFlags | Qt::ItemIsUserCheckable;
+ else
+ return itemFlags & ~Qt::ItemIsEnabled;
+ }
+
+ return itemFlags;
}
static QVariant locationData(int role, const Debugger::DiagnosticLocation &location)