Improved CDB autodetection.

Check for x32 as well; pop up a message box on failure.
This commit is contained in:
Friedemann Kleint
2009-05-19 16:51:33 +02:00
parent 96ea23b9c6
commit 3cae726f79
3 changed files with 19 additions and 5 deletions

View File

@@ -32,7 +32,9 @@
#include "debuggerconstants.h"
#include <coreplugin/icore.h>
#include <QtCore/QCoreApplication>
#include <QtGui/QMessageBox>
const char * const CDB_SETTINGS_ID = QT_TRANSLATE_NOOP("Debugger::Internal::CdbOptionsPageWidget", "Cdb");
@@ -70,10 +72,18 @@ CdbOptions CdbOptionsPageWidget::options() const
void CdbOptionsPageWidget::autoDetect()
{
QString path;
const bool ok = CdbOptions::autoDetectPath(&path);
QStringList checkedDirectories;
const bool ok = CdbOptions::autoDetectPath(&path, &checkedDirectories);
m_ui.cdbOptionsGroupBox->setChecked(ok);
if (ok)
if (ok) {
m_ui.pathChooser->setPath(path);
} else {
const QString msg = tr("\"Debugging Tools for Windows\" could not be found.");
const QString details = tr("Checked:\n%1").arg(checkedDirectories.join(QString(QLatin1Char('\n'))));
QMessageBox msbBox(QMessageBox::Information, tr("Autodetection"), msg, QMessageBox::Ok, this);
msbBox.setDetailedText(details);
msbBox.exec();
}
}
void CdbOptionsPageWidget::setFailureMessage(const QString &msg)