tst_QFile::moveToTrash: use QDir::tempPath() for the rows w/ "temporary"
Both QTemporaryFile and QTemporaryDir are documented to use the current directory if given a pattern. That can be anything & arbitrary, so it doesn't give us consistency in checking. Moreover, it might be a read- only directory. Drive-by fix the number of 'X'. Task-number: QTBUG-117449 Pick-to: 6.6 Change-Id: Ifeb6206a9fa04424964bfffd178841c44e9636a0 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>bb10
parent
ef22527bf5
commit
a40341366f
|
|
@ -3945,13 +3945,13 @@ void tst_QFile::moveToTrash_data()
|
|||
|
||||
// success cases
|
||||
{
|
||||
QTemporaryFile temp("tst_qfile-moveToTrash-XXXXX");
|
||||
QTemporaryFile temp(QDir::tempPath() + "/tst_qfile-moveToTrash-XXXXXX");
|
||||
if (!temp.open())
|
||||
QSKIP("Failed to create temporary file!");
|
||||
QTest::newRow("temporary file") << temp.fileName() << true << true;
|
||||
}
|
||||
{
|
||||
QTemporaryDir tempDir("tst_qfile-moveToTrash-XXXXX");
|
||||
QTemporaryDir tempDir(QDir::tempPath() + "/tst_qfile-moveToTrash-XXXXXX");
|
||||
if (!tempDir.isValid())
|
||||
QSKIP("Failed to create temporary directory!");
|
||||
tempDir.setAutoRemove(false);
|
||||
|
|
|
|||
Loading…
Reference in New Issue