diff options
-rw-r--r-- | tests/manual/diaglib/debugproxystyle.cpp | 4 | ||||
-rw-r--r-- | tests/manual/diaglib/qwidgetdump.cpp | 6 | ||||
-rw-r--r-- | tests/manual/diaglib/qwindowdump.cpp | 9 | ||||
-rw-r--r-- | tests/manual/diaglib/textdump.cpp | 6 | ||||
-rw-r--r-- | tests/manual/dialogs/printdialogpanel.cpp | 3 | ||||
-rw-r--r-- | tests/manual/highdpi/main.cpp | 2 | ||||
-rw-r--r-- | tests/manual/qhttpnetworkconnection/main.cpp | 2 | ||||
-rw-r--r-- | tests/manual/qnetworkaccessmanager/qget/qget.cpp | 52 | ||||
-rw-r--r-- | tests/manual/qscreen/main.cpp | 14 | ||||
-rw-r--r-- | tests/manual/qssloptions/main.cpp | 14 | ||||
-rw-r--r-- | tests/manual/touch/main.cpp | 2 | ||||
-rw-r--r-- | tests/manual/windowflags/previewwindow.cpp | 8 |
12 files changed, 68 insertions, 54 deletions
diff --git a/tests/manual/diaglib/debugproxystyle.cpp b/tests/manual/diaglib/debugproxystyle.cpp index ed35af5962..809613cd1d 100644 --- a/tests/manual/diaglib/debugproxystyle.cpp +++ b/tests/manual/diaglib/debugproxystyle.cpp @@ -68,8 +68,8 @@ QDebug operator<<(QDebug debug, const QStyleOption *option) } else { debug << "QStyleOption("; } - debug << "rect=" << option->rect.width() << 'x' << option->rect.height() - << forcesign << option->rect.x() << option->rect.y() << noforcesign; + debug << "rect=" << option->rect.width() << 'x' << option->rect.height() << Qt::forcesign + << option->rect.x() << option->rect.y() << Qt::noforcesign; if (option->state != QStyle::State_None) debug << ", state=" << option->state; #if QT_VERSION >= 0x050000 diff --git a/tests/manual/diaglib/qwidgetdump.cpp b/tests/manual/diaglib/qwidgetdump.cpp index 5a2966021b..926d2aaf35 100644 --- a/tests/manual/diaglib/qwidgetdump.cpp +++ b/tests/manual/diaglib/qwidgetdump.cpp @@ -86,14 +86,16 @@ static void dumpWidgetRecursion(QTextStream &str, const QWidget *w, formatWidgetClass(str, w); str << ' ' << (w->isVisible() ? "[visible] " : "[hidden] "); if (const WId nativeWinId = w->internalWinId()) - str << "[native: " << hex << showbase << nativeWinId << dec << noshowbase << "] "; + str << "[native: " << Qt::hex << Qt::showbase << nativeWinId << Qt::dec << Qt::noshowbase + << "] "; if (w->isWindow()) str << "[top] "; str << (w->testAttribute(Qt::WA_Mapped) ? "[mapped] " : "[not mapped] "); if (w->testAttribute(Qt::WA_DontCreateNativeAncestors)) str << "[NoNativeAncestors] "; if (const int states = w->windowState()) - str << "windowState=" << hex << showbase << states << dec << noshowbase << ' '; + str << "windowState=" << Qt::hex << Qt::showbase << states << Qt::dec << Qt::noshowbase + << ' '; formatRect(str, w->geometry()); if (w->isWindow()) { str << ' ' << w->logicalDpiX() << "DPI"; diff --git a/tests/manual/diaglib/qwindowdump.cpp b/tests/manual/diaglib/qwindowdump.cpp index 381b683359..2be26ff142 100644 --- a/tests/manual/diaglib/qwindowdump.cpp +++ b/tests/manual/diaglib/qwindowdump.cpp @@ -61,8 +61,8 @@ void formatObject(QTextStream &str, const QObject *o) void formatRect(QTextStream &str, const QRect &geom) { - str << geom.width() << 'x' << geom.height() - << forcesign << geom.x() << geom.y() << noforcesign; + str << geom.width() << 'x' << geom.height() << Qt::forcesign << geom.x() << geom.y() + << Qt::noforcesign; } #define debugType(s, type, typeConstant) \ @@ -75,7 +75,7 @@ if (flags & flagConstant) \ void formatWindowFlags(QTextStream &str, Qt::WindowFlags flags) { - str << showbase << hex << unsigned(flags) << dec << noshowbase; + str << Qt::showbase << Qt::hex << unsigned(flags) << Qt::dec << Qt::noshowbase; const Qt::WindowFlags windowType = flags & Qt::WindowType_Mask; debugFlag(str, flags, Qt::Window) debugType(str, windowType, Qt::Dialog) @@ -123,7 +123,8 @@ void formatWindow(QTextStream &str, const QWindow *w, FormatWindowOptions option formatObject(str, w); str << ' ' << (w->isVisible() ? "[visible] " : "[hidden] "); if (const WId nativeWinId = pw ? pw->winId() : WId(0)) - str << "[native: " << hex << showbase << nativeWinId << dec << noshowbase << "] "; + str << "[native: " << Qt::hex << Qt::showbase << nativeWinId << Qt::dec << Qt::noshowbase + << "] "; if (w->isTopLevel()) str << "[top] "; if (w->isExposed()) diff --git a/tests/manual/diaglib/textdump.cpp b/tests/manual/diaglib/textdump.cpp index 383ec4edb0..33455a2a56 100644 --- a/tests/manual/diaglib/textdump.cpp +++ b/tests/manual/diaglib/textdump.cpp @@ -408,8 +408,8 @@ struct FormattingContext static void formatCharacter(QTextStream &str, const QChar &qc, FormattingContext &context) { const ushort unicode = qc.unicode(); - str << "U+" << qSetFieldWidth(4) << qSetPadChar('0') << uppercasedigits << hex << unicode - << dec << qSetFieldWidth(0) << ' '; + str << "U+" << qSetFieldWidth(4) << qSetPadChar('0') << Qt::uppercasedigits << Qt::hex + << unicode << Qt::dec << qSetFieldWidth(0) << ' '; const EnumLookup *specialChar = enumLookup(unicode, specialCharactersEnumLookup, sizeof(specialCharactersEnumLookup) / sizeof(EnumLookup)); if (specialChar) @@ -477,7 +477,7 @@ QString dumpTextAsCode(const QString &text) { QString result; QTextStream str(&result); - str << " QString result;\n" << hex << showbase; + str << " QString result;\n" << Qt::hex << Qt::showbase; for (QChar c : text) str << " result += QChar(" << c.unicode() << ");\n"; str << '\n'; diff --git a/tests/manual/dialogs/printdialogpanel.cpp b/tests/manual/dialogs/printdialogpanel.cpp index b7447e3d64..dcd8b43bf3 100644 --- a/tests/manual/dialogs/printdialogpanel.cpp +++ b/tests/manual/dialogs/printdialogpanel.cpp @@ -190,7 +190,8 @@ QTextStream &operator<<(QTextStream &s, const QSizeF &size) QTextStream &operator<<(QTextStream &s, const QRectF &rect) { - s << rect.width() << 'x' << rect.height() << forcesign << rect.x() << rect.y() << noforcesign; + s << rect.width() << 'x' << rect.height() << Qt::forcesign << rect.x() << rect.y() + << Qt::noforcesign; return s; } diff --git a/tests/manual/highdpi/main.cpp b/tests/manual/highdpi/main.cpp index 51a7026e85..0329e62387 100644 --- a/tests/manual/highdpi/main.cpp +++ b/tests/manual/highdpi/main.cpp @@ -63,7 +63,7 @@ static QTextStream &operator<<(QTextStream &str, const QRect &r) { - str << r.width() << 'x' << r.height() << forcesign << r.x() << r.y() << noforcesign; + str << r.width() << 'x' << r.height() << Qt::forcesign << r.x() << r.y() << Qt::noforcesign; return str; } diff --git a/tests/manual/qhttpnetworkconnection/main.cpp b/tests/manual/qhttpnetworkconnection/main.cpp index 5b670a51e2..d67d76699c 100644 --- a/tests/manual/qhttpnetworkconnection/main.cpp +++ b/tests/manual/qhttpnetworkconnection/main.cpp @@ -58,7 +58,7 @@ void tst_qhttpnetworkconnection::bigRemoteFile() QVERIFY(!QTestEventLoop::instance().timeout()); size = reply->size(); delete reply; - qDebug() << "Finished!" << endl; + qDebug() << "Finished!" << Qt::endl; qDebug() << "Time:" << t.elapsed() << "msec"; qDebug() << "Bytes:" << size; qDebug() << "Speed:" << (size / qreal(1024)) / (t.elapsed() / qreal(1000)) << "KB/sec"; diff --git a/tests/manual/qnetworkaccessmanager/qget/qget.cpp b/tests/manual/qnetworkaccessmanager/qget/qget.cpp index 639506af63..14bdb589ff 100644 --- a/tests/manual/qnetworkaccessmanager/qget/qget.cpp +++ b/tests/manual/qnetworkaccessmanager/qget/qget.cpp @@ -39,33 +39,41 @@ void printShortUsage() { - qDebug() << QCoreApplication::applicationName() << " [options] [list of urls]" << endl - << "Get one or more urls using QNetworkAccessManager" << endl - << "--help to display detailed usage" << endl; + qDebug() << QCoreApplication::applicationName() << " [options] [list of urls]" << Qt::endl + << "Get one or more urls using QNetworkAccessManager" << Qt::endl + << "--help to display detailed usage" << Qt::endl; } void printUsage() { - qDebug() << QCoreApplication::applicationName() << " [options] [list of urls]" << endl - << "Get one or more urls using QNetworkAccessManager" << endl + qDebug() << QCoreApplication::applicationName() << " [options] [list of urls]" << Qt::endl + << "Get one or more urls using QNetworkAccessManager" << Qt::endl << "Options:" - << "--help This message" << endl - << "--user=<username> Set username to use for authentication" << endl - << "--password=<password> Set password to use for authentication" << endl - << "--proxy-user=<username> Set username to use for proxy authentication" << endl - << "--proxy-password=<password> Set password to use for proxy authentication" << endl - << "--proxy=on Use system proxy (default)" << endl - << "--proxy=off Don't use system proxy" << endl - << "--proxy=<host:port>[,type] Use specified proxy" << endl - << " ,http HTTP proxy (default)" << endl - << " ,socks SOCKS5 proxy" << endl - << " ,ftp FTP proxy" << endl - << " ,httpcaching HTTP caching proxy (no CONNECT method)" << endl - << "--headers=filename Set request headers from file contents" << endl - << "--post=filename upload the file to the next url using HTTP POST" << endl - << "--put=filename upload the file to the next url using HTTP PUT" << endl - << "--content-type=<MIME> set content-type header for upload" << endl - << "--serial don't run requests in parallel" << endl; + << "--help This message" << Qt::endl + << "--user=<username> Set username to use for authentication" + << Qt::endl + << "--password=<password> Set password to use for authentication" + << Qt::endl + << "--proxy-user=<username> Set username to use for proxy authentication" + << Qt::endl + << "--proxy-password=<password> Set password to use for proxy authentication" + << Qt::endl + << "--proxy=on Use system proxy (default)" << Qt::endl + << "--proxy=off Don't use system proxy" << Qt::endl + << "--proxy=<host:port>[,type] Use specified proxy" << Qt::endl + << " ,http HTTP proxy (default)" << Qt::endl + << " ,socks SOCKS5 proxy" << Qt::endl + << " ,ftp FTP proxy" << Qt::endl + << " ,httpcaching HTTP caching proxy (no CONNECT method)" + << Qt::endl + << "--headers=filename Set request headers from file contents" + << Qt::endl + << "--post=filename upload the file to the next url using HTTP POST" + << Qt::endl + << "--put=filename upload the file to the next url using HTTP PUT" + << Qt::endl + << "--content-type=<MIME> set content-type header for upload" << Qt::endl + << "--serial don't run requests in parallel" << Qt::endl; } int main(int argc, char *argv[]) diff --git a/tests/manual/qscreen/main.cpp b/tests/manual/qscreen/main.cpp index 0728d66bf9..ab92216d22 100644 --- a/tests/manual/qscreen/main.cpp +++ b/tests/manual/qscreen/main.cpp @@ -192,15 +192,15 @@ static inline QString msgScreenChange(const QWidget *w, const QScreen *oldScreen if (!newScreen) { result = QLatin1String("Screen changed --> null"); } else if (!oldScreen) { - QTextStream(&result) << "Screen changed null --> \"" - << newScreen->name() << "\" at " << pos.x() << ',' << pos.y() << " geometry: " - << geometry.width() << 'x' << geometry.height() << forcesign << geometry.x() - << geometry.y() << '.'; + QTextStream(&result) << "Screen changed null --> \"" << newScreen->name() << "\" at " + << pos.x() << ',' << pos.y() << " geometry: " << geometry.width() + << 'x' << geometry.height() << Qt::forcesign << geometry.x() + << geometry.y() << '.'; } else { QTextStream(&result) << "Screen changed \"" << oldScreen->name() << "\" --> \"" - << newScreen->name() << "\" at " << pos.x() << ',' << pos.y() << " geometry: " - << geometry.width() << 'x' << geometry.height() << forcesign << geometry.x() - << geometry.y() << '.'; + << newScreen->name() << "\" at " << pos.x() << ',' << pos.y() + << " geometry: " << geometry.width() << 'x' << geometry.height() + << Qt::forcesign << geometry.x() << geometry.y() << '.'; } return result; } diff --git a/tests/manual/qssloptions/main.cpp b/tests/manual/qssloptions/main.cpp index 0f06071b41..cc65c57f33 100644 --- a/tests/manual/qssloptions/main.cpp +++ b/tests/manual/qssloptions/main.cpp @@ -37,13 +37,13 @@ int main(int argc, char **argv) if (argc < 3) { QTextStream out(stdout); - out << "Usage: " << argv[0] << " host port [options]" << endl; - out << "The options can be one or more of the following:" << endl; - out << "enable_empty_fragments" << endl; - out << "disable_session_tickets" << endl; - out << "disable_compression" << endl; - out << "disable_sni" << endl; - out << "enable_unsafe_reneg" << endl; + out << "Usage: " << argv[0] << " host port [options]" << Qt::endl; + out << "The options can be one or more of the following:" << Qt::endl; + out << "enable_empty_fragments" << Qt::endl; + out << "disable_session_tickets" << Qt::endl; + out << "disable_compression" << Qt::endl; + out << "disable_sni" << Qt::endl; + out << "enable_unsafe_reneg" << Qt::endl; return 1; } diff --git a/tests/manual/touch/main.cpp b/tests/manual/touch/main.cpp index a244230a22..8572e18955 100644 --- a/tests/manual/touch/main.cpp +++ b/tests/manual/touch/main.cpp @@ -526,7 +526,7 @@ void MainWindow::updateScreenLabel() const QRect geometry = screen->geometry(); const qreal dpr = screen->devicePixelRatio(); str << '"' << screen->name() << "\" " << geometry.width() << 'x' << geometry.height() - << forcesign << geometry.x() << geometry.y() << noforcesign; + << Qt::forcesign << geometry.x() << geometry.y() << Qt::noforcesign; if (!qFuzzyCompare(dpr, qreal(1))) str << ", dpr=" << dpr; m_screenLabel->setText(text); diff --git a/tests/manual/windowflags/previewwindow.cpp b/tests/manual/windowflags/previewwindow.cpp index ef3966830b..893dbc9a41 100644 --- a/tests/manual/windowflags/previewwindow.cpp +++ b/tests/manual/windowflags/previewwindow.cpp @@ -48,7 +48,8 @@ void PreviewWindow::paintEvent(QPaintEvent *event) static void formatWindowFlags(QTextStream &str, Qt::WindowFlags flags) { - str << "Window flags: " << hex << showbase << unsigned(flags) << noshowbase << dec << ' '; + str << "Window flags: " << Qt::hex << Qt::showbase << unsigned(flags) << Qt::noshowbase + << Qt::dec << ' '; switch (flags & Qt::WindowType_Mask) { case Qt::Window: str << "Qt::Window"; @@ -125,7 +126,8 @@ static void formatWindowFlags(QTextStream &str, Qt::WindowFlags flags) static void formatWindowStates(QTextStream &str, Qt::WindowStates states) { - str << "Window states: " << hex << showbase << unsigned(states) << noshowbase << dec << ' '; + str << "Window states: " << Qt::hex << Qt::showbase << unsigned(states) << Qt::noshowbase + << Qt::dec << ' '; if (states & Qt::WindowActive) { str << "Qt::WindowActive "; states &= ~Qt::WindowActive; @@ -150,7 +152,7 @@ static void formatWindowStates(QTextStream &str, Qt::WindowStates states) QTextStream &operator<<(QTextStream &str, const QRect &r) { - str << r.width() << 'x' << r.height() << forcesign << r.x() << r.y() << noforcesign; + str << r.width() << 'x' << r.height() << Qt::forcesign << r.x() << r.y() << Qt::noforcesign; return str; } |