forked from qt-creator/qt-creator
QmlDesigner: Write annotations if file is saved
Change-Id: I729205715493f65b83e2de6f09d3d968187afe7a Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -552,6 +552,16 @@ void DesignDocument::setEditor(Core::IEditor *editor)
|
|||||||
{
|
{
|
||||||
m_textEditor = editor;
|
m_textEditor = editor;
|
||||||
// if the user closed the file explicit we do not want to do anything with it anymore
|
// if the user closed the file explicit we do not want to do anything with it anymore
|
||||||
|
|
||||||
|
|
||||||
|
connect(Core::EditorManager::instance(), &Core::EditorManager::aboutToSave,
|
||||||
|
this, [this](Core::IDocument *document) {
|
||||||
|
if (m_textEditor && m_textEditor->document() == document) {
|
||||||
|
if (m_documentModel && m_documentModel->rewriterView())
|
||||||
|
m_documentModel->rewriterView()->writeAuxiliaryData();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
connect(Core::EditorManager::instance(), &Core::EditorManager::editorAboutToClose,
|
connect(Core::EditorManager::instance(), &Core::EditorManager::editorAboutToClose,
|
||||||
this, [this](Core::IEditor *editor) {
|
this, [this](Core::IEditor *editor) {
|
||||||
if (m_textEditor.data() == editor)
|
if (m_textEditor.data() == editor)
|
||||||
|
Reference in New Issue
Block a user