Editors: Remove BaseTextEditorWidget::setBaseTextDocument

First step in never changing the text document after construction,
because that is actually not really supported.
Second step will be to fix that for the editor duplicate() methods too.

Change-Id: I3d112ba0895e7ee7ac6dd8ae2318f0de7d2cebc9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Eike Ziller
2014-01-09 14:47:00 +01:00
parent 498d198104
commit a3608f595a
11 changed files with 38 additions and 35 deletions

View File

@@ -96,14 +96,12 @@ Project *androidProject(const QString &file)
} // anonymous namespace
AndroidManifestEditorWidget::AndroidManifestEditorWidget(QWidget *parent)
: TextEditor::PlainTextEditorWidget(parent),
: TextEditor::PlainTextEditorWidget(new AndroidManifestDocument(this), parent),
m_dirty(false),
m_stayClean(false),
m_setAppName(false),
m_appNameInStringsXml(false)
{
setBaseTextDocument(QSharedPointer<AndroidManifestDocument>(new AndroidManifestDocument(this)));
configure(QLatin1String(Constants::ANDROID_MANIFEST_MIME_TYPE));
initializePage();
@@ -126,7 +124,6 @@ TextEditor::BaseTextEditor *AndroidManifestEditorWidget::createEditor()
return new AndroidManifestEditor(this);
}
void AndroidManifestEditorWidget::initializePage()
{
QWidget *mainWidget = new QWidget(this);