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 {