forked from qt-creator/qt-creator
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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user