Fix linter warnigns found using the QT agentic skills - #768
Open
j-rivero wants to merge 4 commits into
Open
Conversation
Convert 22 direct-list-init sites (Type var{value};) to copy-init
(Type var = value;) across MainWindow.hh Q_PROPERTY shadow members,
Application.cc local config-load variables, and Dialog.cc.
Copy-init form avoids surprises from narrowing conversions on scalars
with explicit-constructor types while staying terse. No behavioral
change.
Generated-By: Claude Opus 4.7
Signed-off-by: Jose Luis Rivero <jrivero@honurobotics.com>
The loop body in Application::PluginByName only reads the iterated shared_ptr; the non-const reference could detach a Qt COW container if pluginsAdded were ever switched to one. Tighten to const auto&. Generated-By: Claude Opus 4.7 Signed-off-by: Jose Luis Rivero <jrivero@honurobotics.com>
Prefer .size() for consistency with the rest of the std container API. Two trivial sites; no behavior change. Generated-By: Claude Opus 4.7 Signed-off-by: Jose Luis Rivero <jrivero@honurobotics.com>
…MO-1) Change the internal Implementation::timeout member from int to std::chrono::milliseconds to remove unit ambiguity. QTimer::setInterval binds to its chrono overload (Qt 5.8+), so InitTimer() does not need explicit conversion. UpdateTime() now reads .count() before scaling to seconds. Public Timeout() API and Q_PROPERTY are unchanged. Generated-By: Claude Opus 4.7 Signed-off-by: Jose Luis Rivero <jrivero@honurobotics.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎉 New feature
Summary
Found that the Qt is supplying an agentic development kit that can review cpp and QML, see the introduction in https://www.qt.io/blog/introducing-qt-agentic-development-skills.
I put my agent to work on this code and the first pass found many interesting points to improve. In this first PR I address the complains done by the linter: https://github.com/TheQtCompanyRnD/agent-skills/tree/main/skills/qt-cpp-review#what-it-does.
One commit per issue detected with a meaningful commit message. I reviewed the commits and they made sense to me.
Test it
I've build a colcon workspace with gz-gui and gz-sim and the test suite run fine on my 24.04 Ubuntu. I was also able to launch gz-sim and play with the GUI and plot just fine.
Checklist
codecheckpassed (See contributing)Generated-by: Claude Opus 4.7
Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-byandGenerated-bymessages.Backports: If this is a backport, please use Rebase and Merge instead.