forked from qt-creator/qt-creator
Utils: filepathify TextFileFormat
Change-Id: I6a4e2d38b0bbdec661a4a492901d9182a9f2e502 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -770,12 +770,12 @@ QPair<ProFile *, QStringList> QmakePriFile::readProFile()
|
||||
QString contents;
|
||||
{
|
||||
QString errorMsg;
|
||||
if (TextFileFormat::readFile(
|
||||
filePath().toString(),
|
||||
Core::EditorManager::defaultTextCodec(),
|
||||
&contents,
|
||||
&m_textFormat,
|
||||
&errorMsg) != TextFileFormat::ReadSuccess) {
|
||||
if (TextFileFormat::readFile(filePath(),
|
||||
Core::EditorManager::defaultTextCodec(),
|
||||
&contents,
|
||||
&m_textFormat,
|
||||
&errorMsg)
|
||||
!= TextFileFormat::ReadSuccess) {
|
||||
QmakeBuildSystem::proFileParseError(errorMsg, filePath());
|
||||
return qMakePair(includeFile, lines);
|
||||
}
|
||||
@@ -932,7 +932,7 @@ void QmakePriFile::save(const QStringList &lines)
|
||||
QTC_ASSERT(m_textFormat.codec, return);
|
||||
FileChangeBlocker changeGuard(filePath().toString());
|
||||
QString errorMsg;
|
||||
if (!m_textFormat.writeFile(filePath().toString(), lines.join('\n'), &errorMsg)) {
|
||||
if (!m_textFormat.writeFile(filePath(), lines.join('\n'), &errorMsg)) {
|
||||
QMessageBox::critical(Core::ICore::dialogParent(), QCoreApplication::translate(
|
||||
"QmakePriFile", "File Error"), errorMsg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user