diff options
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/diaglib/debugproxystyle.cpp | 2 | ||||
-rw-r--r-- | tests/manual/diaglib/nativewindowdump_win.cpp | 10 | ||||
-rw-r--r-- | tests/manual/diaglib/qwidgetdump.cpp | 8 | ||||
-rw-r--r-- | tests/manual/diaglib/qwindowdump.cpp | 10 | ||||
-rw-r--r-- | tests/manual/diaglib/textdump.cpp | 2 | ||||
-rw-r--r-- | tests/manual/qtabletevent/device_information/tabletwidget.cpp | 2 | ||||
-rw-r--r-- | tests/manual/qtabletevent/regular_widgets/main.cpp | 1 |
7 files changed, 18 insertions, 17 deletions
diff --git a/tests/manual/diaglib/debugproxystyle.cpp b/tests/manual/diaglib/debugproxystyle.cpp index 809613cd1d..dc95241473 100644 --- a/tests/manual/diaglib/debugproxystyle.cpp +++ b/tests/manual/diaglib/debugproxystyle.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. diff --git a/tests/manual/diaglib/nativewindowdump_win.cpp b/tests/manual/diaglib/nativewindowdump_win.cpp index 6334fcfedd..d99a3a3d38 100644 --- a/tests/manual/diaglib/nativewindowdump_win.cpp +++ b/tests/manual/diaglib/nativewindowdump_win.cpp @@ -71,7 +71,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; } @@ -112,7 +112,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) @@ -138,7 +138,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) @@ -210,7 +210,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) << '"'; @@ -260,7 +260,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; diff --git a/tests/manual/diaglib/qwidgetdump.cpp b/tests/manual/diaglib/qwidgetdump.cpp index 926d2aaf35..371f3e2311 100644 --- a/tests/manual/diaglib/qwidgetdump.cpp +++ b/tests/manual/diaglib/qwidgetdump.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -137,7 +137,7 @@ static void dumpWidgetRecursion(QTextStream &str, const QWidget *w, str << '\n'; } #endif // Qt 5 - foreach (const QObject *co, w->children()) { + for (const QObject *co : w->children()) { if (co->isWidgetType()) dumpWidgetRecursion(str, static_cast<const QWidget *>(co), options, depth + 1); } @@ -153,11 +153,11 @@ void dumpAllWidgets(FormatWindowOptions options, const QWidget *root) topLevels.append(const_cast<QWidget *>(root)); else topLevels = QApplication::topLevelWidgets(); - foreach (QWidget *tw, topLevels) + for (QWidget *tw : qAsConst(topLevels)) dumpWidgetRecursion(str, tw, options); #if QT_VERSION >= 0x050400 { - foreach (const QString &line, d.split(QLatin1Char('\n'))) + for (const QString &line : d.split(QLatin1Char('\n'))) qDebug().noquote() << line; } #else diff --git a/tests/manual/diaglib/qwindowdump.cpp b/tests/manual/diaglib/qwindowdump.cpp index 2be26ff142..1e46f62b1d 100644 --- a/tests/manual/diaglib/qwindowdump.cpp +++ b/tests/manual/diaglib/qwindowdump.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -61,8 +61,8 @@ void formatObject(QTextStream &str, const QObject *o) void formatRect(QTextStream &str, const QRect &geom) { - str << geom.width() << 'x' << geom.height() << Qt::forcesign << geom.x() << geom.y() - << Qt::noforcesign; + str << geom.width() << 'x' << geom.height() << Qt::forcesign + << geom.x() << geom.y() << Qt::noforcesign; } #define debugType(s, type, typeConstant) \ @@ -163,7 +163,7 @@ static void dumpWindowRecursion(QTextStream &str, const QWindow *w, { indentStream(str, 2 * depth); formatWindow(str, w, options); - foreach (const QObject *co, w->children()) { + for (const QObject *co : w->children()) { if (co->isWindowType()) dumpWindowRecursion(str, static_cast<const QWindow *>(co), options, depth + 1); } @@ -174,7 +174,7 @@ void dumpAllWindows(FormatWindowOptions options) QString d; QTextStream str(&d); str << "### QWindows:\n"; - foreach (QWindow *w, QGuiApplication::topLevelWindows()) + for (QWindow *w : QGuiApplication::topLevelWindows()) dumpWindowRecursion(str, w, options); #if QT_VERSION >= 0x050400 qDebug().noquote() << d; diff --git a/tests/manual/diaglib/textdump.cpp b/tests/manual/diaglib/textdump.cpp index 33455a2a56..54a251928a 100644 --- a/tests/manual/diaglib/textdump.cpp +++ b/tests/manual/diaglib/textdump.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. diff --git a/tests/manual/qtabletevent/device_information/tabletwidget.cpp b/tests/manual/qtabletevent/device_information/tabletwidget.cpp index 14d059abc1..e146175109 100644 --- a/tests/manual/qtabletevent/device_information/tabletwidget.cpp +++ b/tests/manual/qtabletevent/device_information/tabletwidget.cpp @@ -58,7 +58,7 @@ bool TabletWidget::eventFilter(QObject *, QEvent *ev) mPos = event->pos(); mGPos = event->globalPos(); mHiResGlobalPos = event->posF(); - mDev = event->device(); + mDev = event->deviceType(); mPointerType = event->pointerType(); mUnique = event->uniqueId(); mXT = event->xTilt(); diff --git a/tests/manual/qtabletevent/regular_widgets/main.cpp b/tests/manual/qtabletevent/regular_widgets/main.cpp index 4816e2f3b9..1d0af4559b 100644 --- a/tests/manual/qtabletevent/regular_widgets/main.cpp +++ b/tests/manual/qtabletevent/regular_widgets/main.cpp @@ -37,6 +37,7 @@ #include <QStatusBar> #include <QVector> #include <QPainter> +#include <QPainterPath> #include <QCursor> enum TabletPointType { |