diff options
| author | Friedemann Kleint <[email protected]> | 2020-01-28 11:46:16 +0100 |
|---|---|---|
| committer | Friedemann Kleint <[email protected]> | 2020-03-25 14:30:24 +0100 |
| commit | cc333f5faf2fa892ca0e321915263cab5d793191 (patch) | |
| tree | bf996aebbf68a6e5df335acc0da41ba3a216d1fb /tests/manual/diaglib/nativewindowdump_win.cpp | |
| parent | 46ebd11e66f6f3180043a7258b46a1aff79a69f8 (diff) | |
Diaglib: Fix build
Use range-based for and fix deprecation warnings.
Change-Id: I54152b2598e9e4a7a3cc9db9b7072bbabcef7fcf
Reviewed-by: Shawn Rutledge <[email protected]>
Diffstat (limited to 'tests/manual/diaglib/nativewindowdump_win.cpp')
| -rw-r--r-- | tests/manual/diaglib/nativewindowdump_win.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/manual/diaglib/nativewindowdump_win.cpp b/tests/manual/diaglib/nativewindowdump_win.cpp index d91e673d1c8..256142462f4 100644 --- a/tests/manual/diaglib/nativewindowdump_win.cpp +++ b/tests/manual/diaglib/nativewindowdump_win.cpp @@ -69,7 +69,7 @@ static QTextStream &operator<<(QTextStream &str, const QSize &s) static QTextStream &operator<<(QTextStream &str, const QRect &rect) { - str << rect.size() << forcesign << rect.x() << rect.y() << noforcesign; + str << rect.size() << Qt::forcesign << rect.x() << rect.y() << Qt::noforcesign; return str; } @@ -110,7 +110,7 @@ static bool isTopLevel(HWND hwnd) static void formatNativeWindow(HWND hwnd, QTextStream &str) { - str << hex << showbase << quintptr(hwnd) << noshowbase << dec; + str << Qt::hex << Qt::showbase << quintptr(hwnd) << Qt::noshowbase << Qt::dec; const bool topLevel = isTopLevel(hwnd); if (topLevel) @@ -136,7 +136,7 @@ static void formatNativeWindow(HWND hwnd, QTextStream &str) if (GetClassName(hwnd, buf, sizeof(buf)/sizeof(buf[0]))) str << '"' << QString::fromWCharArray(buf) << '"'; - str << hex << showbase; + str << Qt::hex << Qt::showbase; if (const LONG_PTR style = GetWindowLongPtr(hwnd, GWL_STYLE)) { str << " style=" << style; debugWinStyle(str, style, WS_OVERLAPPED) @@ -208,7 +208,7 @@ static void formatNativeWindow(HWND hwnd, QTextStream &str) if (const ULONG_PTR wndProc = GetClassLongPtr(hwnd, GCLP_WNDPROC)) str << " wndProc=" << wndProc; - str << noshowbase << dec; + str << Qt::noshowbase << Qt::dec; if (GetWindowModuleFileName(hwnd, buf, sizeof(buf)/sizeof(buf[0]))) str << " module=\"" << QString::fromWCharArray(buf) << '"'; @@ -258,7 +258,7 @@ static void dumpNativeWindows(const WIdVector& wins) DumpContext dc; QString s; dc.stream = QSharedPointer<QTextStream>(new QTextStream(&s)); - foreach (WId win, wins) + for (WId win : wins) dumpNativeWindowRecursion(reinterpret_cast<HWND>(win), &dc); #if QT_VERSION >= 0x050400 qDebug().noquote() << s; |
