forked from qt-creator/qt-creator
debugger: remove needless indirection
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user