diff options
author | hjk <hjk121@nokiamail.com> | 2014-09-03 13:10:57 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2014-09-04 10:15:40 +0200 |
commit | 2e17339b05028dee540cc6da6a481229e98224be (patch) | |
tree | bb2fb583dd7c5a163fa804e0938c7b590bdc560c /src/plugins/pythoneditor/pythoneditor.cpp | |
parent | 480efb025424f854b9f02f56921346f99ac562a2 (diff) | |
download | qt-creator-2e17339b05028dee540cc6da6a481229e98224be.tar.gz |
TextEditor: Reset mimetype after open() in all BaseTextEditors
This was already done in all major editors and should not harm
all others.
Change-Id: I7e19d285c4b85419a9a1f9afa961addecf682eaf
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src/plugins/pythoneditor/pythoneditor.cpp')
-rw-r--r-- | src/plugins/pythoneditor/pythoneditor.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/plugins/pythoneditor/pythoneditor.cpp b/src/plugins/pythoneditor/pythoneditor.cpp index 683de096a2..d7423df5f1 100644 --- a/src/plugins/pythoneditor/pythoneditor.cpp +++ b/src/plugins/pythoneditor/pythoneditor.cpp @@ -33,47 +33,18 @@ #include "tools/pythonindenter.h" #include "tools/pythonhighlighter.h" -#include <coreplugin/editormanager/editormanager.h> -#include <coreplugin/icore.h> -#include <coreplugin/mimedatabase.h> - #include <texteditor/texteditoractionhandler.h> -#include <texteditor/fontsettings.h> #include <texteditor/texteditorconstants.h> #include <texteditor/basetextdocument.h> -#include <texteditor/indenter.h> -#include <texteditor/autocompleter.h> #include <utils/qtcassert.h> -#include <QFileInfo> - using namespace TextEditor; namespace PythonEditor { namespace Internal { // -// PythonEditor -// - -class PythonEditor : public BaseTextEditor -{ -public: - PythonEditor() - { - } - - bool open(QString *errorString, const QString &fileName, const QString &realFileName) - { - Core::MimeType mimeType = Core::MimeDatabase::findByFile(QFileInfo(fileName)); - textDocument()->setMimeType(mimeType.type()); - return BaseTextEditor::open(errorString, fileName, realFileName); - } -}; - - -// // PythonEditorWidget // @@ -105,7 +76,6 @@ PythonEditorFactory::PythonEditorFactory() setDocumentCreator([]() { return new BaseTextDocument(Constants::C_PYTHONEDITOR_ID); }); setEditorWidgetCreator([]() { return new PythonEditorWidget; }); - setEditorCreator([]() { return new PythonEditor; }); setIndenterCreator([]() { return new PythonIndenter; }); setSyntaxHighlighterCreator([]() { return new PythonHighlighter; }); setCommentStyle(Utils::CommentDefinition::HashStyle); |