summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/global
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-12-21 13:56:17 -0300
committerThiago Macieira <thiago.macieira@intel.com>2022-12-21 23:22:59 -0300
commit5aa66034c2c81e62bdd159e32a3226f8971089a7 (patch)
tree0062ca998cd8d3e705c7fcfa22bfc714d3fdf8c7 /tests/auto/corelib/global
parentc9cf4037cafe22aa20cfea6efe1c6a4c7211d21f (diff)
tst_qlogging: fix preprocessor directives
Reorganize them and fix the comment. Pick-to: 6.4 6.5 Change-Id: I69ecc04064514f939896fffd1732dd57203cb21f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/corelib/global')
-rw-r--r--tests/auto/corelib/global/qlogging/tst_qlogging.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
index 1b80287250..efe8d8b308 100644
--- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
+++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
@@ -716,17 +716,17 @@ void tst_qmessagehandler::qMessagePattern_data()
#define BACKTRACE_HELPER_NAME "qlogging_helper"
-#ifdef __GLIBC__
#ifdef QT_NAMESPACE
#define QT_NAMESPACE_STR QT_STRINGIFY(QT_NAMESPACE::)
#else
#define QT_NAMESPACE_STR ""
#endif
-#if QT_CONFIG(static)
+#ifdef __GLIBC__
+# if QT_CONFIG(static)
QSKIP("These test cases don't work with static Qt builds");
-#else
-#ifndef QT_NO_DEBUG
+# else
+# ifndef QT_NO_DEBUG
QList<QByteArray> expectedBacktrace = {
// MyClass::qt_static_metacall is explicitly marked as hidden in the
// Q_OBJECT macro hence the ?helper? frame
@@ -740,14 +740,13 @@ void tst_qmessagehandler::qMessagePattern_data()
"|" QT_NAMESPACE_STR "QMetaObject::invokeMethodImpl] from_a_function 34"
};
QTest::newRow("backtrace") << "[%{backtrace}] %{message}" << true << expectedBacktrace;
-#endif
+# endif
QTest::newRow("backtrace depth,separator") << "[%{backtrace depth=2 separator=\"\n\"}] %{message}" << true << (QList<QByteArray>()
<< "[MyClass::myFunction\nMyClass::mySlot1] from_a_function 34"
<< "[T::T\n");
-#endif // #if !QT_CONFIG(process)
+# endif // #if !QT_CONFIG(static)
#endif // #ifdef __GLIBC__
-
}