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

clean: reduce implicit int -> (q)sizetype conversion warnings #2127

Merged

Conversation

shenlebantongying
Copy link
Collaborator

@shenlebantongying shenlebantongying commented Feb 7, 2025

Seems to be a legacy of Qt4, where size type is int.

https://doc.qt.io/archives/qt-4.8/qvector.html#size

And also pre C++11 size_type was unsigned (?).

Only warnings in function body is changed (use auto as much as possible) in this PR. There are a few in function return & calling positions.

@shenlebantongying shenlebantongying force-pushed the clean/ssize_t branch 4 times, most recently from 264781d to 622ff15 Compare February 7, 2025 20:06
@shenlebantongying shenlebantongying changed the title clean: reduce compiler warning implicit int -> qsizetype conversion clean: reduce implicit int -> (q)sizetype conversion warnings Feb 7, 2025
@shenlebantongying shenlebantongying enabled auto-merge (squash) February 7, 2025 20:16
@shenlebantongying shenlebantongying merged commit 1b3c570 into xiaoyifang:staged Feb 7, 2025
7 checks passed
@shenlebantongying shenlebantongying deleted the clean/ssize_t branch February 7, 2025 20:22
Copy link

sonarqubecloud bot commented Feb 7, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
6 Security Hotspots
8.4% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)
E Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

1 participant