aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2022-06-04 00:54:12 +0200
committerFriedrich W. H. Kossebau <kossebau@kde.org>2022-06-04 00:58:36 +0200
commit6f8e9ff84b959ba763fcff18f0c519075ea1df03 (patch)
treee1651ae9b3a01cfb22ad11ec33e71b9df5f9de75
parentf4cb940b92a727019f3931ce894d8687062435ef (diff)
downloadextra-cmake-modules-6f8e9ff84b959ba763fcff18f0c519075ea1df03.tar.gz
extra-cmake-modules-6f8e9ff84b959ba763fcff18f0c519075ea1df03.tar.bz2
ECMQtDeclareLoggingCategory: drop support for Qt < 5.4
Given ECM is released tightly bundled with KF, which itself requires Qt 5.15 now, and no Linux distribution is known by repology.org which ships older Qt, but current ECM, that support is considered of no more use.
-rw-r--r--modules/ECMQtDeclareLoggingCategory.cpp.in4
-rw-r--r--tests/ECMQtDeclareLoggingCategoryTest/testmain.cpp21
2 files changed, 0 insertions, 25 deletions
diff --git a/modules/ECMQtDeclareLoggingCategory.cpp.in b/modules/ECMQtDeclareLoggingCategory.cpp.in
index 0e69ba98..46134478 100644
--- a/modules/ECMQtDeclareLoggingCategory.cpp.in
+++ b/modules/ECMQtDeclareLoggingCategory.cpp.in
@@ -3,9 +3,5 @@
#include "@HEADER_NAME@"
@OPEN_NAMESPACES@
-#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
Q_LOGGING_CATEGORY(@IDENTIFIER@, "@ARG_CATEGORY_NAME@", Qt@ARG_DEFAULT_SEVERITY@Msg)
-#else
-Q_LOGGING_CATEGORY(@IDENTIFIER@, "@ARG_CATEGORY_NAME@")
-#endif
@CLOSE_NAMESPACES@
diff --git a/tests/ECMQtDeclareLoggingCategoryTest/testmain.cpp b/tests/ECMQtDeclareLoggingCategoryTest/testmain.cpp
index 79a3cd3c..f4181d11 100644
--- a/tests/ECMQtDeclareLoggingCategoryTest/testmain.cpp
+++ b/tests/ECMQtDeclareLoggingCategoryTest/testmain.cpp
@@ -28,12 +28,6 @@ int main(int argc, char **argv)
qWarning("log1 category was \"%s\", expected \"log.one\"", log1().categoryName());
success = false;
}
-#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
- if (!log1().isDebugEnabled()) {
- qWarning("log1 debug messages were not enabled");
- success = false;
- }
-#else
if (log1().isDebugEnabled()) {
qWarning("log1 debug messages were enabled");
success = false;
@@ -42,18 +36,11 @@ int main(int argc, char **argv)
qWarning("log1 warning messages were not enabled");
success = false;
}
-#endif
if (foo::bar::log2().categoryName() != QLatin1String("log.two")) {
qWarning("log2 category was \"%s\", expected \"log.two\"", foo::bar::log2().categoryName());
success = false;
}
-#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
- if (!foo::bar::log2().isDebugEnabled()) {
- qWarning("log2 debug messages were not enabled");
- success = false;
- }
-#else
if (foo::bar::log2().isDebugEnabled()) {
qWarning("log2 debug messages were enabled");
success = false;
@@ -62,18 +49,11 @@ int main(int argc, char **argv)
qWarning("log2 warning messages were not enabled");
success = false;
}
-#endif
if (log3().categoryName() != QLatin1String("three")) {
qWarning("log3 category was \"%s\", expected \"three\"", log3().categoryName());
success = false;
}
-#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
- if (!log3().isDebugEnabled()) {
- qWarning("log3 debug messages were not enabled");
- success = false;
- }
-#else
if (log3().isDebugEnabled()) {
qWarning("log3 debug messages were enabled");
success = false;
@@ -86,7 +66,6 @@ int main(int argc, char **argv)
qWarning("log3 critical messages were not enabled");
success = false;
}
-#endif
return success ? 0 : 1;
}