From: Shane Synan Date: Sun, 17 Jun 2018 19:30:33 +0000 (-0500) Subject: client: Use QT_VERSION for 'enum class' fallback X-Git-Tag: 0.13-rc1~56 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=5e4bfcea8cf62cded326d385acd47528c1974b09;hp=752237a05d424c132f51a0bba76dea84e2d72b81 client: Use QT_VERSION for 'enum class' fallback Use QT_VERSION macro for 'enum class' fallback, making it much simpler to clean up the Qt4 code once the migration happens. --- diff --git a/src/uisupport/uistyle.h b/src/uisupport/uistyle.h index a50519c9..b87e2211 100644 --- a/src/uisupport/uistyle.h +++ b/src/uisupport/uistyle.h @@ -164,14 +164,17 @@ public: }; /// Display of sender prefix modes +#if QT_VERSION >= 0x050000 + enum class SenderPrefixMode { +#else enum SenderPrefixMode { +#endif NoModes = 0, ///< Hide sender modes HighestMode = 1, ///< Show the highest active sender mode AllModes = 2 ///< Show all active sender modes }; // Do not change SenderPrefixMode numbering without also adjusting // ChatViewSettingsPage::initSenderPrefixComboBox() and chatviewsettingspage.ui "defaultValue" - // TODO Qt5: Switch to "enum class" struct Format { FormatType type;