diff --git a/src/tools/qtcreatorcrashhandler/crashhandler.cpp b/src/tools/qtcreatorcrashhandler/crashhandler.cpp index c1046ed79c6..7521802716d 100644 --- a/src/tools/qtcreatorcrashhandler/crashhandler.cpp +++ b/src/tools/qtcreatorcrashhandler/crashhandler.cpp @@ -88,10 +88,10 @@ public: class CrashHandlerPrivate { public: - CrashHandlerPrivate(pid_t pid, CrashHandler *crashHandler) + CrashHandlerPrivate(pid_t pid, const QString &signalName, CrashHandler *crashHandler) : pid(pid), creatorInPath(Utils::Environment::systemEnvironment().searchInPath(QtCreatorExecutable)), - dialog(crashHandler) {} + dialog(crashHandler, signalName) {} const pid_t pid; const QString creatorInPath; // Backup debugger. @@ -103,8 +103,8 @@ public: QStringList restartAppEnvironment; }; -CrashHandler::CrashHandler(pid_t pid, QObject *parent) - : QObject(parent), d(new CrashHandlerPrivate(pid, this)) +CrashHandler::CrashHandler(pid_t pid, const QString &signalName, QObject *parent) + : QObject(parent), d(new CrashHandlerPrivate(pid, signalName, this)) { connect(&d->backtraceCollector, SIGNAL(error(QString)), SLOT(onError(QString))); connect(&d->backtraceCollector, SIGNAL(backtraceChunk(QString)), SLOT(onBacktraceChunk(QString))); diff --git a/src/tools/qtcreatorcrashhandler/crashhandler.h b/src/tools/qtcreatorcrashhandler/crashhandler.h index f0132b2025d..bf4c1991daa 100644 --- a/src/tools/qtcreatorcrashhandler/crashhandler.h +++ b/src/tools/qtcreatorcrashhandler/crashhandler.h @@ -43,7 +43,7 @@ class CrashHandler : public QObject { Q_OBJECT public: - explicit CrashHandler(pid_t pid, QObject *parent = 0); + explicit CrashHandler(pid_t pid, const QString &signalName, QObject *parent = 0); ~CrashHandler(); void run(); diff --git a/src/tools/qtcreatorcrashhandler/crashhandlerdialog.cpp b/src/tools/qtcreatorcrashhandler/crashhandlerdialog.cpp index 955ba6c2fb4..5d232557534 100644 --- a/src/tools/qtcreatorcrashhandler/crashhandlerdialog.cpp +++ b/src/tools/qtcreatorcrashhandler/crashhandlerdialog.cpp @@ -43,7 +43,8 @@ static const char SettingsApplication[] = "QtCreator"; static const char SettingsKeySkipWarningAbortingBacktrace[] = "CrashHandler/SkipWarningAbortingBacktrace"; -CrashHandlerDialog::CrashHandlerDialog(CrashHandler *handler, QWidget *parent) : +CrashHandlerDialog::CrashHandlerDialog(CrashHandler *handler, const QString &signalName, + QWidget *parent) : QDialog(parent), m_crashHandler(handler), m_ui(new Ui::CrashHandlerDialog) @@ -67,7 +68,7 @@ CrashHandlerDialog::CrashHandlerDialog(CrashHandler *handler, QWidget *parent) : connect(m_ui->debugAppButton, SIGNAL(clicked()), m_crashHandler, SLOT(debugApplication())); connect(m_ui->closeButton, SIGNAL(clicked()), this, SLOT(close())); - setApplicationInfo(); + setApplicationInfo(signalName); } CrashHandlerDialog::~CrashHandlerDialog() @@ -120,14 +121,16 @@ void CrashHandlerDialog::disableDebugAppButton() m_ui->debugAppButton->setDisabled(true); } -void CrashHandlerDialog::setApplicationInfo() +void CrashHandlerDialog::setApplicationInfo(const QString &signalName) { const QString ideName = QLatin1String("Qt Creator"); - const QString contents = tr( - "
%1 has closed unexpectedly.
" + const QString title = tr("%1 has closed unexpectedly (Signal \"%2\")").arg(ideName, signalName); + const QString introLabelContents = tr( + "%1.
" "Please file a bug report with the debug information provided below.
") - .arg(ideName, QLatin1String(URL_BUGTRACKER)); - m_ui->introLabel->setText(contents); + .arg(title, QLatin1String(URL_BUGTRACKER)); + m_ui->introLabel->setText(introLabelContents); + setWindowTitle(title); QString revision; #ifdef IDE_REVISION diff --git a/src/tools/qtcreatorcrashhandler/crashhandlerdialog.h b/src/tools/qtcreatorcrashhandler/crashhandlerdialog.h index 09cbd203b50..fc9ff7921ad 100644 --- a/src/tools/qtcreatorcrashhandler/crashhandlerdialog.h +++ b/src/tools/qtcreatorcrashhandler/crashhandlerdialog.h @@ -33,6 +33,7 @@ #include