summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2023-09-21 18:22:22 -0700
committerThiago Macieira <thiago.macieira@intel.com>2023-09-23 08:18:24 -0700
commit610b26b819c7963dfeebf3e073562a51554acc9e (patch)
treefa427caad194050fd38b4c52defc3645985759e8 /tests/auto/corelib/io
parent6e4d9ff74d518d81842936be1c905b71b67e1352 (diff)
tst_QFile::moveToTrash: include the test name in the tempfile templates
Makes it easier to locate later which test may be leaking stuff. Pick-to: 6.6 Change-Id: I9d43e5b91eb142d6945cfffd178713f869752761 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/corelib/io')
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index 68138df3fb..a668a6345b 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -3919,13 +3919,13 @@ void tst_QFile::moveToTrash_data()
// success cases
{
- QTemporaryFile temp;
+ QTemporaryFile temp("tst_qfile-moveToTrash-XXXXX");
if (!temp.open())
QSKIP("Failed to create temporary file!");
QTest::newRow("temporary file") << temp.fileName() << true << true;
}
{
- QTemporaryDir tempDir;
+ QTemporaryDir tempDir("tst_qfile-moveToTrash-XXXXX");
if (!tempDir.isValid())
QSKIP("Failed to create temporary directory!");
tempDir.setAutoRemove(false);
@@ -3934,11 +3934,11 @@ void tst_QFile::moveToTrash_data()
<< true << true;
}
{
- QTemporaryDir homeDir(QDir::homePath() + QLatin1String("/XXXXXX"));
+ QTemporaryDir homeDir(QDir::homePath() + QLatin1String("/tst_qfile.moveToTrash-XXXXXX"));
if (!homeDir.isValid())
QSKIP("Failed to create temporary directory in $HOME!");
QTemporaryFile homeFile(homeDir.path()
- + QLatin1String("/tst_qfile-XXXXXX"));
+ + QLatin1String("/tst_qfile-moveToTrash-XXXXX"));
if (!homeFile.open())
QSKIP("Failed to create temporary file in $HOME");
homeDir.setAutoRemove(false);
@@ -3950,7 +3950,7 @@ void tst_QFile::moveToTrash_data()
<< homeDir.path() + QLatin1Char('/')
<< true << true;
}
- QTest::newRow("relative") << QStringLiteral("tst_qfile_moveToTrash.tmp") << true << true;
+ QTest::newRow("relative") << QStringLiteral("tst_qfile-moveToTrash.tmp") << true << true;
// failure cases
QTest::newRow("root") << QDir::rootPath() << false << false;