TextEditor: Move highlighting support from Plain to Base

Goal is to squash the 'Plain' layer.

Change-Id: I2513de57fbbc09e9d0d9d4f1eb008dced76038f0
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
hjk
2014-07-30 10:04:01 +02:00
parent 1da1eec513
commit fde176e51c
5 changed files with 74 additions and 86 deletions

View File

@@ -43,7 +43,7 @@
#include <coreplugin/mimedatabase.h>
#include <texteditor/basetextdocument.h>
#include <texteditor/plaintexteditor.h>
#include <texteditor/basetexteditor.h>
#include <utils/qtcassert.h>
@@ -257,8 +257,8 @@ void DisassemblerAgentPrivate::configureMimeType()
MimeType mtype = MimeDatabase::findByType(mimeType);
if (mtype) {
foreach (IEditor *editor, DocumentModel::editorsForDocument(document))
if (PlainTextEditorWidget *widget = qobject_cast<PlainTextEditorWidget *>(editor->widget()))
widget->configure(mtype);
if (BaseTextEditorWidget *widget = qobject_cast<BaseTextEditorWidget *>(editor->widget()))
widget->configureMimeType(mtype);
} else {
qWarning("Assembler mimetype '%s' not found.", qPrintable(mimeType));
}