diff options
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/dialogs/qwizard_win.cpp | 16 | ||||
-rw-r--r-- | src/widgets/util/qsystemtrayicon_win.cpp | 2 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/widgets/dialogs/qwizard_win.cpp b/src/widgets/dialogs/qwizard_win.cpp index 6359ebfb09..4a4f109a82 100644 --- a/src/widgets/dialogs/qwizard_win.cpp +++ b/src/widgets/dialogs/qwizard_win.cpp @@ -306,7 +306,7 @@ bool QVistaHelper::setDWMTitleBar(TitleBarChangeType type) { bool value = false; if (vistaState() == VistaAero) { - WIZ_MARGINS mar = {0}; + WIZ_MARGINS mar = {0, 0, 0, 0}; if (type == NormalTitleBar) mar.cyTopHeight = 0; else @@ -639,13 +639,14 @@ bool QVistaHelper::eventFilter(QObject *obj, QEvent *event) HFONT QVistaHelper::getCaptionFont(HANDLE hTheme) { - LOGFONT lf = {0}; + LOGFONT lf = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, { 0 } }; if (!hTheme) pGetThemeSysFont(hTheme, WIZ_TMT_CAPTIONFONT, &lf); else { - NONCLIENTMETRICS ncm = {sizeof(NONCLIENTMETRICS)}; + NONCLIENTMETRICS ncm; + ncm.cbSize = sizeof(NONCLIENTMETRICS); SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &ncm, false); lf = ncm.lfMessageFont; } @@ -662,7 +663,8 @@ bool QVistaHelper::drawTitleText(QPainter *painter, const QString &text, const Q // Set up a memory DC and bitmap that we'll draw into HDC dcMem; HBITMAP bmp; - BITMAPINFO dib = {{0}}; + BITMAPINFO dib; + ZeroMemory(&dib, sizeof(dib)); dcMem = CreateCompatibleDC(hdc); dib.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); @@ -680,7 +682,8 @@ bool QVistaHelper::drawTitleText(QPainter *painter, const QString &text, const Q HFONT hOldFont = (HFONT)SelectObject(dcMem, (HGDIOBJ) hCaptionFont); // Draw the text! - WIZ_DTTOPTS dto = { sizeof(WIZ_DTTOPTS) }; + WIZ_DTTOPTS dto; + dto.dwSize = sizeof(WIZ_DTTOPTS); const UINT uFormat = WIZ_DT_SINGLELINE|WIZ_DT_CENTER|WIZ_DT_VCENTER|WIZ_DT_NOPREFIX; RECT rctext ={0,0, rect.width(), rect.height()}; @@ -708,7 +711,8 @@ bool QVistaHelper::drawBlackRect(const QRect &rect, HDC hdc) // Set up a memory DC and bitmap that we'll draw into HDC dcMem; HBITMAP bmp; - BITMAPINFO dib = {{0}}; + BITMAPINFO dib; + ZeroMemory(&dib, sizeof(dib)); dcMem = CreateCompatibleDC(hdc); dib.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); diff --git a/src/widgets/util/qsystemtrayicon_win.cpp b/src/widgets/util/qsystemtrayicon_win.cpp index 731b547e2a..e81a8eee93 100644 --- a/src/widgets/util/qsystemtrayicon_win.cpp +++ b/src/widgets/util/qsystemtrayicon_win.cpp @@ -466,7 +466,7 @@ QRect QSystemTrayIconSys::findIconGeometry(const int iconId) if (currentIconHandle == m_hwnd && currentIconId == iconId && !isHidden) { SendMessage(trayHandle, TB_GETITEMRECT, toolbarButton , (LPARAM)data); - RECT iconRect = {0, 0}; + RECT iconRect = {0, 0, 0, 0}; if(ReadProcessMemory(trayProcess, data, &iconRect, sizeof(RECT), &numBytes)) { MapWindowPoints(trayHandle, NULL, (LPPOINT)&iconRect, 2); QRect geometry(iconRect.left + 1, iconRect.top + 1, |