summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2017-03-28 11:18:13 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2017-03-28 11:14:37 +0000
commit81b5aa792f84747962cb05e0cf11708e4466bf30 (patch)
treec4e78af5166a1ec0e5e8edb0e402bb56853b34d5
parent5d3b27f5210c0bac16e1bca7aacab39444556392 (diff)
QCocoaWindow - fix a compilation error
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ø <tor.arne.vestbo@qt.io>
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm9
1 files 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();