Manifest, pro file and CMake editor can have fixed mime type set

Can be set directly from the document constructor, no need to do that
later.

Change-Id: I4326757e1b1cb1e48c157c4b330ccb2abb8f3b1f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Eike Ziller
2014-01-08 14:03:40 +01:00
parent c72546fb4e
commit 4ae7d5cd1b
4 changed files with 5 additions and 7 deletions

View File

@@ -44,6 +44,7 @@ AndroidManifestDocument::AndroidManifestDocument(AndroidManifestEditorWidget *ed
: TextEditor::BaseTextDocument(),
m_editorWidget(editorWidget)
{
setMimeType(QLatin1String(Constants::ANDROID_MANIFEST_MIME_TYPE));
}
bool AndroidManifestDocument::save(QString *errorString, const QString &fileName, bool autoSave)

View File

@@ -102,9 +102,7 @@ AndroidManifestEditorWidget::AndroidManifestEditorWidget(QWidget *parent)
m_setAppName(false),
m_appNameInStringsXml(false)
{
QSharedPointer<AndroidManifestDocument> doc(new AndroidManifestDocument(this));
doc->setMimeType(QLatin1String(Constants::ANDROID_MANIFEST_MIME_TYPE));
setBaseTextDocument(doc);
setBaseTextDocument(QSharedPointer<AndroidManifestDocument>(new AndroidManifestDocument(this)));
configure(QLatin1String(Constants::ANDROID_MANIFEST_MIME_TYPE));