BreakpointMarkes, simplfy icon updates

Change-Id: I0439d97196cc96b770c77ffc7ce474a76f3b2d94
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Daniel Teske
2012-03-08 14:00:26 +01:00
committed by hjk
parent 41f4c1fab4
commit 8f4f601b67
2 changed files with 9 additions and 4 deletions

View File

@@ -744,8 +744,7 @@ void BreakHandler::setEnabled(BreakpointModelId id, bool on)
if (it->data.enabled == on)
return;
it->data.enabled = on;
it->destroyMarker();
it->updateMarker(id);
it->updateMarkerIcon();
if (it->engine) {
it->state = BreakpointChangeRequested;
scheduleSynchronization();
@@ -780,8 +779,7 @@ void BreakHandler::setTracepoint(BreakpointModelId id, bool on)
if (it->data.tracepoint == on)
return;
it->data.tracepoint = on;
it->destroyMarker();
it->updateMarker(id);
it->updateMarkerIcon();
if (it->engine) {
it->state = BreakpointChangeRequested;
@@ -1414,6 +1412,12 @@ bool BreakHandler::BreakpointItem::isLocatedAt
|| fileNameMatch(fileName, markerFileName()));
}
void BreakHandler::BreakpointItem::updateMarkerIcon()
{
marker->setIcon(icon());
marker->updateMarker();
}
void BreakHandler::BreakpointItem::updateMarker(BreakpointModelId id)
{
QString file = markerFileName();