diff options
author | David Schulz <[email protected]> | 2023-08-11 14:41:14 +0200 |
---|---|---|
committer | David Schulz <[email protected]> | 2023-08-11 14:08:04 +0000 |
commit | 7bb49b58df0431e8c4a65319a58e713c58957647 (patch) | |
tree | 774cfa27f63d3a5bcd464177ff83debde3906855 | |
parent | 28754ba08a63eca4b836c7b11892444aeeff5c88 (diff) |
Core: fix IDocuments aboutToSave and saved filePathv11.0.2
The function emiting those signals can be called with an empty file
path. Use the document file path in this case like in
TextDocument::saveImpl.
Change-Id: I9e3381999a25c49df1d5db060ef5467b12220ad4
Reviewed-by: Christian Kandeler <[email protected]>
-rw-r--r-- | src/plugins/coreplugin/idocument.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/idocument.cpp b/src/plugins/coreplugin/idocument.cpp index 5dcff9d3fc1..7be7e410116 100644 --- a/src/plugins/coreplugin/idocument.cpp +++ b/src/plugins/coreplugin/idocument.cpp @@ -343,10 +343,10 @@ IDocument::OpenResult IDocument::open(QString *errorString, const Utils::FilePat */ bool IDocument::save(QString *errorString, const Utils::FilePath &filePath, bool autoSave) { - emit aboutToSave(filePath, autoSave); + emit aboutToSave(filePath.isEmpty() ? this->filePath() : filePath, autoSave); const bool success = saveImpl(errorString, filePath, autoSave); if (success) - emit saved(filePath, autoSave); + emit saved(filePath.isEmpty() ? this->filePath() : filePath, autoSave); return success; } |