diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 908155e8b5..9ab12c5c68 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -1497,7 +1497,7 @@ void TestMethods::invokeTests(QObject *testObject) const QTestResult::setCurrentTestFunction(nullptr); } -#if defined(Q_OS_UNIX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_WASM) class FatalSignalHandler { public: @@ -1897,7 +1897,7 @@ int QTest::qRun() } else #endif { -#if defined(Q_OS_UNIX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_WASM) QScopedPointer handler; if (!noCrashHandler) handler.reset(new FatalSignalHandler);