summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/kit.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-06-11 09:37:23 +0200
committerhjk <hjk@qt.io>2019-06-12 05:51:34 +0000
commit504e0140bb99ea80ad06b797d4567c54e9ad26fe (patch)
tree0e466c0669ce5ab02ae37c9722e4ea48b9c4a338 /src/plugins/projectexplorer/kit.cpp
parent9d39e68173a7d2d19e473e907a519fea42e3784a (diff)
downloadqt-creator-504e0140bb99ea80ad06b797d4567c54e9ad26fe.tar.gz
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 <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/kit.cpp')
-rw-r--r--src/plugins/projectexplorer/kit.cpp15
1 files changed, 15 insertions, 0 deletions
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 <utils/optional.h>
#include <utils/qtcassert.h>
#include <utils/stringutils.h>
+#include <utils/utilsicons.h>
#include <QApplication>
#include <QFileInfo>
@@ -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;