Merge ITextMark and BaseTextMark

Turns out we don't even need two-phase initialization,
by transparently postponing registration until we get
a non-empty file name, either at constuction, or at
file name change times.

Change-Id: I3e87e47c820066e6707e946fc474ab9c1993e61f
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
hjk
2014-07-19 11:27:28 +02:00
parent 53bfd5285d
commit cf8a614419
32 changed files with 265 additions and 372 deletions

View File

@@ -307,7 +307,7 @@ public:
DisassemblerAgent m_disassemblerAgent;
MemoryAgent m_memoryAgent;
QScopedPointer<TextEditor::BaseTextMark> m_locationMark;
QScopedPointer<TextEditor::TextMark> m_locationMark;
QTimer m_locationTimer;
bool m_isStateDebugging;
@@ -565,10 +565,9 @@ void DebuggerEngine::gotoLocation(const Location &loc)
editor->document()->setProperty(Constants::OPENED_BY_DEBUGGER, true);
if (loc.needsMarker()) {
d->m_locationMark.reset(new TextEditor::BaseTextMark(file, line));
d->m_locationMark.reset(new TextEditor::TextMark(file, line));
d->m_locationMark->setIcon(debuggerCore()->locationMarkIcon());
d->m_locationMark->setPriority(TextEditor::ITextMark::HighPriority);
d->m_locationMark->init();
d->m_locationMark->setPriority(TextEditor::TextMark::HighPriority);
}
//qDebug() << "MEMORY: " << d->m_memoryAgent.hasVisibleEditor();