aboutsummaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/creationtime
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-04-20 10:13:21 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-04-20 15:04:45 +0000
commit7703e6a9fc397b86b2520a14fc104569ed24e07f (patch)
tree7e70ecd6bdd4e006ba3d8fa5ad71d049a18b764a /tests/benchmarks/creationtime
parentb1629a78d8e8ce031d92e42d66684e2b34630d6f (diff)
Tests: prepare for the upcoming import rename
Looks like a duplicate string right now, but after the import rename, the target path (eg. QT_INSTALL_QML/QtQuick/Controls.2/Material) and the source path (eg. src/imports/controls/material) no longer have a common structure, so pass both paths to addTestRows(). Change-Id: I39228ed5f23434289a5bea95977bbd0e7a378641 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/benchmarks/creationtime')
-rw-r--r--tests/benchmarks/creationtime/tst_creationtime.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/benchmarks/creationtime/tst_creationtime.cpp b/tests/benchmarks/creationtime/tst_creationtime.cpp
index f6ad0a26..ec82df35 100644
--- a/tests/benchmarks/creationtime/tst_creationtime.cpp
+++ b/tests/benchmarks/creationtime/tst_creationtime.cpp
@@ -65,7 +65,7 @@ void tst_CreationTime::init()
engine.clearComponentCache();
}
-static void addTestRows(QQmlEngine *engine, const QString &targetPath, const QStringList &skiplist = QStringList())
+static void addTestRows(QQmlEngine *engine, const QString &sourcePath, const QString &targetPath, const QStringList &skiplist = QStringList())
{
// We cannot use QQmlComponent to load QML files directly from the source tree.
// For styles that use internal QML types (eg. material/Ripple.qml), the source
@@ -78,7 +78,7 @@ static void addTestRows(QQmlEngine *engine, const QString &targetPath, const QSt
// the engine's import path. This way we can use QQmlComponent to load each QML file
// for benchmarking.
- QFileInfoList entries = QDir(QQC2_IMPORT_PATH "/" + targetPath).entryInfoList(QStringList("*.qml"), QDir::Files);
+ QFileInfoList entries = QDir(QQC2_IMPORT_PATH "/" + sourcePath).entryInfoList(QStringList("*.qml"), QDir::Files);
foreach (const QFileInfo &entry, entries) {
QString name = entry.baseName();
if (!skiplist.contains(name)) {
@@ -121,7 +121,7 @@ void tst_CreationTime::controls()
void tst_CreationTime::controls_data()
{
QTest::addColumn<QUrl>("url");
- addTestRows(&engine, "controls", QStringList() << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator");
+ addTestRows(&engine, "controls", "controls", QStringList() << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator");
}
void tst_CreationTime::material()
@@ -133,7 +133,7 @@ void tst_CreationTime::material()
void tst_CreationTime::material_data()
{
QTest::addColumn<QUrl>("url");
- addTestRows(&engine, "controls/material", QStringList() << "Ripple" << "SliderHandle" << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator");
+ addTestRows(&engine, "controls/material", "controls/material", QStringList() << "Ripple" << "SliderHandle" << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator");
}
void tst_CreationTime::universal()
@@ -145,7 +145,7 @@ void tst_CreationTime::universal()
void tst_CreationTime::universal_data()
{
QTest::addColumn<QUrl>("url");
- addTestRows(&engine, "controls/universal", QStringList() << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator");
+ addTestRows(&engine, "controls/universal", "controls/universal", QStringList() << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator");
}
void tst_CreationTime::calendar()
@@ -157,7 +157,7 @@ void tst_CreationTime::calendar()
void tst_CreationTime::calendar_data()
{
QTest::addColumn<QUrl>("url");
- addTestRows(&engine, "calendar");
+ addTestRows(&engine, "calendar", "calendar");
}
QTEST_MAIN(tst_CreationTime)