Skip to content
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

fix wrong source code shown #599

Merged
merged 3 commits into from
Jan 24, 2024
Merged

fix wrong source code shown #599

merged 3 commits into from
Jan 24, 2024

Conversation

lievenhey
Copy link
Contributor

The vectors containing the source code are not reset correctly. This results one some old code being shown. This patch resets them correctly.

fixes: #577

@lievenhey lievenhey requested a review from milianw January 22, 2024 14:27
Move the mutable to HighlightedLine::m_layout and use a factory
function to initialize it.

Then follow the rule of zero and generally slightly cleanup this
code here while at it.
Instead of using a signal connection here, call the function
directly. This is slightly more efficient, but - more importantly -
ensures we don't reconnect this signal multiple times, once every
time we call HighlightedText::setText.
@milianw
Copy link
Member

milianw commented Jan 23, 2024

I'm going to pick a different approach

Don't always append data, resize-to-fit and then transform.
Sadly, QStringList has no resize, so we need to copy+for_each
there instead.

Fixes: #577
@milianw milianw merged commit e398f8c into master Jan 24, 2024
@milianw milianw deleted the fix-sourcecode branch January 24, 2024 10:31
@GitMensch
Copy link
Contributor

At least with the new approach-the problem persists.
I can now reproduce: disassembly shown, then showing a different disassembly - the code pane was adjusted to show other code, but the code lines shown mismatches the cycles and the disassembly.
If I restart hotspot and show the disassembly of that other function "directly" then there's a perfect match.

I suggest to reopen the originating issue....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disassembly displays old source (caching issue?) and search is broken
3 participants