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 issue #122 #123

Merged
merged 2 commits into from
Nov 7, 2023
Merged

Fix issue #122 #123

merged 2 commits into from
Nov 7, 2023

Conversation

lohedges
Copy link
Contributor

@lohedges lohedges commented Nov 7, 2023

This PR closes #122 by fixing the use of QString::compare when comparing molecular properties. We added a new (as yet unused) is_non_searchable_water property to allow a user to preserve water topologies, e.g. by excluding them from a search. However, I don't want to keep this property when swapping topology, so don't copy it to the new water template. I was incorrectly using QString::compare since I hadn't realised that it returned an int, not a bool. The return value is zero only when the strings match.

This will be tested via BioSimSpace.

  • I confirm that I have merged the latest version of devel into this branch before issuing this pull request (e.g. by running git pull origin devel): [y]
  • I confirm that I have added a changelog entry to the changelog (we will add a link to this PR as part of the review): [y]
  • I confirm that I have permission to release this code under the GPL3 license: [y]

Suggested reviewers:

@chryswoods

Copy link
Contributor

@chryswoods chryswoods left a comment

Choose a reason for hiding this comment

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

That is a surprising API - I would have expected compare to return a bool too.

@chryswoods chryswoods merged commit 4a1025e into devel Nov 7, 2023
5 checks passed
@chryswoods chryswoods deleted the fix_122 branch November 7, 2023 18:04
@xiki-tempula
Copy link

@chryswoods Do you mind back port this into the main as well, please? Thank you.

@chryswoods
Copy link
Contributor

Yes - although I will delegate ;-)

@lohedges - do you have time to do this tomorrow? I'm at a meeting in London all day.

@lohedges
Copy link
Contributor Author

lohedges commented Nov 8, 2023

Yes, no problem.

@chryswoods
Copy link
Contributor

Thanks :-)

lohedges added a commit that referenced this pull request Nov 9, 2023
lohedges added a commit that referenced this pull request Nov 9, 2023
@lohedges
Copy link
Contributor Author

lohedges commented Nov 9, 2023

This is now backported into main.

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.

[BUG] Invalid use of QString::compare when swapping water topology
3 participants