From 82c3c9d45d5fad0ed18e096f09729579a0902a71 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Wed, 8 Nov 2017 13:58:19 +0100 Subject: Fix tst_QFile::handle for systems using builtin test data To obtain the file's handle, we need to obtain it from the extracted test data instead of qrc. Change-Id: I89c5c3f3a7da7e36205a439581a6d83efffdc07c Reviewed-by: Maurice Kalinowski Reviewed-by: Friedemann Kleint --- tests/auto/corelib/io/qfile/tst_qfile.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/auto/corelib/io/qfile/tst_qfile.cpp') diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index 8a3d490925..16a3cfd766 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -445,8 +445,6 @@ void tst_QFile::initTestCase() m_stdinProcessDir = QFINDTESTDATA("stdinprocess"); QVERIFY(!m_stdinProcessDir.isEmpty()); #endif - m_testSourceFile = QFINDTESTDATA("tst_qfile.cpp"); - QVERIFY(!m_testSourceFile.isEmpty()); m_testLogFile = QFINDTESTDATA("testlog.txt"); QVERIFY(!m_testLogFile.isEmpty()); m_dosFile = QFINDTESTDATA("dosfile.txt"); @@ -459,12 +457,15 @@ void tst_QFile::initTestCase() QVERIFY(!m_twoDotsFile.isEmpty()); #ifndef BUILTIN_TESTDATA + m_testSourceFile = QFINDTESTDATA("tst_qfile.cpp"); + QVERIFY(!m_testSourceFile.isEmpty()); m_testFile = QFINDTESTDATA("testfile.txt"); QVERIFY(!m_testFile.isEmpty()); #else m_dataDir = QEXTRACTTESTDATA("/"); QVERIFY2(!m_dataDir.isNull(), qPrintable("Could not extract test data")); m_testFile = m_dataDir->path() + "/testfile.txt"; + m_testSourceFile = m_dataDir->path() + "/tst_qfile.cpp"; #endif m_resourcesDir = QFINDTESTDATA("resources"); QVERIFY(!m_resourcesDir.isEmpty()); -- cgit v1.2.3