debugger: make BreakHandler::setState private

This commit is contained in:
hjk
2010-11-18 17:44:04 +01:00
parent 81b7e73501
commit 5209b396cd
4 changed files with 7 additions and 13 deletions

View File

@@ -143,13 +143,6 @@ public:
const BreakpointParameters &data); const BreakpointParameters &data);
private: private:
public:
// FIXME: Make private.
void setState(BreakpointId id, BreakpointState state);
private:
friend class BreakpointMarker;
// QAbstractItemModel implementation. // QAbstractItemModel implementation.
int columnCount(const QModelIndex &parent) const; int columnCount(const QModelIndex &parent) const;
int rowCount(const QModelIndex &parent) const; int rowCount(const QModelIndex &parent) const;
@@ -157,7 +150,7 @@ private:
QVariant headerData(int section, Qt::Orientation orientation, int role) const; QVariant headerData(int section, Qt::Orientation orientation, int role) const;
Qt::ItemFlags flags(const QModelIndex &index) const; Qt::ItemFlags flags(const QModelIndex &index) const;
void markerUpdated(BreakpointMarker *marker, int lineNumber); void setState(BreakpointId id, BreakpointState state);
void loadBreakpoints(); void loadBreakpoints();
void saveBreakpoints(); void saveBreakpoints();
void updateMarker(BreakpointId id); void updateMarker(BreakpointId id);

View File

@@ -58,4 +58,5 @@ private:
} // namespace Internal } // namespace Internal
} // namespace Debugger } // namespace Debugger
#endif #endif

View File

@@ -1294,7 +1294,7 @@ bool CdbEngine::attemptBreakpointSynchronizationI(QString *errorMessage)
errorMessage->clear(); errorMessage->clear();
switch (handler->state(id)) { switch (handler->state(id)) {
case BreakpointInsertRequested: case BreakpointInsertRequested:
handler->setState(id, BreakpointInsertProceeding); handler->notifyBreakpointInsertProceeding(id);
if (addCdbBreakpoint(control, symbols, data, &response, errorMessage)) { if (addCdbBreakpoint(control, symbols, data, &response, errorMessage)) {
handler->notifyBreakpointInsertOk(id); handler->notifyBreakpointInsertOk(id);
handler->setResponse(id, response); handler->setResponse(id, response);
@@ -1305,7 +1305,7 @@ bool CdbEngine::attemptBreakpointSynchronizationI(QString *errorMessage)
break; break;
case BreakpointChangeRequested: case BreakpointChangeRequested:
// Skip disabled breakpoints, else add. // Skip disabled breakpoints, else add.
handler->setState(id, BreakpointChangeProceeding); handler->notifyBreakpointChangeProceeding(id);
if (data.enabled) { if (data.enabled) {
if (addCdbBreakpoint(control, symbols, data, &response, errorMessage)) { if (addCdbBreakpoint(control, symbols, data, &response, errorMessage)) {
handler->notifyBreakpointChangeOk(id); handler->notifyBreakpointChangeOk(id);

View File

@@ -1606,13 +1606,13 @@ void CdbEngine::attemptBreakpointSynchronization()
case BreakpointInsertRequested: case BreakpointInsertRequested:
response.number = m_nextBreakpointNumber++; response.number = m_nextBreakpointNumber++;
postCommand(cdbAddBreakpointCommand(p, false, response.number), 0); postCommand(cdbAddBreakpointCommand(p, false, response.number), 0);
handler->setState(id, BreakpointInsertProceeding); handler->notifyBreakpointInsertProceeding(id);
handler->notifyBreakpointInsertOk(id); handler->notifyBreakpointInsertOk(id);
handler->setResponse(id, response); handler->setResponse(id, response);
break; break;
case BreakpointChangeRequested: case BreakpointChangeRequested:
// Skip disabled breakpoints, else add // Skip disabled breakpoints, else add.
handler->setState(id, BreakpointChangeProceeding); handler->notifyBreakpointChangeProceeding(id);
if (p.enabled) { if (p.enabled) {
response.number = m_nextBreakpointNumber++; response.number = m_nextBreakpointNumber++;
postCommand(cdbAddBreakpointCommand(p, false, response.number), 0); postCommand(cdbAddBreakpointCommand(p, false, response.number), 0);