Fix responsiveness of RGA GUI disassembly view #54
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The GUI becomes unresponsive for several seconds whenever the disassembly view
gains or loses focus due to the code unnecessarily applying a stylesheet to
the entire frame just to change border color, which seems to be a leftover
functionality, considering that the color was only affected by the API used
which is now chosen at application launch so the border color does not provide
much value. According to the Qt documentation applications should not call
setStylesheet() outside of the constructor because it's very costly and the
current code calls it on focus change.
This change fixes that by getting rid of all the code using setStylesheet()
to change the disassembly view's border.
Also, some missing header includes were added which most likely were
uncovered by compiling against Qt 5.11.2 contrarily to Qt 5.9.2 recommended
in the RGA documentation.