aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/designer
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2023-06-13 15:00:15 +0200
committerDavid Schulz <david.schulz@qt.io>2023-06-15 07:19:39 +0000
commit95609551a1bba880adc7aff0258c4ba9c55a6ae8 (patch)
treeabe93266824d63cfee872458934aabc8b068d395 /src/plugins/designer
parent16bfc82ef08a053bcdd1c0f8688c70aab2361ba6 (diff)
Core: add aboutToSave and saved signal to IDocument
We need reliable signals that gets emitted when documents are saved to inform the language server about the document state change. Change-Id: I0a1e8a5317ae6984ff17d878952c74f69765e3f9 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/designer')
-rw-r--r--src/plugins/designer/formwindowfile.cpp2
-rw-r--r--src/plugins/designer/formwindowfile.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/designer/formwindowfile.cpp b/src/plugins/designer/formwindowfile.cpp
index caad3c1c7e1..7ab08540933 100644
--- a/src/plugins/designer/formwindowfile.cpp
+++ b/src/plugins/designer/formwindowfile.cpp
@@ -82,7 +82,7 @@ Core::IDocument::OpenResult FormWindowFile::open(QString *errorString,
return OpenResult::Success;
}
-bool FormWindowFile::save(QString *errorString, const FilePath &filePath, bool autoSave)
+bool FormWindowFile::saveImpl(QString *errorString, const FilePath &filePath, bool autoSave)
{
const FilePath &actualName = filePath.isEmpty() ? this->filePath() : filePath;
diff --git a/src/plugins/designer/formwindowfile.h b/src/plugins/designer/formwindowfile.h
index 8110d72b991..a392e1ee59a 100644
--- a/src/plugins/designer/formwindowfile.h
+++ b/src/plugins/designer/formwindowfile.h
@@ -28,7 +28,6 @@ public:
// IDocument
OpenResult open(QString *errorString, const Utils::FilePath &filePath,
const Utils::FilePath &realFilePath) override;
- bool save(QString *errorString, const Utils::FilePath &filePath, bool autoSave) override;
QByteArray contents() const override;
bool setContents(const QByteArray &contents) override;
bool shouldAutoSave() const override;
@@ -52,6 +51,9 @@ public:
void setShouldAutoSave(bool sad = true) { m_shouldAutoSave = sad; }
void updateIsModified();
+protected:
+ bool saveImpl(QString *errorString, const Utils::FilePath &filePath, bool autoSave) override;
+
private:
void slotFormWindowRemoved(QDesignerFormWindowInterface *w);