diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-10-19 11:14:55 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-10-19 12:38:28 +0000 |
commit | 240d768ca6ef41bf661a1fb8e1bde408e25ba553 (patch) | |
tree | 0ea2483a76b80ce25f21bc421f29513a301dceaf /tests/auto/network/access/qnetworkdiskcache | |
parent | 733ac31cccc6ef9e0f1180f3aa4aa4f7db3fe65d (diff) |
tests/auto/network: Remove some placeholder formatting.
Use QByteArray/QString addition instead in loops and for
test row names.
Change-Id: I7974ace5b34f2da43e7511044e80de1e733245ac
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Diffstat (limited to 'tests/auto/network/access/qnetworkdiskcache')
-rw-r--r-- | tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp index 1685838e9e..399c9a733a 100644 --- a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp +++ b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp @@ -540,7 +540,7 @@ void tst_QNetworkDiskCache::expire() std::sort(cacheList.begin(), cacheList.end()); for (int i = 0; i < cacheList.count(); ++i) { QString fileName = cacheList[i]; - QCOMPARE(fileName, QString("http://localhost:4/%1").arg(i + 6)); + QCOMPARE(fileName, QLatin1String("http://localhost:4/") + QString::number(i + 6)); } } @@ -782,7 +782,10 @@ void tst_QNetworkDiskCache::crashWhenParentingCache() QNetworkAccessManager *manager = new QNetworkAccessManager(); QNetworkDiskCache *diskCache = new QNetworkDiskCache(manager); // parent to qnam! // we expect the temp dir to be cleaned at some point anyway - diskCache->setCacheDirectory(QString("%1/cacheDir_%2").arg(QDir::tempPath()).arg(QCoreApplication::applicationPid())); + + const QString diskCachePath = QDir::tempPath() + QLatin1String("/cacheDir_") + + QString::number(QCoreApplication::applicationPid()); + diskCache->setCacheDirectory(diskCachePath); manager->setCache(diskCache); QUrl url("http://127.0.0.1:" + QString::number(server.serverPort())); |