From f4f7b599aff53d82a61237d4e999d14d09295b0e Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Tue, 17 Apr 2018 13:06:13 +0200 Subject: [PATCH] Fix build with Qt 4 Summary: In Qt 4, the compiler detection macros have no value, so they can't be compared against. So just use the compiler-specific ones. It also makes use of the fact that undefined tokens evaluate to 0 in comparisons. Test Plan: jriddell built it with GCC 5 and 7 against Qt 4 and 5. Reviewers: #breeze, davidedmundson Reviewed By: davidedmundson Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D12277 --- kstyle/breezesplitterproxy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kstyle/breezesplitterproxy.cpp b/kstyle/breezesplitterproxy.cpp index 3079c7fc..effd74c5 100644 --- a/kstyle/breezesplitterproxy.cpp +++ b/kstyle/breezesplitterproxy.cpp @@ -38,9 +38,9 @@ #endif #endif #ifndef Q_FALLTHROUGH -#if defined(Q_CC_GNU) && Q_CC_GNU >= 700 +#if __GNUC__ >= 7 #define Q_FALLTHROUGH() __attribute__((fallthrough)) -#elif defined(Q_CC_CLANG) && Q_CC_CLANG >= 305 +#elif (__clang_major__ > 3) || (__clang_major__ == 3 && __clang_minor__ >= 5) #define Q_FALLTHROUGH() [[clang::fallthrough]] #else #define Q_FALLTHROUGH()