diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-08-28 14:01:47 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-08-31 07:38:44 +0000 |
commit | 4d6bb01c6f3e934e22673498b0efea36ea5c3191 (patch) | |
tree | 26275f146468e92cf12995d3e877815ff6155cc7 /src/lib/corelib/tools/tst_tools.cpp | |
parent | 69cb795f601c5611f554189db43f2cc5fb6e4deb (diff) |
Fix fileCaseCheck() autotest.
It used the (random) working directory to create a temporary file, which
is not guaranteed to work. E.g. on one test machine it was on a read-
only file system.
Change-Id: I186771c921bce4dfbc988097d70e106abfaf308f
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Diffstat (limited to 'src/lib/corelib/tools/tst_tools.cpp')
-rw-r--r-- | src/lib/corelib/tools/tst_tools.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/corelib/tools/tst_tools.cpp b/src/lib/corelib/tools/tst_tools.cpp index 13486c4a1..b2066e690 100644 --- a/src/lib/corelib/tools/tst_tools.cpp +++ b/src/lib/corelib/tools/tst_tools.cpp @@ -85,8 +85,8 @@ void TestTools::testFileInfo() void TestTools::fileCaseCheck() { - QTemporaryFile tempFile(QLatin1String("CamelCase")); - QVERIFY(tempFile.open()); + QTemporaryFile tempFile(QDir::tempPath() + QLatin1String("/CamelCase")); + QVERIFY2(tempFile.open(), qPrintable(tempFile.errorString())); QFileInfo tempFileInfo(tempFile.fileName()); const QString lowerFilePath = tempFileInfo.absolutePath() + QLatin1Char('/') + tempFileInfo.fileName().toLower(); |