summaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/diaglib/debugproxystyle.cpp42
-rw-r--r--tests/manual/diaglib/debugproxystyle.h1
-rw-r--r--tests/manual/diaglib/qwindowdump.cpp2
-rw-r--r--tests/manual/manual.pro6
-rw-r--r--tests/manual/qsysinfo/main.cpp13
5 files changed, 45 insertions, 19 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 8e77a321dd..6f77c82dc5 100644
--- a/tests/manual/manual.pro
+++ b/tests/manual/manual.pro
@@ -58,11 +58,7 @@ contains(QT_CONFIG, opengl) {
contains(QT_CONFIG, 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/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;
}