forked from qt-creator/qt-creator
Unit test: Fix build
Amends a13aef759e
.
Change-Id: I07fbb52b741a765fc9aa92f4f4752890b581ed35
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -52,11 +52,13 @@ protected:
|
||||
const QString newFileName = temporaryDir.filePath(QFileInfo(yamlFilePath).fileName());
|
||||
|
||||
Utils::FileReader reader;
|
||||
if (QTC_GUARD(reader.fetch(yamlFilePath, QIODevice::ReadOnly | QIODevice::Text))) {
|
||||
if (QTC_GUARD(reader.fetch(Utils::FilePath::fromString(yamlFilePath),
|
||||
QIODevice::ReadOnly | QIODevice::Text))) {
|
||||
QByteArray contents = reader.data();
|
||||
contents.replace("FILE_PATH", filePathToInject.toLocal8Bit());
|
||||
|
||||
Utils::FileSaver fileSaver(newFileName, QIODevice::WriteOnly | QIODevice::Text);
|
||||
Utils::FileSaver fileSaver(Utils::FilePath::fromString(newFileName),
|
||||
QIODevice::WriteOnly | QIODevice::Text);
|
||||
QTC_CHECK(fileSaver.write(contents));
|
||||
QTC_CHECK(fileSaver.finalize());
|
||||
}
|
||||
|
Reference in New Issue
Block a user