From 5402b8912cbebc4ce856c40c7b2774ace9186823 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Thu, 23 May 2013 16:25:12 +0200 Subject: [PATCH] CrashHandler: Opt-in instead of Opt-out Enable the crash handler by defining the environment variable QTC_USE_CRASH_HANDLER=1 (evaluated on start up). Change-Id: Ib7f9fa016ab24a15082fbd90fd334bd4f2b17234 Reviewed-by: Eike Ziller Reviewed-by: Christian Kandeler --- src/tools/qtcreatorcrashhandler/crashhandlerdialog.cpp | 6 ++---- src/tools/qtcreatorcrashhandler/crashhandlersetup.cpp | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/tools/qtcreatorcrashhandler/crashhandlerdialog.cpp b/src/tools/qtcreatorcrashhandler/crashhandlerdialog.cpp index 77654975ad9..90b131f3139 100644 --- a/src/tools/qtcreatorcrashhandler/crashhandlerdialog.cpp +++ b/src/tools/qtcreatorcrashhandler/crashhandlerdialog.cpp @@ -127,10 +127,8 @@ void CrashHandlerDialog::setApplicationInfo(const QString &signalName) 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.

" - "

Hint: Deactivate this Crash Handler by adding QTC_NO_CRASH_HANDLER=1
" - "to the environment (evaluated on startup of %3).

") - .arg(title, QLatin1String(URL_BUGTRACKER), ideName); + "

Please file a bug report with the debug information provided below.

") + .arg(title, QLatin1String(URL_BUGTRACKER)); m_ui->introLabel->setText(introLabelContents); setWindowTitle(title); diff --git a/src/tools/qtcreatorcrashhandler/crashhandlersetup.cpp b/src/tools/qtcreatorcrashhandler/crashhandlersetup.cpp index a9ced3867d1..0694ae8e4de 100644 --- a/src/tools/qtcreatorcrashhandler/crashhandlersetup.cpp +++ b/src/tools/qtcreatorcrashhandler/crashhandlersetup.cpp @@ -38,7 +38,6 @@ #ifdef BUILD_CRASH_HANDLER #include -#include #include #include @@ -83,7 +82,7 @@ extern "C" void signalHandler(int signal) void setupCrashHandler() { #ifdef BUILD_CRASH_HANDLER - if (!qgetenv("QTC_NO_CRASH_HANDLER").isEmpty()) + if (qgetenv("QTC_USE_CRASH_HANDLER").isEmpty()) return; const QString crashHandlerPath = qApp->applicationDirPath()