From 6ffdda7b81381de9fac101ca91f30e31e065fced Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 11 Jul 2025 16:53:02 +0900 Subject: [PATCH] tests: Fix WITH_WEBENGINE check. Use #if, not #ifdef, to test the integer value of WITH_WEBENGINE, not just whether it's defined. Otherwise, -DWITH_WEBENGINE=OFF would not work. * tests/qml/main.cpp: Replace '#ifdef WITH_WEBENGINE' with '#if WITH_WEBENGINE'. Change-Id: Ieda8c46fa696afa1e4118acc7d4fecd4b7f9a171 --- tests/qml/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qml/main.cpp b/tests/qml/main.cpp index 4ea4096b..10183673 100644 --- a/tests/qml/main.cpp +++ b/tests/qml/main.cpp @@ -35,7 +35,7 @@ #include #include -#ifdef WITH_WEBENGINE +#if WITH_WEBENGINE #include #include #endif @@ -206,7 +206,7 @@ main(int argc, char** argv) // Allow the user to enable fatal warnings for certain tests. Utils::remove_argument(argv, argc, "--failonwarn", [&]() { qputenv("QT_FATAL_WARNINGS", "1"); }); -#ifdef WITH_WEBENGINE +#if WITH_WEBENGINE QtWebEngineQuick::initialize(); #endif QTEST_SET_MAIN_SOURCE_PATH