Fix build with Qt 4
ClosedPublic

Authored by fvogt on Apr 17 2018, 11:07 AM.

Details

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.

Diff Detail

Repository
R31 Breeze
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
fvogt created this revision.Apr 17 2018, 11:07 AM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 17 2018, 11:07 AM
fvogt requested review of this revision.Apr 17 2018, 11:07 AM
davidedmundson accepted this revision.Apr 17 2018, 11:16 AM
This revision is now accepted and ready to land.Apr 17 2018, 11:16 AM
This revision was automatically updated to reflect the committed changes.
zzag added a subscriber: zzag.Apr 17 2018, 11:18 AM

Oh, God, I forgot to check Q_CC_CLANG in Qt 4.

Also, that's weird Q_CC_GNU has no value in Qt 4.. http://doc.qt.io/archives/qt-4.8/qtglobal.html#Q_CC_GNU