forked from qt-creator/qt-creator
Debugger: Improve adapter error handling
Correctly reset state on missing Symbian gdb. Provide "settings" options. Reviewed-by: hjk <qtc-committer@nokia.com>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "debuggerdialogs.h"
|
||||
#include "debuggerconstants.h"
|
||||
|
||||
#include "ui_attachcoredialog.h"
|
||||
#include "ui_attachexternaldialog.h"
|
||||
@@ -39,6 +40,8 @@
|
||||
# include "shared/dbgwinutils.h"
|
||||
#endif
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QFile>
|
||||
@@ -49,7 +52,7 @@
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QProxyModel>
|
||||
#include <QtGui/QSortFilterProxyModel>
|
||||
|
||||
#include <QtGui/QMessageBox>
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
@@ -606,5 +609,28 @@ bool AddressDialog::isValid() const
|
||||
return ok;
|
||||
}
|
||||
|
||||
int warningWithSettings(const QString &title,
|
||||
const QString &text,
|
||||
const QString &details,
|
||||
const QString &settingsId,
|
||||
QWidget *parent)
|
||||
{
|
||||
QMessageBox msgBox(QMessageBox::Warning, title, text,
|
||||
QMessageBox::Ok, parent);
|
||||
if (details.isEmpty())
|
||||
msgBox.setDetailedText(details);
|
||||
QAbstractButton *settingsButton = 0;
|
||||
if (!settingsId.isEmpty())
|
||||
settingsButton = msgBox.addButton(QCoreApplication::translate("Debugger::MessageBox", "Settings..."),
|
||||
QMessageBox::AcceptRole);
|
||||
const int dialogCode = msgBox.exec();
|
||||
if (settingsButton && msgBox.clickedButton() == settingsButton) {
|
||||
Core::ICore::instance()->showOptionsDialog(QLatin1String(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY),
|
||||
settingsId);
|
||||
return 2;
|
||||
}
|
||||
return dialogCode;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
Reference in New Issue
Block a user