From 08362980bd3cfd0c6af390225ac5e842b54ff6dc Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 4 Mar 2023 09:11:17 +0200 Subject: [PATCH] Don't ignore warning Wenum-enum-conversion in this place. --- src/libs/vmisc/customevents.h | 42 +++++++---------------------------- 1 file changed, 8 insertions(+), 34 deletions(-) diff --git a/src/libs/vmisc/customevents.h b/src/libs/vmisc/customevents.h index 3afe0adf8..9a92fda49 100644 --- a/src/libs/vmisc/customevents.h +++ b/src/libs/vmisc/customevents.h @@ -43,15 +43,9 @@ enum CustomEventType { }; //--------------------------------------------------------------------------------------------------------------------- -QT_WARNING_PUSH -#if !defined(Q_OS_MACOS) && defined(Q_CC_CLANG) -QT_WARNING_DISABLE_CLANG("-Wenum-enum-conversion") -#endif - // Define undo event identifier -const QEvent::Type UNDO_EVENT = static_cast(QEvent::User + CustomEventType::UndoEventType); - -QT_WARNING_POP +const QEvent::Type UNDO_EVENT = + static_cast(QEvent::User + static_cast(CustomEventType::UndoEventType)); class UndoEvent : public QEvent { @@ -64,14 +58,8 @@ public: }; //--------------------------------------------------------------------------------------------------------------------- -QT_WARNING_PUSH -#if !defined(Q_OS_MACOS) && defined(Q_CC_CLANG) -QT_WARNING_DISABLE_CLANG("-Wenum-enum-conversion") -#endif - -const QEvent::Type LITE_PARSE_EVENT = static_cast(QEvent::User + CustomEventType::LiteParseEventType); - -QT_WARNING_POP +const QEvent::Type LITE_PARSE_EVENT = + static_cast(QEvent::User + static_cast(CustomEventType::LiteParseEventType)); class LiteParseEvent : public QEvent { @@ -84,15 +72,8 @@ public: }; //--------------------------------------------------------------------------------------------------------------------- -QT_WARNING_PUSH -#if !defined(Q_OS_MACOS) && defined(Q_CC_CLANG) -QT_WARNING_DISABLE_CLANG("-Wenum-enum-conversion") -#endif - -const QEvent::Type FIT_BEST_CURRENT_EVENT = static_cast(QEvent::User + - CustomEventType::FitBestCurrentEventType); - -QT_WARNING_POP +const QEvent::Type FIT_BEST_CURRENT_EVENT = + static_cast(QEvent::User + static_cast(CustomEventType::FitBestCurrentEventType)); class FitBestCurrentEvent : public QEvent { @@ -105,15 +86,8 @@ public: }; //--------------------------------------------------------------------------------------------------------------------- -QT_WARNING_PUSH -#if !defined(Q_OS_MACOS) && defined(Q_CC_CLANG) -QT_WARNING_DISABLE_CLANG("-Wenum-enum-conversion") -#endif - -const QEvent::Type WARNING_MESSAGE_EVENT = static_cast(QEvent::User + - CustomEventType::WarningMessageEventType); - -QT_WARNING_POP +const QEvent::Type WARNING_MESSAGE_EVENT = + static_cast(QEvent::User + static_cast(CustomEventType::WarningMessageEventType)); class WarningMessageEvent : public QEvent {