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

[libqofono] Reiterate deprecated qt api usage. JB#59963 #20

Merged
merged 1 commit into from Jan 24, 2023

Conversation

pvuorela
Copy link
Contributor

We don't need std::sort wrapped, it should work on all(?) Qt5 versions.

And SkipEmptyParts is available already before Qt6, let's adjust that and avoid potential warnings with new enough Qt5.

We don't need std::sort wrapped, it should work on all(?) Qt5 versions.

And SkipEmptyParts is available already before Qt6, let's adjust
that and avoid potential warnings with new enough Qt5.
@monich
Copy link
Member

monich commented Jan 24, 2023

IMO qSort(x) is far more readable than std::sort(x.begin(), x.end()) and safer because it doesn't leave a chance to write std::sort(x.begin(), y.end()) by mistake. But of course you're right, the proper C++ way is to make statements as long as possible, preferably littering them with std:: prefixes 🙂

@pvuorela
Copy link
Contributor Author

Well, if we'd wanted it could have been a qOfonoSort wrapper that always used std::sort, but I don't think such theoretical extra safety is worth the wrapper for two simple instances.

Copy link
Member

@Tomin1 Tomin1 left a comment

Choose a reason for hiding this comment

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

This is fine with me.

@pvuorela pvuorela merged commit b5da343 into master Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants