Don't ignore warning Wenum-enum-conversion in this place.

This commit is contained in:
Roman Telezhynskyi 2023-03-04 09:11:17 +02:00
parent 2a9fcda3a6
commit 08362980bd

View File

@ -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 // Define undo event identifier
const QEvent::Type UNDO_EVENT = static_cast<QEvent::Type>(QEvent::User + CustomEventType::UndoEventType); const QEvent::Type UNDO_EVENT =
static_cast<QEvent::Type>(QEvent::User + static_cast<int>(CustomEventType::UndoEventType));
QT_WARNING_POP
class UndoEvent : public QEvent class UndoEvent : public QEvent
{ {
@ -64,14 +58,8 @@ public:
}; };
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QT_WARNING_PUSH const QEvent::Type LITE_PARSE_EVENT =
#if !defined(Q_OS_MACOS) && defined(Q_CC_CLANG) static_cast<QEvent::Type>(QEvent::User + static_cast<int>(CustomEventType::LiteParseEventType));
QT_WARNING_DISABLE_CLANG("-Wenum-enum-conversion")
#endif
const QEvent::Type LITE_PARSE_EVENT = static_cast<QEvent::Type>(QEvent::User + CustomEventType::LiteParseEventType);
QT_WARNING_POP
class LiteParseEvent : public QEvent class LiteParseEvent : public QEvent
{ {
@ -84,15 +72,8 @@ public:
}; };
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QT_WARNING_PUSH const QEvent::Type FIT_BEST_CURRENT_EVENT =
#if !defined(Q_OS_MACOS) && defined(Q_CC_CLANG) static_cast<QEvent::Type>(QEvent::User + static_cast<int>(CustomEventType::FitBestCurrentEventType));
QT_WARNING_DISABLE_CLANG("-Wenum-enum-conversion")
#endif
const QEvent::Type FIT_BEST_CURRENT_EVENT = static_cast<QEvent::Type>(QEvent::User +
CustomEventType::FitBestCurrentEventType);
QT_WARNING_POP
class FitBestCurrentEvent : public QEvent class FitBestCurrentEvent : public QEvent
{ {
@ -105,15 +86,8 @@ public:
}; };
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QT_WARNING_PUSH const QEvent::Type WARNING_MESSAGE_EVENT =
#if !defined(Q_OS_MACOS) && defined(Q_CC_CLANG) static_cast<QEvent::Type>(QEvent::User + static_cast<int>(CustomEventType::WarningMessageEventType));
QT_WARNING_DISABLE_CLANG("-Wenum-enum-conversion")
#endif
const QEvent::Type WARNING_MESSAGE_EVENT = static_cast<QEvent::Type>(QEvent::User +
CustomEventType::WarningMessageEventType);
QT_WARNING_POP
class WarningMessageEvent : public QEvent class WarningMessageEvent : public QEvent
{ {