From 81b5aa792f84747962cb05e0cf11708e4466bf30 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Tue, 28 Mar 2017 11:18:13 +0200 Subject: QCocoaWindow - fix a compilation error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clang does not like Q_FALLTHROUGH in 'default' label, the diagnostics is: 'fallthrough annotation does not directly precede switch label'. Accodring to their docs: "The fallthrough (or clang::fallthrough) attribute is used to annotate intentional fall-through between switch labels. It can only be applied to a null statement placed at a point of execution between any statement and the next switch label." - obviously, there is no 'next switch label' in our case. Change-Id: Ia7dba4cb965a85d229d44b04b69633a8f07d4a0c Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/cocoa/qcocoawindow.mm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index f6606745f1..989adcc5b0 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -1867,8 +1867,7 @@ void QCocoaWindow::applyWindowState(Qt::WindowState newState) // the new state. return; } - default: - Q_FALLTHROUGH(); + default:; } // Then we apply the new state if needed @@ -1886,12 +1885,8 @@ void QCocoaWindow::applyWindowState(Qt::WindowState newState) [m_nsWindow miniaturize:sender]; break; case Qt::WindowNoState: - switch (windowState()) { - case Qt::WindowMaximized: + if (windowState() == Qt::WindowMaximized) toggleMaximized(); - default: - Q_FALLTHROUGH(); - } break; default: Q_UNREACHABLE(); -- cgit v1.2.3