diff options
Diffstat (limited to 'tests/manual/diaglib/debugproxystyle.cpp')
-rw-r--r-- | tests/manual/diaglib/debugproxystyle.cpp | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/tests/manual/diaglib/debugproxystyle.cpp b/tests/manual/diaglib/debugproxystyle.cpp index 002220507b..cf73ae2ef8 100644 --- a/tests/manual/diaglib/debugproxystyle.cpp +++ b/tests/manual/diaglib/debugproxystyle.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -34,37 +34,21 @@ #include <QStyleOption> #include <QApplication> -#if QT_VERSION < 0x050000 -QDebug operator<<(QDebug d, const QPixmap &p) -{ - d << "QPixmap(" << p.size() << ')'; - return d; -} -#endif // QT_VERSION < 0x050000 - QDebug operator<<(QDebug debug, const QStyleOption *option) { -#if QT_VERSION >= 0x050000 QDebugStateSaver saver(debug); -# if QT_VERSION >= 0x050400 debug.noquote(); -# endif debug.nospace(); -#endif if (!option) { debug << "QStyleOption(0)"; return debug; } if (const QStyleOptionViewItem *ivo = qstyleoption_cast<const QStyleOptionViewItem *>(option)) { debug << "QStyleOptionViewItem("; -#if QT_VERSION >= 0x050000 debug << ivo->index; if (const int textSize = ivo->text.size()) debug << ", \"" << (textSize < 20 ? ivo->text : ivo->text.left(20) + QLatin1String("...")) << '"'; debug << ", "; -#else // Qt 5 - Q_UNUSED(ivo); -#endif } else { debug << "QStyleOption("; } @@ -72,10 +56,8 @@ QDebug operator<<(QDebug debug, const QStyleOption *option) << option->rect.x() << option->rect.y() << Qt::noforcesign; if (option->state != QStyle::State_None) debug << ", state=" << option->state; -#if QT_VERSION >= 0x050000 if (option->styleObject && !option->styleObject->isWidgetType()) debug << ", styleObject=" << QtDiag::formatQObject(option->styleObject); -#endif debug << ')'; return debug; } @@ -84,15 +66,9 @@ namespace QtDiag { DebugProxyStyle::DebugProxyStyle(QStyle *style) : QProxyStyle(style) { -#if QT_VERSION >= 0x050000 const qreal devicePixelRatio = qApp->devicePixelRatio(); -#else - const qreal devicePixelRatio = 1; -#endif qDebug() << __FUNCTION__ << QT_VERSION_STR -#if QT_VERSION >= 0x050000 << QGuiApplication::platformName() -#endif << style->objectName() << "devicePixelRatio=" << devicePixelRatio; } |