forked from qt-creator/qt-creator
Debugger: Improve configuration error reporting.
- Make showWarningWithOptions actually show the details. - Show errors from multiple engines as separate messages. - Remove 'enabled' option from CDB (handled by toolchain config now). - Show ABI as tooltip in debbugger toolchain chooser.
This commit is contained in:
@@ -1386,7 +1386,7 @@ bool MainWindow::showWarningWithOptions(const QString &title,
|
|||||||
parent = this;
|
parent = this;
|
||||||
QMessageBox msgBox(QMessageBox::Warning, title, text,
|
QMessageBox msgBox(QMessageBox::Warning, title, text,
|
||||||
QMessageBox::Ok, parent);
|
QMessageBox::Ok, parent);
|
||||||
if (details.isEmpty())
|
if (!details.isEmpty())
|
||||||
msgBox.setDetailedText(details);
|
msgBox.setDetailedText(details);
|
||||||
QAbstractButton *settingsButton = 0;
|
QAbstractButton *settingsButton = 0;
|
||||||
if (!settingsId.isEmpty() || !settingsCategory.isEmpty())
|
if (!settingsId.isEmpty() || !settingsCategory.isEmpty())
|
||||||
|
@@ -337,34 +337,34 @@ bool checkCdbConfiguration(const DebuggerStartParameters &sp, ConfigurationCheck
|
|||||||
{
|
{
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
if (!isCdbEngineEnabled()) {
|
if (!isCdbEngineEnabled()) {
|
||||||
check->errorMessage = CdbEngine::tr("The CDB debug engine required for %1 is currently disabled.").
|
check->errorDetails.push_back(CdbEngine::tr("The CDB debug engine required for %1 is currently disabled.").
|
||||||
arg(sp.toolChainAbi.toString());
|
arg(sp.toolChainAbi.toString()));
|
||||||
check->settingsCategory = QLatin1String(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY);
|
check->settingsCategory = QLatin1String(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY);
|
||||||
check->settingsPage = CdbOptionsPage::settingsId();
|
check->settingsPage = CdbOptionsPage::settingsId();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debuggerCore()->debuggerForAbi(sp.toolChainAbi, CdbEngineType).isEmpty()) {
|
if (debuggerCore()->debuggerForAbi(sp.toolChainAbi, CdbEngineType).isEmpty()) {
|
||||||
check->errorMessage = msgNoCdbBinaryForToolChain(sp.toolChainAbi);
|
check->errorDetails.push_back(msgNoCdbBinaryForToolChain(sp.toolChainAbi));
|
||||||
check->settingsCategory = QLatin1String(ProjectExplorer::Constants::TOOLCHAIN_SETTINGS_CATEGORY);
|
check->settingsCategory = QLatin1String(ProjectExplorer::Constants::TOOLCHAIN_SETTINGS_CATEGORY);
|
||||||
check->settingsPage = QLatin1String(ProjectExplorer::Constants::TOOLCHAIN_SETTINGS_CATEGORY);
|
check->settingsPage = QLatin1String(ProjectExplorer::Constants::TOOLCHAIN_SETTINGS_CATEGORY);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!validMode(sp.startMode)) {
|
if (!validMode(sp.startMode)) {
|
||||||
check->errorMessage = CdbEngine::tr("The CDB engine does not support start mode %1.").arg(sp.startMode);
|
check->errorDetails.push_back(CdbEngine::tr("The CDB engine does not support start mode %1.").arg(sp.startMode));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sp.toolChainAbi.binaryFormat() != Abi::PEFormat || sp.toolChainAbi.os() != Abi::WindowsOS) {
|
if (sp.toolChainAbi.binaryFormat() != Abi::PEFormat || sp.toolChainAbi.os() != Abi::WindowsOS) {
|
||||||
check->errorMessage = CdbEngine::tr("The CDB debug engine does not support the %1 ABI.").
|
check->errorDetails.push_back(CdbEngine::tr("The CDB debug engine does not support the %1 ABI.").
|
||||||
arg(sp.toolChainAbi.toString());
|
arg(sp.toolChainAbi.toString()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
Q_UNUSED(sp);
|
Q_UNUSED(sp);
|
||||||
check->errorMessage = QString::fromLatin1("Unsupported debug mode");
|
check->errorDetails.push_back(QString::fromLatin1("Unsupported debug mode"));
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -36,7 +36,6 @@
|
|||||||
#include <QtCore/QSettings>
|
#include <QtCore/QSettings>
|
||||||
|
|
||||||
static const char settingsGroupC[] = "CDB2";
|
static const char settingsGroupC[] = "CDB2";
|
||||||
static const char enabledKeyC[] = "Enabled";
|
|
||||||
static const char symbolPathsKeyC[] = "SymbolPaths";
|
static const char symbolPathsKeyC[] = "SymbolPaths";
|
||||||
static const char sourcePathsKeyC[] = "SourcePaths";
|
static const char sourcePathsKeyC[] = "SourcePaths";
|
||||||
static const char breakEventKeyC[] = "BreakEvent";
|
static const char breakEventKeyC[] = "BreakEvent";
|
||||||
@@ -45,7 +44,7 @@ static const char additionalArgumentsKeyC[] = "AdditionalArguments";
|
|||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
CdbOptions::CdbOptions() : enabled(false)
|
CdbOptions::CdbOptions()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,7 +55,6 @@ QString CdbOptions::settingsGroup()
|
|||||||
|
|
||||||
void CdbOptions::clear()
|
void CdbOptions::clear()
|
||||||
{
|
{
|
||||||
enabled = false;
|
|
||||||
symbolPaths.clear();
|
symbolPaths.clear();
|
||||||
sourcePaths.clear();
|
sourcePaths.clear();
|
||||||
}
|
}
|
||||||
@@ -70,7 +68,6 @@ void CdbOptions::fromSettings(QSettings *s)
|
|||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
const QString keyRoot = QLatin1String(settingsGroupC) + QLatin1Char('/');
|
const QString keyRoot = QLatin1String(settingsGroupC) + QLatin1Char('/');
|
||||||
enabled = s->value(keyRoot + QLatin1String(enabledKeyC), QVariant(false)).toBool();
|
|
||||||
additionalArguments = s->value(keyRoot + QLatin1String(additionalArgumentsKeyC), QString()).toString();
|
additionalArguments = s->value(keyRoot + QLatin1String(additionalArgumentsKeyC), QString()).toString();
|
||||||
symbolPaths = s->value(keyRoot + QLatin1String(symbolPathsKeyC), QStringList()).toStringList();
|
symbolPaths = s->value(keyRoot + QLatin1String(symbolPathsKeyC), QStringList()).toStringList();
|
||||||
sourcePaths = s->value(keyRoot + QLatin1String(sourcePathsKeyC), QStringList()).toStringList();
|
sourcePaths = s->value(keyRoot + QLatin1String(sourcePathsKeyC), QStringList()).toStringList();
|
||||||
@@ -80,7 +77,6 @@ void CdbOptions::fromSettings(QSettings *s)
|
|||||||
void CdbOptions::toSettings(QSettings *s) const
|
void CdbOptions::toSettings(QSettings *s) const
|
||||||
{
|
{
|
||||||
s->beginGroup(QLatin1String(settingsGroupC));
|
s->beginGroup(QLatin1String(settingsGroupC));
|
||||||
s->setValue(QLatin1String(enabledKeyC), enabled);
|
|
||||||
s->setValue(QLatin1String(symbolPathsKeyC), symbolPaths);
|
s->setValue(QLatin1String(symbolPathsKeyC), symbolPaths);
|
||||||
s->setValue(QLatin1String(sourcePathsKeyC), sourcePaths);
|
s->setValue(QLatin1String(sourcePathsKeyC), sourcePaths);
|
||||||
s->setValue(QLatin1String(breakEventKeyC), breakEvents);
|
s->setValue(QLatin1String(breakEventKeyC), breakEvents);
|
||||||
@@ -90,13 +86,11 @@ void CdbOptions::toSettings(QSettings *s) const
|
|||||||
|
|
||||||
bool CdbOptions::equals(const CdbOptions &rhs) const
|
bool CdbOptions::equals(const CdbOptions &rhs) const
|
||||||
{
|
{
|
||||||
return enabled == rhs.enabled
|
return additionalArguments == rhs.additionalArguments
|
||||||
&& additionalArguments == rhs.additionalArguments
|
|
||||||
&& symbolPaths == rhs.symbolPaths
|
&& symbolPaths == rhs.symbolPaths
|
||||||
&& sourcePaths == rhs.sourcePaths
|
&& sourcePaths == rhs.sourcePaths
|
||||||
&& breakEvents == rhs.breakEvents;
|
&& breakEvents == rhs.breakEvents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Debugger
|
} // namespace Debugger
|
||||||
|
@@ -48,10 +48,10 @@ struct CdbOptions
|
|||||||
public:
|
public:
|
||||||
CdbOptions();
|
CdbOptions();
|
||||||
|
|
||||||
bool isValid() const { return enabled; }
|
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
|
bool isValid() { return true; }
|
||||||
|
|
||||||
void fromSettings(QSettings *s); // Writes parameters on first-time autodetect
|
void fromSettings(QSettings *s); // Writes parameters on first-time autodetect
|
||||||
void toSettings(QSettings *s) const;
|
void toSettings(QSettings *s) const;
|
||||||
|
|
||||||
@@ -60,7 +60,6 @@ public:
|
|||||||
static QString settingsGroup();
|
static QString settingsGroup();
|
||||||
static QStringList oldEngineSymbolPaths(const QSettings *s);
|
static QStringList oldEngineSymbolPaths(const QSettings *s);
|
||||||
|
|
||||||
bool enabled;
|
|
||||||
QString additionalArguments;
|
QString additionalArguments;
|
||||||
QStringList symbolPaths;
|
QStringList symbolPaths;
|
||||||
QStringList sourcePaths;
|
QStringList sourcePaths;
|
||||||
|
@@ -172,7 +172,6 @@ CdbOptionsPageWidget::CdbOptionsPageWidget(QWidget *parent) :
|
|||||||
void CdbOptionsPageWidget::setOptions(CdbOptions &o)
|
void CdbOptionsPageWidget::setOptions(CdbOptions &o)
|
||||||
{
|
{
|
||||||
m_ui.additionalArgumentsLineEdit->setText(o.additionalArguments);
|
m_ui.additionalArgumentsLineEdit->setText(o.additionalArguments);
|
||||||
m_ui.cdbPathGroupBox->setChecked(o.enabled);
|
|
||||||
setSymbolPaths(o.symbolPaths);
|
setSymbolPaths(o.symbolPaths);
|
||||||
m_ui.sourcePathListEditor->setPathList(o.sourcePaths);
|
m_ui.sourcePathListEditor->setPathList(o.sourcePaths);
|
||||||
m_breakEventWidget->setBreakEvents(o.breakEvents);
|
m_breakEventWidget->setBreakEvents(o.breakEvents);
|
||||||
@@ -182,7 +181,6 @@ CdbOptions CdbOptionsPageWidget::options() const
|
|||||||
{
|
{
|
||||||
CdbOptions rc;
|
CdbOptions rc;
|
||||||
rc.additionalArguments = m_ui.additionalArgumentsLineEdit->text().trimmed();
|
rc.additionalArguments = m_ui.additionalArgumentsLineEdit->text().trimmed();
|
||||||
rc.enabled = m_ui.cdbPathGroupBox->isChecked();
|
|
||||||
rc.symbolPaths = symbolPaths();
|
rc.symbolPaths = symbolPaths();
|
||||||
rc.sourcePaths = m_ui.sourcePathListEditor->pathList();
|
rc.sourcePaths = m_ui.sourcePathListEditor->pathList();
|
||||||
rc.breakEvents = m_breakEventWidget->breakEvents();
|
rc.breakEvents = m_breakEventWidget->breakEvents();
|
||||||
|
@@ -16,10 +16,13 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="cdbPathGroupBox">
|
<widget class="QGroupBox" name="cdbPathGroupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string extracomment="Placeholder">CDB</string>
|
<string extracomment="Placeholder">Startup</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
@@ -44,7 +47,7 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="pathGroupBox">
|
<widget class="QGroupBox" name="startupGroupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Debugger Paths</string>
|
<string>Debugger Paths</string>
|
||||||
</property>
|
</property>
|
||||||
|
@@ -2394,6 +2394,7 @@ void DebuggerPluginPrivate::remoteCommand(const QStringList &options,
|
|||||||
|
|
||||||
QString DebuggerPluginPrivate::debuggerForAbi(const Abi &abi, DebuggerEngineType et) const
|
QString DebuggerPluginPrivate::debuggerForAbi(const Abi &abi, DebuggerEngineType et) const
|
||||||
{
|
{
|
||||||
|
enum { debug = 0 };
|
||||||
Abi searchAbi = abi;
|
Abi searchAbi = abi;
|
||||||
// Pick the right toolchain in case cdb/gdb were started with other toolchains.
|
// Pick the right toolchain in case cdb/gdb were started with other toolchains.
|
||||||
// Also, lldb should be preferred over gdb.
|
// Also, lldb should be preferred over gdb.
|
||||||
@@ -2411,8 +2412,15 @@ QString DebuggerPluginPrivate::debuggerForAbi(const Abi &abi, DebuggerEngineType
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach (const ToolChain *tc, ToolChainManager::instance()->findToolChains(searchAbi)) {
|
if (debug)
|
||||||
const QString debugger = tc->debuggerCommand();
|
qDebug() << "debuggerForAbi" << abi.toString() << searchAbi.toString() << et;
|
||||||
|
|
||||||
|
const QList<ToolChain *> toolchains = ToolChainManager::instance()->findToolChains(searchAbi);
|
||||||
|
// Find manually configured ones first
|
||||||
|
for (int i = toolchains.size() - 1; i >= 0; i--) {
|
||||||
|
const QString debugger = toolchains.at(i)->debuggerCommand();
|
||||||
|
if (debug)
|
||||||
|
qDebug() << i << toolchains.at(i)->displayName() << debugger;
|
||||||
if (!debugger.isEmpty())
|
if (!debugger.isEmpty())
|
||||||
return debugger;
|
return debugger;
|
||||||
}
|
}
|
||||||
|
@@ -65,11 +65,14 @@
|
|||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
|
||||||
#include <QtCore/QDir>
|
#include <QtCore/QDir>
|
||||||
|
#include <QtCore/QDebug>
|
||||||
#include <QtGui/QMessageBox>
|
#include <QtGui/QMessageBox>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
using namespace Debugger::Internal;
|
using namespace Debugger::Internal;
|
||||||
|
|
||||||
|
enum { debug = 0 };
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -118,6 +121,17 @@ static const char *engineTypeName(DebuggerEngineType et)
|
|||||||
return "No engine";
|
return "No engine";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline QString engineTypeNames(const QList<DebuggerEngineType> &l)
|
||||||
|
{
|
||||||
|
QString rc;
|
||||||
|
foreach (DebuggerEngineType et, l) {
|
||||||
|
if (!rc.isEmpty())
|
||||||
|
rc.append(QLatin1Char(','));
|
||||||
|
rc += QLatin1String(engineTypeName(et));
|
||||||
|
}
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
static QString msgEngineNotAvailable(const char *engine)
|
static QString msgEngineNotAvailable(const char *engine)
|
||||||
{
|
{
|
||||||
return DebuggerPlugin::tr("The application requires the debugger engine '%1', "
|
return DebuggerPlugin::tr("The application requires the debugger engine '%1', "
|
||||||
@@ -479,7 +493,7 @@ static inline bool engineConfigurationCheck(const DebuggerStartParameters &sp,
|
|||||||
return checkCdbConfiguration(sp, check);
|
return checkCdbConfiguration(sp, check);
|
||||||
case Debugger::GdbEngineType:
|
case Debugger::GdbEngineType:
|
||||||
if (debuggerCore()->debuggerForAbi(sp.toolChainAbi, et).isEmpty()) {
|
if (debuggerCore()->debuggerForAbi(sp.toolChainAbi, et).isEmpty()) {
|
||||||
check->errorMessage = msgNoBinaryForToolChain(sp.toolChainAbi, et);
|
check->errorDetails.push_back(msgNoBinaryForToolChain(sp.toolChainAbi, et));
|
||||||
check->settingsCategory = QLatin1String(ProjectExplorer::Constants::TOOLCHAIN_SETTINGS_CATEGORY);
|
check->settingsCategory = QLatin1String(ProjectExplorer::Constants::TOOLCHAIN_SETTINGS_CATEGORY);
|
||||||
check->settingsPage = QLatin1String(ProjectExplorer::Constants::TOOLCHAIN_SETTINGS_CATEGORY);
|
check->settingsPage = QLatin1String(ProjectExplorer::Constants::TOOLCHAIN_SETTINGS_CATEGORY);
|
||||||
return false;
|
return false;
|
||||||
@@ -498,7 +512,12 @@ ConfigurationCheck::ConfigurationCheck() :
|
|||||||
|
|
||||||
ConfigurationCheck::operator bool() const
|
ConfigurationCheck::operator bool() const
|
||||||
{
|
{
|
||||||
return errorMessage.isEmpty() && masterSlaveEngineTypes.first != NoEngineType;
|
return errorMessage.isEmpty() && errorDetails.isEmpty() && masterSlaveEngineTypes.first != NoEngineType;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ConfigurationCheck::errorDetailsString() const
|
||||||
|
{
|
||||||
|
return errorDetails.join(QLatin1String("\n\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -516,6 +535,10 @@ DEBUGGER_EXPORT ConfigurationCheck checkDebugConfiguration(const DebuggerStartPa
|
|||||||
const unsigned activeLangs = debuggerCore()->activeLanguages();
|
const unsigned activeLangs = debuggerCore()->activeLanguages();
|
||||||
const bool qmlLanguage = activeLangs & QmlLanguage;
|
const bool qmlLanguage = activeLangs & QmlLanguage;
|
||||||
const bool cppLanguage = activeLangs & CppLanguage;
|
const bool cppLanguage = activeLangs & CppLanguage;
|
||||||
|
if (debug)
|
||||||
|
qDebug().nospace() << "checkDebugConfiguration " << sp.toolChainAbi.toString()
|
||||||
|
<< " Start mode=" << sp.startMode << " Executable=" << sp.executable
|
||||||
|
<< " Debugger command=" << sp.debuggerCommand;
|
||||||
// Get all applicable types.
|
// Get all applicable types.
|
||||||
QList<DebuggerEngineType> requiredTypes;
|
QList<DebuggerEngineType> requiredTypes;
|
||||||
if (qmlLanguage && !cppLanguage) {
|
if (qmlLanguage && !cppLanguage) {
|
||||||
@@ -527,6 +550,8 @@ DEBUGGER_EXPORT ConfigurationCheck checkDebugConfiguration(const DebuggerStartPa
|
|||||||
result.errorMessage = DebuggerPlugin::tr("Internal error: Unable to determine debugger engine type for this configuration");
|
result.errorMessage = DebuggerPlugin::tr("Internal error: Unable to determine debugger engine type for this configuration");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
if (debug)
|
||||||
|
qDebug() << " Required: " << engineTypeNames(requiredTypes);
|
||||||
// Filter out disables types, command line + current settings.
|
// Filter out disables types, command line + current settings.
|
||||||
unsigned cmdLineEnabledEngines = debuggerCore()->enabledEngines();
|
unsigned cmdLineEnabledEngines = debuggerCore()->enabledEngines();
|
||||||
#ifdef CDB_ENABLED
|
#ifdef CDB_ENABLED
|
||||||
@@ -548,12 +573,15 @@ DEBUGGER_EXPORT ConfigurationCheck checkDebugConfiguration(const DebuggerStartPa
|
|||||||
arg(QLatin1String(engineTypeName(usableTypes.front())));
|
arg(QLatin1String(engineTypeName(usableTypes.front())));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
if (debug)
|
||||||
|
qDebug() << " Usable engines: " << engineTypeNames(usableTypes);
|
||||||
// Configuration check: Strip off non-configured engines.
|
// Configuration check: Strip off non-configured engines.
|
||||||
while (!usableTypes.isEmpty() && !engineConfigurationCheck(sp, usableTypes.front(), &result))
|
while (!usableTypes.isEmpty() && !engineConfigurationCheck(sp, usableTypes.front(), &result))
|
||||||
usableTypes.pop_front();
|
usableTypes.pop_front();
|
||||||
|
if (debug)
|
||||||
|
qDebug() << "Configured engines: " << engineTypeNames(usableTypes);
|
||||||
if (usableTypes.isEmpty()) {
|
if (usableTypes.isEmpty()) {
|
||||||
result.errorMessage = DebuggerPlugin::tr("The debugger engine required for this configuration is not correctly configured:\n%1")
|
result.errorMessage = DebuggerPlugin::tr("The debugger engine required for this configuration is not correctly configured.");
|
||||||
.arg(result.errorMessage);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
// Anything left: Happy.
|
// Anything left: Happy.
|
||||||
@@ -563,6 +591,8 @@ DEBUGGER_EXPORT ConfigurationCheck checkDebugConfiguration(const DebuggerStartPa
|
|||||||
} else {
|
} else {
|
||||||
result.masterSlaveEngineTypes.first = usableTypes.front();
|
result.masterSlaveEngineTypes.first = usableTypes.front();
|
||||||
}
|
}
|
||||||
|
if (debug)
|
||||||
|
qDebug() << engineTypeName(result.masterSlaveEngineTypes.first) << engineTypeName(result.masterSlaveEngineTypes.second);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -690,7 +720,7 @@ DebuggerRunControl *DebuggerRunControlFactory::create
|
|||||||
if (!check) {
|
if (!check) {
|
||||||
//appendMessage(errorMessage, true);
|
//appendMessage(errorMessage, true);
|
||||||
Core::ICore::instance()->showWarningWithOptions(DebuggerRunControl::tr("Debugger"),
|
Core::ICore::instance()->showWarningWithOptions(DebuggerRunControl::tr("Debugger"),
|
||||||
check.errorMessage, QString(), check.settingsCategory, check.settingsPage);
|
check.errorMessage, check.errorDetailsString(), check.settingsCategory, check.settingsPage);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
#include <QtCore/QScopedPointer>
|
#include <QtCore/QScopedPointer>
|
||||||
#include <QtCore/QPair>
|
#include <QtCore/QPair>
|
||||||
|
#include <QtCore/QStringList>
|
||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
class Environment;
|
class Environment;
|
||||||
@@ -63,8 +64,10 @@ class DEBUGGER_EXPORT ConfigurationCheck
|
|||||||
public:
|
public:
|
||||||
ConfigurationCheck();
|
ConfigurationCheck();
|
||||||
operator bool() const;
|
operator bool() const;
|
||||||
|
QString errorDetailsString() const;
|
||||||
|
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
|
QStringList errorDetails;
|
||||||
QString settingsCategory;
|
QString settingsCategory;
|
||||||
QString settingsPage;
|
QString settingsPage;
|
||||||
QPair<DebuggerEngineType, DebuggerEngineType> masterSlaveEngineTypes;
|
QPair<DebuggerEngineType, DebuggerEngineType> masterSlaveEngineTypes;
|
||||||
|
@@ -38,6 +38,8 @@
|
|||||||
|
|
||||||
#include <QtCore/QFileInfo>
|
#include <QtCore/QFileInfo>
|
||||||
|
|
||||||
|
#include <QtGui/QtEvents>
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(ProjectExplorer::Abi)
|
Q_DECLARE_METATYPE(ProjectExplorer::Abi)
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
@@ -86,5 +88,14 @@ ProjectExplorer::Abi DebuggerToolChainComboBox::abiAt(int index) const
|
|||||||
ProjectExplorer::Abi();
|
ProjectExplorer::Abi();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DebuggerToolChainComboBox::event(QEvent *event)
|
||||||
|
{
|
||||||
|
if (event->type() == QEvent::ToolTip) {
|
||||||
|
const ProjectExplorer::Abi current = abi();
|
||||||
|
setToolTip(current.isValid() ? current.toString() : QString());
|
||||||
|
}
|
||||||
|
return QComboBox::event(event);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Debugger
|
} // namespace Debugger
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -55,7 +55,11 @@ public:
|
|||||||
void setAbi(const ProjectExplorer::Abi &abi);
|
void setAbi(const ProjectExplorer::Abi &abi);
|
||||||
ProjectExplorer::Abi abi() const;
|
ProjectExplorer::Abi abi() const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual bool event(QEvent *event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
ProjectExplorer::Abi abiAt(int index) const;
|
ProjectExplorer::Abi abiAt(int index) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -530,7 +530,7 @@ ProjectExplorer::RunControl* S60DeviceDebugRunControlFactory::create(ProjectExpl
|
|||||||
const Debugger::ConfigurationCheck check = Debugger::checkDebugConfiguration(startParameters);
|
const Debugger::ConfigurationCheck check = Debugger::checkDebugConfiguration(startParameters);
|
||||||
if (!check) {
|
if (!check) {
|
||||||
Core::ICore::instance()->showWarningWithOptions(tr("Debugger for Symbian Platform"),
|
Core::ICore::instance()->showWarningWithOptions(tr("Debugger for Symbian Platform"),
|
||||||
check.errorMessage, QString(), check.settingsCategory, check.settingsPage);
|
check.errorMessage, check.errorDetailsString(), check.settingsCategory, check.settingsPage);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return new S60DeviceDebugRunControl(rc, startParameters, check.masterSlaveEngineTypes);
|
return new S60DeviceDebugRunControl(rc, startParameters, check.masterSlaveEngineTypes);
|
||||||
|
Reference in New Issue
Block a user