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

View File

@@ -197,6 +197,7 @@ private:
bool isLocatedAt(const QString &fileName, int lineNumber, bool isLocatedAt(const QString &fileName, int lineNumber,
bool useMarkerPosition) const; bool useMarkerPosition) const;
void updateMarker(BreakpointModelId id); void updateMarker(BreakpointModelId id);
void updateMarkerIcon();
QString toToolTip() const; QString toToolTip() const;
QString markerFileName() const; QString markerFileName() const;
int markerLineNumber() const; int markerLineNumber() const;