Debugger: Implement "Copy Address" context menu in memory view

This commit is contained in:
Ty Lamontagne 2023-08-20 16:10:55 -04:00 committed by lightningterror
parent 1697c2160c
commit 70e1d2bf3d
1 changed files with 5 additions and 1 deletions

View File

@ -377,7 +377,11 @@ void MemoryViewWidget::customMenuRequested(QPoint pos)
{
m_contextMenu = new QMenu(this);
QAction* action = new QAction(tr("Go to in disassembly"));
QAction* action = new QAction(tr("Copy Address"));
m_contextMenu->addAction(action);
connect(action, &QAction::triggered, this, [this]() { QApplication::clipboard()->setText(QString::number(m_table.selectedAddress, 16).toUpper()); });
action = new QAction(tr("Go to in disassembly"));
m_contextMenu->addAction(action);
connect(action, &QAction::triggered, this, [this]() { emit gotoInDisasm(m_table.selectedAddress); });