forked from qt-creator/qt-creator
Get rid of ifdefs for crash handler in main.cpp.
Adapt the *.pro and *.qbp files to build unconditionally since the ifdefs are already inlined in the functions. Change-Id: I492f39600222a6174d4e16546bfa5a289965e8cb Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
This commit is contained in:
@@ -162,7 +162,9 @@ Project {
|
|||||||
"src/shared/qtsingleapplication/qtsingleapplication.cpp",
|
"src/shared/qtsingleapplication/qtsingleapplication.cpp",
|
||||||
"src/shared/qtsingleapplication/qtlocalpeer.h",
|
"src/shared/qtsingleapplication/qtlocalpeer.h",
|
||||||
"src/shared/qtsingleapplication/qtlocalpeer.cpp",
|
"src/shared/qtsingleapplication/qtlocalpeer.cpp",
|
||||||
"src/shared/qtlockedfile/qtlockedfile.cpp"
|
"src/shared/qtlockedfile/qtlockedfile.cpp",
|
||||||
|
"src/tools/qtcreatorcrashhandler/crashhandlersetup.cpp",
|
||||||
|
"src/tools/qtcreatorcrashhandler/crashhandlersetup.h"
|
||||||
]
|
]
|
||||||
|
|
||||||
Group {
|
Group {
|
||||||
@@ -179,14 +181,6 @@ Project {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
Group {
|
|
||||||
condition: qbs.targetOS == "linux"
|
|
||||||
files: [
|
|
||||||
"src/tools/qtcreatorcrashhandler/crashhandlersetup.cpp",
|
|
||||||
"src/tools/qtcreatorcrashhandler/crashhandlersetup.h"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
Group {
|
Group {
|
||||||
condition: qbs.targetOS == "windows"
|
condition: qbs.targetOS == "windows"
|
||||||
files: [
|
files: [
|
||||||
|
|||||||
@@ -5,14 +5,8 @@ TEMPLATE = app
|
|||||||
TARGET = $$IDE_APP_TARGET
|
TARGET = $$IDE_APP_TARGET
|
||||||
DESTDIR = $$IDE_APP_PATH
|
DESTDIR = $$IDE_APP_PATH
|
||||||
|
|
||||||
SOURCES += main.cpp
|
HEADERS += ../tools/qtcreatorcrashhandler/crashhandlersetup.h
|
||||||
linux-* {
|
SOURCES += main.cpp ../tools/qtcreatorcrashhandler/crashhandlersetup.cpp
|
||||||
# Build only in debug mode.
|
|
||||||
debug_and_release|CONFIG(debug, debug|release) {
|
|
||||||
HEADERS += ../tools/qtcreatorcrashhandler/crashhandlersetup.h
|
|
||||||
SOURCES += ../tools/qtcreatorcrashhandler/crashhandlersetup.cpp
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
include(../rpath.pri)
|
include(../rpath.pri)
|
||||||
|
|
||||||
|
|||||||
@@ -229,9 +229,7 @@ int main(int argc, char **argv)
|
|||||||
const int threadCount = QThreadPool::globalInstance()->maxThreadCount();
|
const int threadCount = QThreadPool::globalInstance()->maxThreadCount();
|
||||||
QThreadPool::globalInstance()->setMaxThreadCount(qMax(4, 2 * threadCount));
|
QThreadPool::globalInstance()->setMaxThreadCount(qMax(4, 2 * threadCount));
|
||||||
|
|
||||||
#if defined(Q_OS_LINUX) && !defined(QT_NO_DEBUG)
|
|
||||||
setupCrashHandler(); // Display a backtrace once a serious signal is delivered.
|
setupCrashHandler(); // Display a backtrace once a serious signal is delivered.
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ENABLE_QT_BREAKPAD
|
#ifdef ENABLE_QT_BREAKPAD
|
||||||
QtSystemExceptionHandler systemExceptionHandler;
|
QtSystemExceptionHandler systemExceptionHandler;
|
||||||
@@ -438,8 +436,6 @@ int main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
const int r = app.exec();
|
const int r = app.exec();
|
||||||
#if defined(Q_OS_LINUX) && !defined(QT_NO_DEBUG)
|
|
||||||
cleanupCrashHandler();
|
cleanupCrashHandler();
|
||||||
#endif
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user