From b38002518e19637ffdbb76bd108a73319fbbabb2 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Fri, 2 Feb 2024 08:28:06 +0100 Subject: [PATCH] Fix -Wdeprecated-anon-enum-enum-conversion issue in cocoa plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Noticed when building with -c++std c++20 for macOS. Lots more warnings in general but this one was an error. Change-Id: I8dd9ae33f23dd77b2ec619b7357f50b97e3ed8ef Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/cocoa/qnsview_complextext.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/cocoa/qnsview_complextext.mm b/src/plugins/platforms/cocoa/qnsview_complextext.mm index 2db7f8cad54..d7f8f4baf09 100644 --- a/src/plugins/platforms/cocoa/qnsview_complextext.mm +++ b/src/plugins/platforms/cocoa/qnsview_complextext.mm @@ -130,8 +130,8 @@ newlineEvent.key = isEnter ? Qt::Key_Enter : Qt::Key_Return; newlineEvent.text = isEnter ? QLatin1Char(kEnterCharCode) : QLatin1Char(kReturnCharCode); - newlineEvent.nativeVirtualKey = isEnter ? kVK_ANSI_KeypadEnter - : kVK_Return; + newlineEvent.nativeVirtualKey = isEnter ? quint32(kVK_ANSI_KeypadEnter) + : quint32(kVK_Return); qCDebug(lcQpaKeys) << "Inserting newline via" << newlineEvent; newlineEvent.sendWindowSystemEvent(m_platformWindow->window());