diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-06-13 16:14:40 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-20 03:17:49 +0200 |
commit | e4505acd12435f1b7d0dabe79823ccb7e26011e9 (patch) | |
tree | f516faf0b74411f965d0f60f06210365347b3e00 /src/plugins/platforms | |
parent | f681e99e29e6d3b211d74ef27355b0c1962fd555 (diff) |
Windows: Fix MinGW warnings.
- Missing initializers for structs
- Missing enumeration value
- Mixing enumeration/ints in operator ?
Change-Id: I149ab01ad2ebd04f89e5c699905d5ba724828e0f
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/plugins/platforms')
4 files changed, 15 insertions, 14 deletions
diff --git a/src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp b/src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp index 56952dfb3e..64877d71ea 100644 --- a/src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp +++ b/src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp @@ -152,7 +152,6 @@ messageDebugEntries[] = { {WM_KILLFOCUS, "WM_KILLFOCUS", true}, {WM_ENABLE, "WM_ENABLE", true}, {WM_SHOWWINDOW, "WM_SHOWWINDOW", true}, - {WM_GETMINMAXINFO, "WM_GETMINMAXINFO"}, {WM_WINDOWPOSCHANGING, "WM_WINDOWPOSCHANGING", true}, {WM_WINDOWPOSCHANGED, "WM_WINDOWPOSCHANGED", true}, {WM_SETCURSOR, "WM_SETCURSOR", false}, @@ -199,13 +198,13 @@ messageDebugEntries[] = { {WM_RENDERALLFORMATS, "WM_RENDERALLFORMATS", true}, {WM_DESTROYCLIPBOARD, "WM_DESTROYCLIPBOARD", true}, {WM_CAPTURECHANGED, "WM_CAPTURECHANGED", true}, - {WM_IME_STARTCOMPOSITION, "WM_IME_STARTCOMPOSITION"}, - {WM_IME_COMPOSITION, "WM_IME_COMPOSITION"}, - {WM_IME_ENDCOMPOSITION, "WM_IME_ENDCOMPOSITION"}, - {WM_IME_NOTIFY, "WM_IME_NOTIFY"}, - {WM_IME_REQUEST, "WM_IME_REQUEST"}, - {WM_DISPLAYCHANGE, "WM_DISPLAYCHANGE"}, - {WM_THEMECHANGED , "WM_THEMECHANGED"} + {WM_IME_STARTCOMPOSITION, "WM_IME_STARTCOMPOSITION", true}, + {WM_IME_COMPOSITION, "WM_IME_COMPOSITION", true}, + {WM_IME_ENDCOMPOSITION, "WM_IME_ENDCOMPOSITION", true}, + {WM_IME_NOTIFY, "WM_IME_NOTIFY", true}, + {WM_IME_REQUEST, "WM_IME_REQUEST", true}, + {WM_DISPLAYCHANGE, "WM_DISPLAYCHANGE", true}, + {WM_THEMECHANGED, "WM_THEMECHANGED", true} }; static inline const MessageDebugEntry *messageDebugEntry(UINT msg) diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index d31b059445..52950ecde5 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -398,6 +398,7 @@ QVariant QWindowsIntegration::styleHint(QPlatformIntegration::StyleHint hint) co case QPlatformIntegration::KeyboardInputInterval: case QPlatformIntegration::ShowIsFullScreen: case QPlatformIntegration::PasswordMaskDelay: + case QPlatformIntegration::StartDragVelocity: break; // Not implemented case QPlatformIntegration::FontSmoothingGamma: return QVariant(QWindowsFontDatabase::fontSmoothingGamma()); diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp index ec37c4bbef..d3a3468037 100644 --- a/src/plugins/platforms/windows/qwindowskeymapper.cpp +++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp @@ -796,10 +796,10 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &ms // Get the modifier states (may be altered later, depending on key code) int state = 0; - state |= (nModifiers & ShiftAny ? Qt::ShiftModifier : 0); - state |= (nModifiers & ControlAny ? Qt::ControlModifier : 0); - state |= (nModifiers & AltAny ? Qt::AltModifier : 0); - state |= (nModifiers & MetaAny ? Qt::MetaModifier : 0); + state |= (nModifiers & ShiftAny ? int(Qt::ShiftModifier) : 0); + state |= (nModifiers & ControlAny ? int(Qt::ControlModifier) : 0); + state |= (nModifiers & AltAny ? int(Qt::AltModifier) : 0); + state |= (nModifiers & MetaAny ? int(Qt::MetaModifier) : 0); // Now we know enough to either have MapVirtualKey or our own keymap tell us if it's a deadkey const bool isDeadKey = isADeadKey(msg.wParam, state) @@ -920,7 +920,7 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &ms case Qt::Key_9: state |= ((msg.wParam >= '0' && msg.wParam <= '9') || (msg.wParam >= VK_OEM_PLUS && msg.wParam <= VK_OEM_3)) - ? 0 : Qt::KeypadModifier; + ? 0 : int(Qt::KeypadModifier); default: if ((uint)msg.lParam == 0x004c0001 || (uint)msg.lParam == 0xc04c0001) state |= Qt::KeypadModifier; diff --git a/src/plugins/platforms/windows/qwindowsmime.cpp b/src/plugins/platforms/windows/qwindowsmime.cpp index 963ee88423..3c87a3a18d 100644 --- a/src/plugins/platforms/windows/qwindowsmime.cpp +++ b/src/plugins/platforms/windows/qwindowsmime.cpp @@ -150,7 +150,8 @@ static bool qt_write_dibv5(QDataStream &s, QImage image) //depth will be always 32 int bpl_bmp = image.width()*4; - BMP_BITMAPV5HEADER bi ={0}; + BMP_BITMAPV5HEADER bi; + ZeroMemory(&bi, sizeof(bi)); bi.bV5Size = sizeof(BMP_BITMAPV5HEADER); bi.bV5Width = image.width(); bi.bV5Height = image.height(); |