From 5e4bfcea8cf62cded326d385acd47528c1974b09 Mon Sep 17 00:00:00 2001 From: Shane Synan Date: Sun, 17 Jun 2018 14:30:33 -0500 Subject: [PATCH] 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. --- src/uisupport/uistyle.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.20.1