diff options
author | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-06-10 16:14:51 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-06-10 14:24:19 +0000 |
commit | 973fabc78246ba38dbf04bccca133bef039de62b (patch) | |
tree | ef5428cbc7d5362ea86d0cb98c01f6f82cbbb6a1 /src/app | |
parent | 9554ef909f8d62038ab68f77bc5e91456e62fc96 (diff) | |
download | qt-creator-973fabc78246ba38dbf04bccca133bef039de62b.tar.gz |
Use RAII for crash handler setup/cleanup
Change-Id: I71205c45ee01eeaf1d2c991ec625f6a66be1e851
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/main.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/app/main.cpp b/src/app/main.cpp index ce7ed2dcb9..d2fa179bdd 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -317,7 +317,7 @@ int main(int argc, char **argv) const int threadCount = QThreadPool::globalInstance()->maxThreadCount(); QThreadPool::globalInstance()->setMaxThreadCount(qMax(4, 2 * threadCount)); - setupCrashHandler(); // Display a backtrace once a serious signal is delivered. + CrashHandlerSetup setupCrashHandler; // Display a backtrace once a serious signal is delivered. #ifdef ENABLE_QT_BREAKPAD QtSystemExceptionHandler systemExceptionHandler; @@ -518,7 +518,5 @@ int main(int argc, char **argv) // shutdown plugin manager on the exit QObject::connect(&app, SIGNAL(aboutToQuit()), &pluginManager, SLOT(shutdown())); - const int r = app.exec(); - cleanupCrashHandler(); - return r; + return app.exec(); } |