summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2017-01-14 10:22:59 +0100
committerMarc Mutz <marc.mutz@kdab.com>2017-01-26 10:31:36 +0000
commita9603a4088ec055c3d1588c14e09e14bf7e2a0e8 (patch)
tree80029d4ee217f55a1d64e380b7321113510a0d07 /tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
parente0b55e8b1cdfea3dcb22b949632e4f5bcc200a76 (diff)
tst_qgraphicsview: use new QTest::addRow() more
... for calculated test data names. That involved removing the leading ", " from test name literals (folding it into the format string) and porting from some QString code to QByteArray to make the result usable with addRow(), which does not support %ls... Change-Id: Icb2344778203f10939ae46b9e46872101f3878a9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index c8bdcbde09..5ab24d6878 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -2885,7 +2885,7 @@ public:
void tst_QGraphicsView::scrollBarRanges()
{
- QFETCH(QString, style);
+ QFETCH(QByteArray, style);
QFETCH(QSize, viewportSize);
QFETCH(QRectF, sceneRect);
QFETCH(ScrollBarCount, sceneRectOffsetFactors);
@@ -2898,7 +2898,7 @@ void tst_QGraphicsView::scrollBarRanges()
QFETCH(ExpectedValueDescription, vmax);
QFETCH(bool, useStyledPanel);
- if (useStyledPanel && style == QStringLiteral("Macintosh") && platformName == QStringLiteral("cocoa"))
+ if (useStyledPanel && style == "Macintosh" && platformName == QStringLiteral("cocoa"))
QSKIP("Insignificant on OSX");
QScopedPointer<QStyle> stylePtr;
@@ -2909,10 +2909,10 @@ void tst_QGraphicsView::scrollBarRanges()
view.setTransform(transform);
view.setFrameStyle(useStyledPanel ? QFrame::StyledPanel : QFrame::NoFrame);
- if (style == QString("motif"))
+ if (style == "motif")
stylePtr.reset(new FauxMotifStyle);
else
- stylePtr.reset(QStyleFactory::create(style));
+ stylePtr.reset(QStyleFactory::create(QLatin1String(style)));
view.setStyle(stylePtr.data());
view.setStyleSheet(" "); // enables style propagation ;-)