Move markableInterface() to ITextEditorDocument

And remove the indirection over BaseTextEditorWidget.

Change-Id: I2c570edf46b9ca72a11704ce27d8ae3f2218dcf0
Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
Eike Ziller
2013-12-09 16:54:31 +01:00
parent 890f72160c
commit 18313bdb33
8 changed files with 20 additions and 33 deletions

View File

@@ -137,7 +137,7 @@ void SourceAgent::updateLocationMarker()
QTC_ASSERT(d->editor, return);
if (d->locationMark)
d->editor->markableInterface()->removeMark(d->locationMark);
d->editor->textDocument()->markableInterface()->removeMark(d->locationMark);
delete d->locationMark;
d->locationMark = 0;
if (d->engine->stackHandler()->currentFrame().file == d->path) {
@@ -145,7 +145,7 @@ void SourceAgent::updateLocationMarker()
d->locationMark = new TextEditor::ITextMark(lineNumber);
d->locationMark->setIcon(debuggerCore()->locationMarkIcon());
d->locationMark->setPriority(TextEditor::ITextMark::HighPriority);
d->editor->markableInterface()->addMark(d->locationMark);
d->editor->textDocument()->markableInterface()->addMark(d->locationMark);
QPlainTextEdit *plainTextEdit = qobject_cast<QPlainTextEdit *>(d->editor->widget());
QTC_ASSERT(plainTextEdit, return);
QTextCursor tc = plainTextEdit->textCursor();