summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qlogging.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2016-07-16 14:49:19 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2016-07-25 22:18:49 +0000
commit25d6f312ac5b42a6bbca4d1c3c06742d97283e14 (patch)
tree59fc8c03bd872c4fe0a162dda09c6c2d9f271f2b /src/corelib/global/qlogging.cpp
parentc0aaef30b176f1be7f11bd3a7c1c7aff34491df7 (diff)
qFatal: unify the code path for aborting via std::abort
[ChangeLog][QtCore][Important behavior changes] qFatal will now use std::abort to terminate the application on all operating systems. Previously, ::abort() or ::exit(1) were called, depending on the operating system. Change-Id: I43da912cce1db3c2229568da25000ea80060eed9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qlogging.cpp')
-rw-r--r--src/corelib/global/qlogging.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 3aee15051f..a6da9567c6 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -140,6 +140,8 @@ static QT_PREPEND_NAMESPACE(qint64) qt_gettid()
#endif
#endif // !QT_BOOTSTRAPPED
+#include <cstdlib>
+
#include <stdio.h>
QT_BEGIN_NAMESPACE
@@ -1676,11 +1678,7 @@ static void qt_message_fatal(QtMsgType, const QMessageLogContext &context, const
Q_UNUSED(message);
#endif
-#if (defined(Q_OS_UNIX) || defined(Q_CC_MINGW))
- abort(); // trap; generates core dump
-#else
- exit(1); // goodbye cruel world
-#endif
+ std::abort();
}