Debugger: Do configuration error checking early on.

Add a configuration checking method to the Debugger manager,
depending on toolchain, wire it to the engines.
Check that in the debugger run controls.

Add a convenience method to ICore that shows a warning
message with a "Settings" button, pointing the user
to a configuration error on a settings page.

Remove leftovers of the dumper parser.
Acked-by: con <qtc-committer@nokia.com>
This commit is contained in:
Friedemann Kleint
2009-10-08 17:23:27 +02:00
parent c6de8d457b
commit 22ab8d5662
19 changed files with 225 additions and 222 deletions

View File

@@ -28,9 +28,11 @@
**************************************************************************/
#include "trkoptions.h"
#include <utils/synchronousprocess.h>
#include <QtCore/QSettings>
#include <QtCore/QFileInfo>
#include <QtCore/QCoreApplication>
#ifdef Q_OS_WIN
# define SERIALPORT_ROOT "COM"
@@ -104,6 +106,24 @@ void TrkOptions::toSettings(QSettings *s) const
s->endGroup();
}
bool TrkOptions::check(QString *errorMessage) const
{
if (gdb.isEmpty()) {
*errorMessage = QCoreApplication::translate("TrkOptions", "No Symbian gdb executable specified.");
return false;
}
const QString expanded = Utils::SynchronousProcess::locateBinary(gdb);
if (expanded.isEmpty()) {
*errorMessage = QCoreApplication::translate("TrkOptions", "The Symbian gdb executable '%1' could not be found in the search path.").arg(gdb);
return false;
}
if (!cygwin.isEmpty() && !QFileInfo(cygwin).isDir()) {
*errorMessage = QCoreApplication::translate("TrkOptions", "The Cygwin directory '%1' does not exist.").arg(cygwin);
return false;
}
return true;
}
bool TrkOptions::equals(const TrkOptions &o) const
{
return mode == o.mode