diff options
Diffstat (limited to 'tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp')
-rw-r--r-- | tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index a84d290661..66aa26ccea 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -202,8 +202,7 @@ protected Q_SLOTS: void notEnoughData(); private Q_SLOTS: - void init(); - void cleanup(); + void cleanup() { cleanupTestData(); } void initTestCase(); void cleanupTestCase(); @@ -487,6 +486,8 @@ private Q_SLOTS: // NOTE: This test must be last! void parentingRepliesToTheApp(); private: + void cleanupTestData(); + QString testDataDir; bool notEnoughDataForFastSender; }; @@ -1499,6 +1500,8 @@ void tst_QNetworkReply::initTestCase() echoProcessDir = QFINDTESTDATA("echo"); QVERIFY2(!echoProcessDir.isEmpty(), qPrintable( QString::fromLatin1("Couldn't find echo dir starting from %1.").arg(QDir::currentPath()))); + + cleanupTestData(); } void tst_QNetworkReply::cleanupTestCase() @@ -1514,12 +1517,7 @@ void tst_QNetworkReply::cleanupTestCase() #endif } -void tst_QNetworkReply::init() -{ - cleanup(); -} - -void tst_QNetworkReply::cleanup() +void tst_QNetworkReply::cleanupTestData() { QFile file(testFileName); QVERIFY(!file.exists() || file.remove()); |