From c9cf3d146411974659dc56fb8ebc64d521e188d1 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 17 Oct 2013 15:47:15 +0200 Subject: [PATCH] TextEditors: Fix document changed indicator in case of splits Since the changed signal was moved from the editor to the document, we now need to set up all the connections in the setupDocumentSignals. Otherwise split editors, which get a different document after creation, do no longer set up the right connections. Task-number: QTCREATORBUG-10301 Change-Id: Ifc7b426abf87ab73ea37379c1a55e5af2005fc43 Reviewed-by: David Schulz --- src/plugins/texteditor/basetexteditor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index beb49cb46d5..a05df114a2c 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -498,8 +498,6 @@ BaseTextEditor *BaseTextEditorWidget::editor() const d->m_codeAssistant->configure(d->m_editor); connect(this, SIGNAL(textChanged()), d->m_editor, SIGNAL(contentsChanged())); - connect(this, SIGNAL(changed()), - d->m_editor->document(), SIGNAL(changed())); connect(qobject_cast(d->m_editor->document()),SIGNAL(mimeTypeChanged()), d->m_codeAssistant.data(), SLOT(reconfigure())); } @@ -2476,6 +2474,7 @@ void BaseTextEditorWidgetPrivate::setupDocumentSignals(const QSharedPointerdisconnect(oldDocument->document(), 0, q, 0); q->disconnect(oldDocument.data(), 0, q, 0); + q->disconnect(q, 0, oldDocument.data(), 0); } QTextDocument *doc = document->document(); @@ -2498,6 +2497,7 @@ void BaseTextEditorWidgetPrivate::setupDocumentSignals(const QSharedPointer