-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Qt/CodeViewWidget: Implement branch arrows. #8642
Qt/CodeViewWidget: Implement branch arrows. #8642
Conversation
27c6c04
to
e203005
Compare
8e8f2fe
to
ea3d8c5
Compare
81c7c0c
to
2dd3312
Compare
2dd3312
to
ac04036
Compare
a7a84cc
to
74f876e
Compare
I've added a special case for branch instructions that set the link register to reduce visual noise, which turns this: https://user-images.githubusercontent.com/4522237/75113261-82c9fc00-564c-11ea-804d-61dca888cf76.png Since instructions that set the link register usually jump to another function, and thus very rarely actually have the target visible, this seems like a good idea to me. I'll see if I can do something about using the horizontal space better, too. |
74f876e
to
468f790
Compare
Alright, I tried to use the horizontal space better, looks pretty good now if you ask me: https://user-images.githubusercontent.com/4522237/75385411-ff283d80-58df-11ea-9155-3db9a41efe2f.png I'm not entirely sure I like how the indentation calculation code is written (in particular the lambda-in-lambda there...), but I suppose it does the job. |
7ff9cd8
to
e286c38
Compare
…an reserving a full column for each.
e286c38
to
9c98b65
Compare
Looks like CodeViewWidget::Update is only called from the UI thread, so there shouldn't be any issues |
Back in WX, the debugger would draw arrows to indicate branches, like this:
https://user-images.githubusercontent.com/4522237/75113262-83629280-564c-11ea-857e-b86459b47c08.png
https://user-images.githubusercontent.com/4522237/75113263-83629280-564c-11ea-865e-e672b01c57a6.png
I found this pretty useful at quickly determining conditionals and loops, but during the transition to Qt this feature was lost. This PR is a implementation of this feature for Qt.
Screenshots:
https://user-images.githubusercontent.com/4522237/75113260-82316580-564c-11ea-9057-bf7dc6cc169a.png
https://user-images.githubusercontent.com/4522237/75202872-eb0fff00-576c-11ea-869c-0a9ca0b208ef.png
One thing I'm not sure here is if I have to make sure
BranchDisplayDelegate::paint()
andCodeViewWidget::Update()
don't run at the same time in different threads, or if those two are both only already allowed on the GUI thread anyway. Does anyone know?