type BreakHandler::getter(BreakpointId id) const \
{ \
ConstIterator it = m_storage.find(id); \
- QTC_ASSERT(it != m_storage.end(), return type()); \
+ QTC_ASSERT(it != m_storage.end(), \
+ qDebug() << "ID" << id << "NOT KNOWN"; \
+ return type()); \
return it->data.getter(); \
}
void BreakHandler::setter(BreakpointId id, const type &value) \
{ \
Iterator it = m_storage.find(id); \
- QTC_ASSERT(it != m_storage.end(), return); \
+ QTC_ASSERT(it != m_storage.end(), \
+ qDebug() << "ID" << id << "NOT KNOWN"; return); \
if (it->data.setter(value)) \
scheduleSynchronization(); \
}
PROPERTY(QString, fileName, setFileName)
PROPERTY(QString, functionName, setFunctionName)
PROPERTY(int, markerLineNumber, setMarkerLineNumber)
-PROPERTY(bool, isEnabled, setEnabled)
PROPERTY(BreakpointType, type, setType)
PROPERTY(QByteArray, threadSpec, setThreadSpec)
PROPERTY(QByteArray, condition, setCondition)
PROPERTY(quint64, address, setAddress)
PROPERTY(int, ignoreCount, setIgnoreCount)
+bool BreakHandler::isEnabled(BreakpointId id) const
+{
+ ConstIterator it = m_storage.find(id);
+ QTC_ASSERT(it != m_storage.end(), return BreakpointDead);
+ return it->data.isEnabled();
+}
+
+void BreakHandler::setEnabled(BreakpointId id, bool on)
+{
+ Iterator it = m_storage.find(id);
+ QTC_ASSERT(it != m_storage.end(), return);
+ //qDebug() << "SET ENABLED: " << id << it->data.isEnabled() << on;
+ if (it->data.setEnabled(on)) {
+ it->destroyMarker();
+ updateMarker(id);
+ scheduleSynchronization();
+ }
+}
+
BreakpointState BreakHandler::state(BreakpointId id) const
{
ConstIterator it = m_storage.find(id);
QIcon BreakHandler::icon(BreakpointId id) const
{
- //if (!m_handler->isActive())
- // return m_handler->emptyIcon();
ConstIterator it = m_storage.find(id);
QTC_ASSERT(it != m_storage.end(), return pendingBreakPointIcon());
- //if (!isActive())
- // return emptyIcon();
- switch (it->state) {
- case BreakpointInserted:
+ if (!it->data.isEnabled())
+ return m_disabledBreakpointIcon;
+ if (it->state == BreakpointInserted)
return breakpointIcon();
- default:
- return pendingBreakPointIcon();
- }
+ return pendingBreakPointIcon();
}
void BreakHandler::scheduleSynchronization()
str << "<html><body><table>"
//<< "<tr><td>" << tr("Id:") << "</td><td>" << m_id << "</td></tr>"
<< "<tr><td>" << tr("State:")
- << "</td><td>" << state << "(" << stateToString(state) << ")</td></tr>"
+ << "</td><td>" << state << " (" << stateToString(state) << ")</td></tr>"
<< "<tr><td>" << tr("Engine:")
<< "</td><td>" << (engine ? engine->objectName() : "0") << "</td></tr>"
<< "<tr><td>" << tr("Marker File:")