summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestcase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib/qtestcase.cpp')
-rw-r--r--src/testlib/qtestcase.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index a6c1502bd1..7760ab8f8c 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -259,7 +259,7 @@ static bool hasSystemCrashReporter()
#endif
}
-static void disableCoreDump()
+static void maybeDisableCoreDump()
{
#ifdef RLIMIT_CORE
bool ok = false;
@@ -273,7 +273,6 @@ static void disableCoreDump()
}
#endif
}
-Q_CONSTRUCTOR_FUNCTION(disableCoreDump);
static DebuggerProgram debugger = None;
static void prepareStackTrace()
@@ -2143,6 +2142,7 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
void QTest::qInit(QObject *testObject, int argc, char **argv)
{
initEnvironment();
+ maybeDisableCoreDump();
QBenchmarkGlobalData::current = new QBenchmarkGlobalData;
#if defined(Q_OS_MACOS)