Windows code: Add Q_FALLTHROUGH or break to unmarked fallthroughs seen by GCC 7
Rearrange code handling QtWindows::DisplayChangedEvent. Change-Id: If9f32516108fb64c4a252c84392f2fd7f1872bf1 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
parent
2087f120c3
commit
4f7be34a42
@ -925,9 +925,9 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
|
||||
return false;
|
||||
#endif
|
||||
case QtWindows::DisplayChangedEvent:
|
||||
return d->m_screenManager.handleDisplayChange(wParam, lParam);
|
||||
if (QWindowsTheme *t = QWindowsTheme::instance())
|
||||
t->displayChanged();
|
||||
return d->m_screenManager.handleDisplayChange(wParam, lParam);
|
||||
case QtWindows::SettingChangedEvent:
|
||||
return d->m_screenManager.handleScreenChanges();
|
||||
default:
|
||||
|
@ -1008,6 +1008,7 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &ms
|
||||
state |= ((msg.wParam >= '0' && msg.wParam <= '9')
|
||||
|| (msg.wParam >= VK_OEM_PLUS && msg.wParam <= VK_OEM_3))
|
||||
? 0 : int(Qt::KeypadModifier);
|
||||
Q_FALLTHROUGH();
|
||||
default:
|
||||
if (uint(msg.lParam) == 0x004c0001 || uint(msg.lParam) == 0xc04c0001)
|
||||
state |= Qt::KeypadModifier;
|
||||
|
@ -2153,6 +2153,7 @@ QRect QWindowsVistaStyle::subControlRect(ComplexControl control, const QStyleOpt
|
||||
rect = visualRect(cb->direction, cb->rect, rect);
|
||||
return rect;
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_COMBOBOX
|
||||
case CC_TitleBar:
|
||||
if (const QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(option)) {
|
||||
|
@ -1509,11 +1509,10 @@ case PE_Frame:
|
||||
return;
|
||||
} else if (fillType == BT_NONE) {
|
||||
return;
|
||||
} else {
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
case PE_FrameLineEdit: {
|
||||
// we try to check if this lineedit is a delegate on a QAbstractItemView-derived class.
|
||||
if (QWindowsXPStylePrivate::isItemViewDelegateLineEdit(widget)) {
|
||||
@ -2428,6 +2427,7 @@ void QWindowsXPStyle::drawControl(ControlElement element, const QStyleOption *op
|
||||
p->restore();
|
||||
return;
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_RUBBERBAND
|
||||
case CE_HeaderEmptyArea:
|
||||
if (option->state & State_Horizontal)
|
||||
@ -3754,10 +3754,9 @@ int QWindowsXPStyle::styleHint(StyleHint hint, const QStyleOption *option, const
|
||||
break;
|
||||
#ifndef QT_NO_RUBBERBAND
|
||||
case SH_RubberBand_Mask:
|
||||
if (qstyleoption_cast<const QStyleOptionRubberBand *>(option)) {
|
||||
if (qstyleoption_cast<const QStyleOptionRubberBand *>(option))
|
||||
res = 0;
|
||||
break;
|
||||
}
|
||||
#endif // QT_NO_RUBBERBAND
|
||||
|
||||
case SH_ItemView_DrawDelegateFrame:
|
||||
|
Loading…
Reference in New Issue
Block a user