tst_QXmlStream::writerHangs(): Create file in temporary directory
A test should not write to its directory. Change-Id: I34dfc36387cf5a637b325be29c8a19ff51d9b9c3 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This commit is contained in:
parent
eef3afaa97
commit
e830fa8fc2
@ -905,7 +905,8 @@ void tst_QXmlStream::testFalsePrematureError() const
|
||||
// Regression test for crash due to using empty QStack.
|
||||
void tst_QXmlStream::writerHangs() const
|
||||
{
|
||||
QFile file("test.xml");
|
||||
QTemporaryDir dir(QDir::tempPath() + QLatin1String("/tst_qxmlstream.XXXXXX"));
|
||||
QFile file(dir.path() + "/test.xml");
|
||||
|
||||
QVERIFY(file.open(QIODevice::WriteOnly));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user