GUI: Add "Copy RVA" shortcut (#1232)
* Add Copy RVA shortcut * Fix Copy RVA shortcut for hex dump
This commit is contained in:
parent
afabd01f77
commit
83631db154
|
@ -69,6 +69,7 @@ void HexDump::updateShortcuts()
|
||||||
{
|
{
|
||||||
AbstractTableView::updateShortcuts();
|
AbstractTableView::updateShortcuts();
|
||||||
mCopyAddress->setShortcut(ConfigShortcut("ActionCopyAddress"));
|
mCopyAddress->setShortcut(ConfigShortcut("ActionCopyAddress"));
|
||||||
|
mCopyRva->setShortcut(ConfigShortcut("ActionCopyRva"));
|
||||||
mCopySelection->setShortcut(ConfigShortcut("ActionCopy"));
|
mCopySelection->setShortcut(ConfigShortcut("ActionCopy"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,6 +294,8 @@ void HexDump::setupCopyMenu()
|
||||||
// Copy -> RVA
|
// Copy -> RVA
|
||||||
mCopyRva = new QAction(DIcon("copy_address.png"), "&RVA", this);
|
mCopyRva = new QAction(DIcon("copy_address.png"), "&RVA", this);
|
||||||
connect(mCopyRva, SIGNAL(triggered()), this, SLOT(copyRvaSlot()));
|
connect(mCopyRva, SIGNAL(triggered()), this, SLOT(copyRvaSlot()));
|
||||||
|
mCopyRva->setShortcutContext(Qt::WidgetShortcut);
|
||||||
|
addAction(mCopyRva);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HexDump::copyAddressSlot()
|
void HexDump::copyAddressSlot()
|
||||||
|
|
|
@ -52,6 +52,9 @@ void CPUDisassembly::mousePressEvent(QMouseEvent* event)
|
||||||
if(!DbgIsDebugging())
|
if(!DbgIsDebugging())
|
||||||
return;
|
return;
|
||||||
MessageBeep(MB_OK);
|
MessageBeep(MB_OK);
|
||||||
|
if(event->modifiers() & Qt::ShiftModifier)
|
||||||
|
copyRvaSlot();
|
||||||
|
else
|
||||||
copyAddressSlot();
|
copyAddressSlot();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -241,7 +244,7 @@ void CPUDisassembly::setupRightClickContextMenu()
|
||||||
copyMenu->addAction(makeAction(DIcon("copy_selection_no_bytes.png"), tr("Selection (&No Bytes)"), SLOT(copySelectionNoBytesSlot())));
|
copyMenu->addAction(makeAction(DIcon("copy_selection_no_bytes.png"), tr("Selection (&No Bytes)"), SLOT(copySelectionNoBytesSlot())));
|
||||||
copyMenu->addAction(makeAction(DIcon("copy_selection_no_bytes.png"), tr("Selection to File (No Bytes)"), SLOT(copySelectionToFileNoBytesSlot())));
|
copyMenu->addAction(makeAction(DIcon("copy_selection_no_bytes.png"), tr("Selection to File (No Bytes)"), SLOT(copySelectionToFileNoBytesSlot())));
|
||||||
copyMenu->addAction(makeShortcutAction(DIcon("copy_address.png"), tr("&Address"), SLOT(copyAddressSlot()), "ActionCopyAddress"));
|
copyMenu->addAction(makeShortcutAction(DIcon("copy_address.png"), tr("&Address"), SLOT(copyAddressSlot()), "ActionCopyAddress"));
|
||||||
copyMenu->addAction(makeAction(DIcon("copy_address.png"), tr("&RVA"), SLOT(copyRvaSlot())));
|
copyMenu->addAction(makeShortcutAction(DIcon("copy_address.png"), tr("&RVA"), SLOT(copyRvaSlot()), "ActionCopyRva"));
|
||||||
copyMenu->addAction(makeAction(DIcon("copy_disassembly.png"), tr("Disassembly"), SLOT(copyDisassemblySlot())));
|
copyMenu->addAction(makeAction(DIcon("copy_disassembly.png"), tr("Disassembly"), SLOT(copyDisassemblySlot())));
|
||||||
copyMenu->addAction(makeAction(DIcon("data-copy.png"), tr("&Data..."), SLOT(copyDataSlot())));
|
copyMenu->addAction(makeAction(DIcon("data-copy.png"), tr("&Data..."), SLOT(copyDataSlot())));
|
||||||
|
|
||||||
|
|
|
@ -471,6 +471,7 @@ Configuration::Configuration() : QObject(), noMoreMsgbox(false)
|
||||||
defaultShortcuts.insert("ActionToggleRegisterValue", Shortcut(tr("Actions -> Toggle Register Value"), "Space"));
|
defaultShortcuts.insert("ActionToggleRegisterValue", Shortcut(tr("Actions -> Toggle Register Value"), "Space"));
|
||||||
defaultShortcuts.insert("ActionCopy", Shortcut(tr("Actions -> Copy"), "Ctrl+C"));
|
defaultShortcuts.insert("ActionCopy", Shortcut(tr("Actions -> Copy"), "Ctrl+C"));
|
||||||
defaultShortcuts.insert("ActionCopyAddress", Shortcut(tr("Actions -> Copy Address"), "Alt+INS"));
|
defaultShortcuts.insert("ActionCopyAddress", Shortcut(tr("Actions -> Copy Address"), "Alt+INS"));
|
||||||
|
defaultShortcuts.insert("ActionCopyRva", Shortcut(tr("Actions -> Copy RVA"), ""));
|
||||||
defaultShortcuts.insert("ActionCopySymbol", Shortcut(tr("Actions -> Copy Symbol"), "Ctrl+S"));
|
defaultShortcuts.insert("ActionCopySymbol", Shortcut(tr("Actions -> Copy Symbol"), "Ctrl+S"));
|
||||||
defaultShortcuts.insert("ActionLoadScript", Shortcut(tr("Actions -> Load Script"), "Ctrl+O"));
|
defaultShortcuts.insert("ActionLoadScript", Shortcut(tr("Actions -> Load Script"), "Ctrl+O"));
|
||||||
defaultShortcuts.insert("ActionReloadScript", Shortcut(tr("Actions -> Reload Script"), "Ctrl+R"));
|
defaultShortcuts.insert("ActionReloadScript", Shortcut(tr("Actions -> Reload Script"), "Ctrl+R"));
|
||||||
|
|
Loading…
Reference in New Issue