Merge remote-tracking branch 'origin/11.0'

Change-Id: I8d1c9720a868da02b3157a48954eb4e262539c84
This commit is contained in:
Eike Ziller
2023-06-15 09:48:58 +02:00
67 changed files with 1046 additions and 376 deletions

View File

@@ -217,17 +217,6 @@ public:
return type == TypeRemoved ? BehaviorSilent : IDocument::reloadBehavior(state, type);
}
bool save(QString *errorString, const Utils::FilePath &filePath, bool autoSave) override
{
QTC_ASSERT(!autoSave, return true); // bineditor does not support autosave - it would be a bit expensive
const FilePath &fileNameToUse = filePath.isEmpty() ? this->filePath() : filePath;
if (m_widget->save(errorString, this->filePath(), fileNameToUse)) {
setFilePath(fileNameToUse);
return true;
}
return false;
}
OpenResult open(QString *errorString, const FilePath &filePath,
const FilePath &realFilePath) override
{
@@ -320,6 +309,18 @@ public:
return success;
}
protected:
bool saveImpl(QString *errorString, const Utils::FilePath &filePath, bool autoSave) override
{
QTC_ASSERT(!autoSave, return true); // bineditor does not support autosave - it would be a bit expensive
const FilePath &fileNameToUse = filePath.isEmpty() ? this->filePath() : filePath;
if (m_widget->save(errorString, this->filePath(), fileNameToUse)) {
setFilePath(fileNameToUse);
return true;
}
return false;
}
private:
BinEditorWidget *m_widget;
};