diff options
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/diaglib/debugproxystyle.cpp | 42 | ||||
-rw-r--r-- | tests/manual/diaglib/debugproxystyle.h | 1 | ||||
-rw-r--r-- | tests/manual/diaglib/qwindowdump.cpp | 2 | ||||
-rw-r--r-- | tests/manual/manual.pro | 12 | ||||
-rw-r--r-- | tests/manual/qopenglcontext/qopenglcontextwindow.h | 2 | ||||
-rw-r--r-- | tests/manual/qopengltextureblitter/qopengltextureblitwindow.cpp | 4 | ||||
-rw-r--r-- | tests/manual/qopengltextureblitter/qopengltextureblitwindow.h | 2 | ||||
-rw-r--r-- | tests/manual/qsysinfo/main.cpp | 13 |
8 files changed, 52 insertions, 26 deletions
diff --git a/tests/manual/diaglib/debugproxystyle.cpp b/tests/manual/diaglib/debugproxystyle.cpp index 667ec403b7..d4e62f5dd6 100644 --- a/tests/manual/diaglib/debugproxystyle.cpp +++ b/tests/manual/diaglib/debugproxystyle.cpp @@ -45,13 +45,36 @@ QDebug operator<<(QDebug debug, const QStyleOption *option) { #if QT_VERSION >= 0x050000 QDebugStateSaver saver(debug); +# if QT_VERSION >= 0x050400 + debug.noquote(); +# endif debug.nospace(); #endif - debug << "QStyleOption("; - if (option) - debug << "rec=" << option->rect; - else - debug << '0'; + 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("; + } + debug << "rect=" << option->rect.width() << 'x' << option->rect.height() + << forcesign << option->rect.x() << option->rect.y() << noforcesign; + if (option->state != QStyle::State_None) + debug << ", state=" << option->state; +#if QT_VERSION >= 0x050000 + if (option->styleObject && !option->styleObject->isWidgetType()) + debug << ", styleObject=" << option->styleObject; +#endif debug << ')'; return debug; } @@ -132,6 +155,15 @@ QRect DebugProxyStyle::itemPixmapRect(const QRect &r, int flags, const QPixmap & return result; } +int DebugProxyStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, + QStyleHintReturn *returnData) const +{ + const int result = QProxyStyle::styleHint(hint, option, widget, returnData); + qDebug() << __FUNCTION__ << hint << option << widget << "returnData=" + << returnData << "returns" << result; + return result; +} + int DebugProxyStyle::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, const QWidget *widget) const { const int result = QProxyStyle::pixelMetric(metric, option, widget); diff --git a/tests/manual/diaglib/debugproxystyle.h b/tests/manual/diaglib/debugproxystyle.h index 74407e7f3e..01e1e6b6d1 100644 --- a/tests/manual/diaglib/debugproxystyle.h +++ b/tests/manual/diaglib/debugproxystyle.h @@ -48,6 +48,7 @@ public: QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget) const; QRect itemTextRect(const QFontMetrics &fm, const QRect &r, int flags, bool enabled, const QString &text) const; QRect itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const; + int styleHint(StyleHint hint, const QStyleOption *option = 0, const QWidget *widget = 0, QStyleHintReturn *returnData = 0) const; int pixelMetric(PixelMetric metric, const QStyleOption *option = 0, const QWidget *widget = 0) const; QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget = 0) const; QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const; diff --git a/tests/manual/diaglib/qwindowdump.cpp b/tests/manual/diaglib/qwindowdump.cpp index 19c9ca30e9..4adb1da5f1 100644 --- a/tests/manual/diaglib/qwindowdump.cpp +++ b/tests/manual/diaglib/qwindowdump.cpp @@ -113,8 +113,6 @@ void formatWindowFlags(QTextStream &str, const Qt::WindowFlags flags) debugFlag(str, flags, Qt::WindowStaysOnBottomHint) debugFlag(str, flags, Qt::MacWindowToolBarButtonHint) debugFlag(str, flags, Qt::BypassGraphicsProxyWidget) - debugFlag(str, flags, Qt::WindowOkButtonHint) - debugFlag(str, flags, Qt::WindowCancelButtonHint) } #if QT_VERSION > 0x050000 diff --git a/tests/manual/manual.pro b/tests/manual/manual.pro index f8287f7d19..2fe96c2f93 100644 --- a/tests/manual/manual.pro +++ b/tests/manual/manual.pro @@ -53,18 +53,14 @@ dialogs \ windowtransparency \ unc -!contains(QT_CONFIG, openssl):!contains(QT_CONFIG, openssl-linked):SUBDIRS -= qssloptions +!qtConfig(openssl):!qtConfig(openssl-linked): SUBDIRS -= qssloptions -contains(QT_CONFIG, opengl) { +qtConfig(opengl) { SUBDIRS += qopengltextureblitter - contains(QT_CONFIG, egl): SUBDIRS += qopenglcontext + qtConfig(egl): SUBDIRS += qopenglcontext } -win32 { - SUBDIRS -= network_remote_stresstest network_stresstest - # disable some tests on wince because of missing dependencies - wince: SUBDIRS -= lance windowmodality -} +win32: SUBDIRS -= network_remote_stresstest network_stresstest lessThan(QT_MAJOR_VERSION, 5): SUBDIRS -= bearerex lance qnetworkaccessmanager/qget qmimedatabase qnetworkreply \ qpainfo qscreen socketengine xembed-raster xembed-widgets windowtransparency \ diff --git a/tests/manual/qopenglcontext/qopenglcontextwindow.h b/tests/manual/qopenglcontext/qopenglcontextwindow.h index f436d1af0e..37ff1b2082 100644 --- a/tests/manual/qopenglcontext/qopenglcontextwindow.h +++ b/tests/manual/qopenglcontext/qopenglcontextwindow.h @@ -31,9 +31,9 @@ #include <QtGui/QWindow> #include <QtGui/QOpenGLContext> +#include <QtGui/QOpenGLTextureBlitter> #include <QtGui/QImage> #include <QtCore/QVariant> -#include <QtGui/private/qopengltextureblitter_p.h> class QOpenGLContextWindow : public QWindow { diff --git a/tests/manual/qopengltextureblitter/qopengltextureblitwindow.cpp b/tests/manual/qopengltextureblitter/qopengltextureblitwindow.cpp index 63ac1e4e66..f4e093a967 100644 --- a/tests/manual/qopengltextureblitter/qopengltextureblitwindow.cpp +++ b/tests/manual/qopengltextureblitter/qopengltextureblitwindow.cpp @@ -123,9 +123,9 @@ void QOpenGLTextureBlitWindow::render() m_blitter.blit(texture.textureId(), topRightOriginTopLeftVertex, topLeftOrigin); m_blitter.blit(texture_mirrored.textureId(), bottomLeftOriginTopLeftVertex, topLeftOrigin); - m_blitter.setSwizzleRB(true); + m_blitter.setRedBlueSwizzle(true); m_blitter.blit(texture.textureId(), bottomRightOriginTopLeftVertex, texTopLeftOriginTopLeft); - m_blitter.setSwizzleRB(false); + m_blitter.setRedBlueSwizzle(false); m_blitter.release(); if (m_blitter.supportsExternalOESTarget()) { diff --git a/tests/manual/qopengltextureblitter/qopengltextureblitwindow.h b/tests/manual/qopengltextureblitter/qopengltextureblitwindow.h index 957d833ef3..0912f096e4 100644 --- a/tests/manual/qopengltextureblitter/qopengltextureblitwindow.h +++ b/tests/manual/qopengltextureblitter/qopengltextureblitwindow.h @@ -31,7 +31,7 @@ #include <QtGui/QWindow> #include <QtGui/QOpenGLContext> -#include <QtGui/private/qopengltextureblitter_p.h> +#include <QtGui/QOpenGLTextureBlitter> class QOpenGLTextureBlitWindow : public QWindow { diff --git a/tests/manual/qsysinfo/main.cpp b/tests/manual/qsysinfo/main.cpp index 13458d27e5..5add1e4f74 100644 --- a/tests/manual/qsysinfo/main.cpp +++ b/tests/manual/qsysinfo/main.cpp @@ -57,13 +57,6 @@ QByteArray windowsVersionToString(QSysInfo::WinVersion v) CASE_VERSION(WV_WINDOWS10); case QSysInfo::WV_NT_based: // shouldn't happen break; - - CASE_VERSION(WV_CE); - CASE_VERSION(WV_CENET); - CASE_VERSION(WV_CE_5); - CASE_VERSION(WV_CE_6); - case QSysInfo::WV_CE_based: // shouldn't happen - break; } return "WinVersion(0x" + QByteArray::number(v, 16) + ')'; @@ -87,6 +80,7 @@ QByteArray macVersionToString(QSysInfo::MacVersion v) CASE_VERSION(MV_10_8); CASE_VERSION(MV_10_9); CASE_VERSION(MV_10_10); + CASE_VERSION(MV_10_11); CASE_VERSION(MV_IOS_4_3); CASE_VERSION(MV_IOS_5_0); @@ -96,6 +90,11 @@ QByteArray macVersionToString(QSysInfo::MacVersion v) CASE_VERSION(MV_IOS_7_0); CASE_VERSION(MV_IOS_7_1); CASE_VERSION(MV_IOS_8_0); + CASE_VERSION(MV_IOS_8_1); + CASE_VERSION(MV_IOS_8_2); + CASE_VERSION(MV_IOS_8_3); + CASE_VERSION(MV_IOS_8_4); + CASE_VERSION(MV_IOS_9_0); case QSysInfo::MV_IOS: // shouldn't happen: break; } |