From 504e0140bb99ea80ad06b797d4567c54e9ad26fe Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 11 Jun 2019 09:37:23 +0200 Subject: ProjectExplorer: Let the KitChooser optionally show icons There are cases in the debugger where it's more convenient or with the current state of Abi matching even needed to use non-matching kits. Still, visual hints are helpful. Change-Id: I66ca89cbd1664f43864873e3b4d81a9c8e1b36fa Reviewed-by: David Schulz --- src/plugins/projectexplorer/kit.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/plugins/projectexplorer/kit.cpp') diff --git a/src/plugins/projectexplorer/kit.cpp b/src/plugins/projectexplorer/kit.cpp index 7f58bf4a13..88e2e65ada 100644 --- a/src/plugins/projectexplorer/kit.cpp +++ b/src/plugins/projectexplorer/kit.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -400,6 +401,20 @@ QIcon Kit::icon() const return d->m_cachedIcon; } +QIcon Kit::displayIcon() const +{ + QIcon result = icon(); + if (hasWarning()) { + static const QIcon warningIcon(Utils::Icons::WARNING.icon()); + result = warningIcon; + } + if (!isValid()) { + static const QIcon errorIcon(Utils::Icons::CRITICAL.icon()); + result = errorIcon; + } + return result; +} + FilePath Kit::iconPath() const { return d->m_iconPath; -- cgit v1.2.1