-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
LoopingControl: use auto instead of auto* for iterator #4379
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now clang-tidy is complaining:
src/engine/controls/loopingcontrol.cpp#L1127
'auto i' can be declared as 'auto *i' [readability-qualified-auto]
clang-tidy needs to be ignored in this case. QStack inherits from QVector in Qt5 and QVector::iterator is a typedef for |
I think we need to introduce an ifdef here then. |
ed4e068
to
aeaf906
Compare
Using QStack::iterator explicitly instead of auto works too. |
aeaf906
to
d8abb25
Compare
QStack inherits from QVector in Qt5 so QStack::iterator is a pointer type which clang-tidy wants to be auto*. But in Qt6, QStack inherits from QList so QStack::iterator is not a pointer type and clang-tidy wants to use auto. Resolve this by using the QStack::iterator type explicitly.
d8abb25
to
60d5afc
Compare
Merge? |
Waiting for @daschuer to formally approve the changes according to our rules. |
I don't know how auto* worked before considering the iterator
is not a pointer type, but it doesn't work in Qt6.