Remove the need to register editors in the action handler

The action handler already knows which editors to handle through the
context. It only needs to receive signals for updating the actions from
the current editor. So there is no need to tell the action handler about
every individual editor. This also removes some noise from the text
editor implementations.

Change-Id: I76dc5b1559cc8cf54ff313e6cdba4e789a3108aa
Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
Eike Ziller
2013-12-10 15:54:20 +01:00
parent 3ee9fb4d1c
commit 3d1b70c58e
33 changed files with 93 additions and 218 deletions

View File

@@ -95,7 +95,7 @@ Project *androidProject(const QString &file)
} // anonymous namespace
AndroidManifestEditorWidget::AndroidManifestEditorWidget(QWidget *parent, TextEditor::TextEditorActionHandler *ah)
AndroidManifestEditorWidget::AndroidManifestEditorWidget(QWidget *parent)
: TextEditor::PlainTextEditorWidget(parent),
m_dirty(false),
m_stayClean(false),
@@ -106,7 +106,6 @@ AndroidManifestEditorWidget::AndroidManifestEditorWidget(QWidget *parent, TextEd
doc->setMimeType(QLatin1String(Constants::ANDROID_MANIFEST_MIME_TYPE));
setBaseTextDocument(doc);
ah->setupActions(this);
configure(QLatin1String(Constants::ANDROID_MANIFEST_MIME_TYPE));
initializePage();