Fix build on MacOS.

This commit is contained in:
Roman Telezhynskyi 2023-01-21 05:01:21 -08:00
parent 40cef9befb
commit 38d15cdd41
4 changed files with 14 additions and 0 deletions

View File

@ -62,7 +62,9 @@ QT_WARNING_POP
namespace
{
QT_WARNING_PUSH
#if !defined(Q_OS_MACOS) && defined(Q_CC_CLANG)
QT_WARNING_DISABLE_CLANG("-Wenum-enum-conversion")
#endif
Q_GLOBAL_STATIC_WITH_ARGS(const QKeySequence, restoreOriginShortcut, // NOLINT
(QKeySequence(Qt::ControlModifier + Qt::Key_Asterisk)))

View File

@ -1527,7 +1527,9 @@ void VPMainWindow::InitZoomToolBar()
delete m_mouseCoordinate;
QT_WARNING_PUSH
#if !defined(Q_OS_MACOS) && defined(Q_CC_CLANG)
QT_WARNING_DISABLE_CLANG("-Wenum-enum-conversion")
#endif
// connect the zoom buttons and shortcuts to the slots
QList<QKeySequence> zoomInShortcuts;

View File

@ -2894,7 +2894,9 @@ void MainWindow::ToolBarTools()
Also for me don't work Qt:CTRL and work Qt::ControlModifier.*/
QT_WARNING_PUSH
#if !defined(Q_OS_MACOS) && defined(Q_CC_CLANG)
QT_WARNING_DISABLE_CLANG("-Wenum-enum-conversion")
#endif
QList<QKeySequence> zoomInShortcuts;
zoomInShortcuts.append(QKeySequence(QKeySequence::ZoomIn));

View File

@ -44,7 +44,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::Type>(QEvent::User + CustomEventType::UndoEventType);
@ -63,7 +65,9 @@ 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::Type>(QEvent::User + CustomEventType::LiteParseEventType);
@ -81,7 +85,9 @@ 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::Type>(QEvent::User +
CustomEventType::FitBestCurrentEventType);
@ -100,7 +106,9 @@ 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::Type>(QEvent::User +
CustomEventType::WarningMessageEventType);