Commit 12445a05 authored by Kai Koehne's avatar Kai Koehne

Fix QT_VERSION checks in logging.h

0x520000 is minor version 20. Use QT_VERSION_CHECK to avoid such
stupid errors.

Change-Id: I4408c0796b015f509ca9cfa8535dfdaf1603acae
Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@digia.com>
parent e9c5e60d
......@@ -31,7 +31,7 @@
#include <qglobal.h>
#if QT_VERSION < 0x052000
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
//
// Qt < 5.2 didn't feature categorized logging:
......@@ -67,7 +67,7 @@ private:
return category; \
}
#if QT_VERSION > 0x050000
#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
//
// Qt 5.0, 5.1 do have already support for categories in QMessageLogger
......@@ -100,13 +100,13 @@ private:
qCritical(__VA_ARGS__)
# endif // QT_VERSION > 0x050000
# endif // QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
#else // QT_VERSION >= 0x052000
#else // QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
#include <QLoggingCategory>
#if QT_VERSION < 0x053000
#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
// printf style for qCDebug was only added in Qt 5.3
......@@ -124,6 +124,6 @@ private:
for (bool q_category_enabled = category().isCriticalEnabled(); q_category_enabled; q_category_enabled = false) \
QMessageLogger(__FILE__, __LINE__, Q_FUNC_INFO, category().categoryName()).critical(__VA_ARGS__)
#endif // QT_VERSION < 0x053000
#endif // QT_VERSION < 0x052000
#endif // QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
#endif // QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
#endif // LOGGING_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment