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 sorting order of location in caller callee view #468

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

lievenhey
Copy link
Contributor

sort by line not by alphabetic string
fixes: #466

@milianw
Copy link
Member

milianw commented Feb 28, 2023

huh? how does this fix it? you now only sort by the line which is totally bogus?

instead, we should use a QCollator in the proxy model for sorting and enable numeric mode on that

@lievenhey
Copy link
Contributor Author

I didn't know that sorting by filename is required. In that case we can leverage FileLine::operator<

Copy link
Member

@milianw milianw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't inline the code, as it leads to code bloat

src/models/callercalleeproxy.h Outdated Show resolved Hide resolved
src/models/callercalleeproxy.h Outdated Show resolved Hide resolved
src/models/callercalleeproxy.h Outdated Show resolved Hide resolved
src/models/callercalleeproxy.cpp Outdated Show resolved Hide resolved
src/models/callercalleeproxy.h Outdated Show resolved Hide resolved
src/models/callercalleeproxy.h Outdated Show resolved Hide resolved
src/models/callercalleeproxy.h Outdated Show resolved Hide resolved
src/models/callercalleeproxy.h Outdated Show resolved Hide resolved
src/models/callercalleeproxy.h Outdated Show resolved Hide resolved
@GitMensch
Copy link
Contributor

Rechecked: I can confirm that the resulting appimage fixe the original issue just fine, sorting first the filename (alphanumeric) then the line numbers (numeric).

Thank you!

Copy link
Member

@milianw milianw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really minor nits, otherwise lgtm now

src/models/callercalleeproxy.h Outdated Show resolved Hide resolved
src/models/callercalleeproxy.cpp Outdated Show resolved Hide resolved
src/models/callercalleeproxy.cpp Outdated Show resolved Hide resolved
src/resultscallercalleepage.cpp Show resolved Hide resolved
add a new sfpm for SourceMapModel that implements lessThen to correctly
sort the locations
fixes: #466
Copy link
Member

@milianw milianw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm now, thanks

@milianw milianw merged commit bc5c288 into master Apr 18, 2023
@milianw milianw deleted the fix-sorting-order branch April 18, 2023 13:29
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.

Caller / Callee view: Location is sorted alphabetic
3 participants