Commit b0e7368d authored by hjk's avatar hjk
Browse files

Debugger: Mark bad debuggger entries with an error icon



Change-Id: If3f7ab4ea015be6f580f748f9d0ee19c608a0239
Reviewed-by: default avatarNiels Weber <niels.weber@theqtcompany.com>
parent b932a61d
......@@ -202,6 +202,18 @@ QStringList DebuggerItem::abiNames() const
return list;
}
bool DebuggerItem::isGood() const
{
return m_engineType != NoEngineType;
}
QString DebuggerItem::validityMessage() const
{
if (m_engineType == NoEngineType)
return DebuggerOptionsPage::tr("Could not determine debugger type");
return QString();
}
bool DebuggerItem::operator==(const DebuggerItem &other) const
{
return m_id == other.m_id
......
......@@ -98,6 +98,9 @@ public:
QStringList abiNames() const;
bool isGood() const;
QString validityMessage() const;
bool operator==(const DebuggerItem &other) const;
bool operator!=(const DebuggerItem &other) const { return !operator==(other); }
......
......@@ -32,6 +32,8 @@
#include "debuggeritemmanager.h"
#include "debuggeritem.h"
#include <coreplugin/coreconstants.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/detailswidget.h>
......@@ -68,6 +70,8 @@ public:
QVariant data(int column, int role) const
{
static QIcon errorIcon(QString::fromLatin1(Core::Constants::ICON_ERROR));
switch (role) {
case Qt::DisplayRole:
switch (column) {
......@@ -81,6 +85,13 @@ public:
font.setBold(m_changed);
return font;
}
case Qt::DecorationRole: {
if (column == 0 && !m_item.isGood())
return errorIcon;
}
case Qt::ToolTipRole: {
return m_item.validityMessage();
}
}
return QVariant();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment