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>
bb10
Timur Pocheptsov 2017-03-28 11:18:13 +02:00
parent 5d3b27f521
commit 81b5aa792f
1 changed files with 2 additions and 7 deletions

View File

@ -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();