[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: Fix WITH_WEBENGINE check.
From: |
Maxim Cournoyer |
Subject: |
[PATCH] tests: Fix WITH_WEBENGINE check. |
Date: |
Thu, 28 Mar 2024 12:29:54 -0400 |
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'.
---
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 2fbecebe..8cb3de69 100644
--- a/tests/qml/main.cpp
+++ b/tests/qml/main.cpp
@@ -35,7 +35,7 @@
#include <QtQuickTest/quicktest.h>
#include <QSignalSpy>
-#ifdef WITH_WEBENGINE
+#if WITH_WEBENGINE
#include <QtWebEngineCore>
#include <QtWebEngineQuick>
#endif
@@ -192,7 +192,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
base-commit: b88627d125b7d217a46f76f62edf4852bcffa36b
--
2.41.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] tests: Fix WITH_WEBENGINE check.,
Maxim Cournoyer <=