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);
private:
public:
// FIXME: Make private.
void setState(BreakpointId id, BreakpointState state);
private:
friend class BreakpointMarker;
// QAbstractItemModel implementation.
int columnCount(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;
Qt::ItemFlags flags(const QModelIndex &index) const;
void markerUpdated(BreakpointMarker *marker, int lineNumber);
void setState(BreakpointId id, BreakpointState state);
void loadBreakpoints();
void saveBreakpoints();
void updateMarker(BreakpointId id);

View File

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

View File

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

View File

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