BaseTextMark: Use (explicit) two phase initilization

Fixes a bug where the text in the bookmarks view is missing on initial
adding a bookmark.

Change-Id: Iefbf05e6124c0b4e911aa8d67beaa82ceeac8e21
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Daniel Teske
2012-05-02 14:33:28 +02:00
parent 8b37921bc5
commit d9a5385aa5
6 changed files with 23 additions and 5 deletions

View File

@@ -1439,8 +1439,10 @@ void BreakHandler::BreakpointItem::updateMarker(BreakpointModelId id)
if (marker && (file != marker->fileName() || line != marker->lineNumber()))
destroyMarker();
if (!marker && !file.isEmpty() && line > 0)
if (!marker && !file.isEmpty() && line > 0) {
marker = new BreakpointMarker(id, file, line);
marker->init();
}
}
QIcon BreakHandler::BreakpointItem::icon() const