debugger: improve stepping performance in "instructionwise" mode.

Formatting of disassembler view took too much time.
This commit is contained in:
hjk
2010-11-19 09:14:08 +01:00
parent 0400339290
commit 8cd704b57a
2 changed files with 23 additions and 27 deletions

View File

@@ -300,18 +300,20 @@ void DisassemblerViewAgentPrivate::configureMimeType()
{
QTC_ASSERT(editor, return);
TextEditor::BaseTextDocument *doc = qobject_cast<TextEditor::BaseTextDocument *>(editor->file());
TextEditor::BaseTextDocument *doc =
qobject_cast<TextEditor::BaseTextDocument *>(editor->file());
QTC_ASSERT(doc, return);
doc->setMimeType(mimeType);
TextEditor::PlainTextEditor *pe = qobject_cast<TextEditor::PlainTextEditor *>(editor->widget());
TextEditor::PlainTextEditor *pe =
qobject_cast<TextEditor::PlainTextEditor *>(editor->widget());
QTC_ASSERT(pe, return);
if (const MimeType mtype = ICore::instance()->mimeDatabase()->findByType(mimeType)) {
MimeType mtype = ICore::instance()->mimeDatabase()->findByType(mimeType);
if (mtype)
pe->configure(mtype);
} else {
else
qWarning("Assembler mimetype '%s' not found.", qPrintable(mimeType));
}
}
QString DisassemblerViewAgent::mimeType() const