summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-16 09:38:51 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-19 12:39:16 +0000
commit52d5b272394f5d1fd84d5c44af78e3b87d264766 (patch)
tree2f03119fab864c4ce41e83185f3c317e647484c4 /tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
parent240d768ca6ef41bf661a1fb8e1bde408e25ba553 (diff)
tests/auto/widgets: Remove some placeholder formatting.
Use QByteArray/QString addition instead in loops and for test row names. Change-Id: Ia067cd966bf13506e6ca19925eae3158da027b83 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Diffstat (limited to 'tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index 7d5946dc5f..10708c0dd7 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -543,14 +543,15 @@ void tst_QGraphicsProxyWidget::testEventFilter_data()
QTest::newRow("none") << QEvent::None << false;
for (int i = 0; i < 2; ++i) {
bool fromObject = (i == 0);
- QTest::newRow(QString("resize %1").arg(fromObject).toLatin1()) << QEvent::Resize << fromObject;
- QTest::newRow(QString("move %1").arg(fromObject).toLatin1()) << QEvent::Move << fromObject;
- QTest::newRow(QString("hide %1").arg(fromObject).toLatin1()) << QEvent::Hide << fromObject;
- QTest::newRow(QString("show %1").arg(fromObject).toLatin1()) << QEvent::Show << fromObject;
- QTest::newRow(QString("enabled %1").arg(fromObject).toLatin1()) << QEvent::EnabledChange << fromObject;
- QTest::newRow(QString("focusIn %1").arg(fromObject).toLatin1()) << QEvent::FocusIn << fromObject;
- QTest::newRow(QString("focusOut %1").arg(fromObject).toLatin1()) << QEvent::FocusOut << fromObject;
- QTest::newRow(QString("keyPress %1").arg(fromObject).toLatin1()) << QEvent::KeyPress << fromObject;
+ const char fromObjectC = fromObject ? '1' : '0';
+ QTest::newRow((QByteArrayLiteral("resize ") + fromObjectC).constData()) << QEvent::Resize << fromObject;
+ QTest::newRow((QByteArrayLiteral("move ") + fromObjectC).constData()) << QEvent::Move << fromObject;
+ QTest::newRow((QByteArrayLiteral("hide ") + fromObjectC).constData()) << QEvent::Hide << fromObject;
+ QTest::newRow((QByteArrayLiteral("show ") + fromObjectC).constData()) << QEvent::Show << fromObject;
+ QTest::newRow((QByteArrayLiteral("enabled ") + fromObjectC).constData()) << QEvent::EnabledChange << fromObject;
+ QTest::newRow((QByteArrayLiteral("focusIn ") + fromObjectC).constData()) << QEvent::FocusIn << fromObject;
+ QTest::newRow((QByteArrayLiteral("focusOut ") + fromObjectC).constData()) << QEvent::FocusOut << fromObject;
+ QTest::newRow((QByteArrayLiteral("keyPress ") + fromObjectC).constData()) << QEvent::KeyPress << fromObject;
}
}
@@ -762,8 +763,10 @@ void tst_QGraphicsProxyWidget::focusNextPrevChild_data()
bool hasWidget = (j == 0);
bool hasScene = (k == 0);
bool result = hasScene && hasWidget;
- QString name = QString("Forward: %1, hasWidget: %2, hasScene: %3, result: %4").arg(next).arg(hasWidget).arg(hasScene).arg(result);
- QTest::newRow(name.toLatin1()) << hasWidget << hasScene << next << result;
+ QByteArray name = QByteArrayLiteral("Forward: ") + (next ? '1' : '0')
+ + ", hasWidget: " + (hasWidget ? '1' : '0') + ", hasScene: "
+ + (hasScene ? '1' : '0') + ", result: " + (result ? '1' : '0');
+ QTest::newRow(name.constData()) << hasWidget << hasScene << next << result;
}
}
}
@@ -1028,8 +1031,10 @@ void tst_QGraphicsProxyWidget::hoverMoveEvent_data()
bool hoverEnabled = (j == 0);
bool mouseTracking = (k == 0);
bool mouseDown = (l == 0);
- QString name = QString("hasWidget:%1, hover:%2, mouseTracking:%3, mouseDown: %4").arg(hasWidget).arg(hoverEnabled).arg(mouseTracking).arg(mouseDown);
- QTest::newRow(name.toLatin1()) << hasWidget << hoverEnabled << mouseTracking << mouseDown;
+ QByteArray name = QByteArrayLiteral("hasWidget:") + (hasWidget ? '1' : '0') + ", hover:"
+ + (hoverEnabled ? '1' : '0') + ", mouseTracking:"
+ + (mouseTracking ? '1' : '0') + ", mouseDown: " + (mouseDown ? '1' : '0');
+ QTest::newRow(name.constData()) << hasWidget << hoverEnabled << mouseTracking << mouseDown;
}
}
}