debugger: remove needless indirection

This commit is contained in:
hjk
2010-11-25 18:49:26 +01:00
parent 59c5359213
commit a9f825fc2e
3 changed files with 3 additions and 22 deletions

View File

@@ -334,12 +334,11 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
individualFormatMenu.setEnabled(false);
}
const bool actionsEnabled = modelData(EngineActionsEnabledRole).toBool();
const unsigned engineCapabilities = modelData(EngineCapabilitiesRole).toUInt();
const bool actionsEnabled = engine->debuggerActionsEnabled();
const unsigned engineCapabilities = engine->debuggerCapabilities();
const bool canHandleWatches =
actionsEnabled && (engineCapabilities & AddWatcherCapability);
const DebuggerState state =
static_cast<DebuggerState>(modelData(EngineStateRole).toInt());
const DebuggerState state = engine->state();
QMenu menu;
QAction *actInsertNewWatchItem = menu.addAction(tr("Insert New Watch Item"));
@@ -592,12 +591,6 @@ void WatchWindow::setModelData
model()->setData(index, value, role);
}
QVariant WatchWindow::modelData(int role, const QModelIndex &index)
{
QTC_ASSERT(model(), return QVariant());
return model()->data(index, role);
}
void WatchWindow::setWatchpoint(quint64 address)
{
breakHandler()->setWatchpointByAddress(address);