summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/testlib/qtestcase.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index f0520330af..10bf200f4f 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -2442,6 +2442,9 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
#ifdef QTESTLIB_USE_VALGRIND
if (QBenchmarkGlobalData::current->mode() == QBenchmarkGlobalData::CallgrindParentProcess) {
+ if (!qApp)
+ qFatal("QtTest: -callgrind option is not available with QTEST_APPLESS_MAIN");
+
const QStringList origAppArgs(QCoreApplication::arguments());
if (!QBenchmarkValgrindUtils::rerunThroughCallgrind(origAppArgs, callgrindChildExitCode))
return -1;