-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Ctrl-Shift-C shortcut #1476
Conversation
Thank you for you quick improvement with adding support for hex! :) Next time, you don't have to close the previous PR, you can simply push changes to your branch, and it would immediately take place in the PR :) For example, you could simply push your changes to "TheLorax:copy-address-shortcut" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make Copy Address in the context menu (graph and disas), separated by a separator. And under "Copy" when available. As you can see in the image below, there is a separator under "Copy" and after it there is the "Copy Address". It makes more sense to pair them together to the same section of the context menu
Other than that, looks very good :)
I don't normally use github, how do you update a pull request? Amend and force push? 2nd commit (ugly)? |
You simply need to push the changes from your local branch to the remote branch
Usually, what I do, from scratch is:
Now you can go to https://github.com/TheLorax/cutter and make a pull request If you want to add another commit to the PR, simply push again to your branch and the PR will be updated automatically:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,thank you for this Pull Request! :)
src/widgets/HexdumpWidget.cpp
Outdated
auto cpyAddrShortcut = new QShortcut(QKeySequence{Qt::CTRL + Qt::SHIFT + Qt::Key_C}, this); | ||
cpyAddrShortcut->setContext(Qt::WidgetWithChildrenShortcut); | ||
ui->actionCopyAddressAtCursor->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_C); | ||
connect(cpyAddrShortcut, SIGNAL(activated()), this, SLOT(on_actionCopyAddressAtCursor_triggered())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a reminder that new member pointer syntax for connecting signals and slots has been available for a while. connect(foo, &Foo::signalname, bar, &Bar::slotname)
. It has benefit of being checked at compile time. It's easy to silently break SIGNAL and SLOTS macros while refactoring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/widgets/HexdumpWidget.cpp
Outdated
auto cpyAddrShortcut = new QShortcut(QKeySequence{Qt::CTRL + Qt::SHIFT + Qt::Key_C}, this); | ||
cpyAddrShortcut->setContext(Qt::WidgetWithChildrenShortcut); | ||
ui->actionCopyAddressAtCursor->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_C); | ||
connect(cpyAddrShortcut, SIGNAL(activated()), this, SLOT(on_actionCopyAddressAtCursor_triggered())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Copies address at cursor from hexdump, graph and disassembly views
@ITAYC0HEN Maybe can you approve now? |
Copies address at cursor from hexdump, graph and disassembly views
I don't really know Qt, so double check the
new QShortcut
usageTest plan
Copied addresses from hex, graph and disassem views with both menu and shortcut
Closing issues
Fix #1474