forked from qt-creator/qt-creator
Use FileChangeBlocker
Use FileChangeBlocker over expecting/unexpecting file changes manually. Change-Id: I8428841f966d81be477260416c75e91dee795425 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -649,7 +649,7 @@ bool PythonProject::saveRawFileList(const QStringList &rawFileList)
|
||||
|
||||
bool PythonProject::saveRawList(const QStringList &rawList, const QString &fileName)
|
||||
{
|
||||
DocumentManager::expectFileChange(fileName);
|
||||
FileChangeBlocker changeGuarg(fileName);
|
||||
// Make sure we can open the file for writing
|
||||
FileSaver saver(fileName, QIODevice::Text);
|
||||
if (!saver.hasError()) {
|
||||
@@ -659,7 +659,6 @@ bool PythonProject::saveRawList(const QStringList &rawList, const QString &fileN
|
||||
saver.setResult(&stream);
|
||||
}
|
||||
bool result = saver.finalize(ICore::mainWindow());
|
||||
DocumentManager::unexpectFileChange(fileName);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user