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 Qt5 warnings for using anchors #363

Merged
merged 1 commit into from
Sep 22, 2020
Merged

Conversation

luca-della-vedova
Copy link
Member

I have been getting a lot of warnings being print out by Qt5 with the Component Inspector GUI plugin when clicking on models, specifically two warnings repeated many times:

[ign-8] [GUI] [Wrn] [Application.cc:649] [QT] file::/ComponentInspector/Pose3d.qml:132:9: QML Image: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[ign-8] [GUI] [Wrn] [Application.cc:649] [QT] file::/ComponentInspector/Vector3d.qml:93:9: QML Image: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.

This is way out of my comfort zone but by looking around I found some examples using Layout.alignment instead of anchors so went ahead to change the objects and the warnings disappeared.
As a sanity check this is what component inspector looks like with the changes:

image

There is a similar warning being caused by this line in the world-control plugin:

[ign-8] [GUI] [Wrn] [Application.cc:649] [QT] file::/WorldControl/WorldControl.qml:88:3: QML RoundButton: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.

If this fix is approved I'll open a PR to fix that warning as well.

Signed-off-by: Luca Della Vedova <[email protected]>
@github-actions github-actions bot added the 🔮 dome Ignition Dome label Sep 22, 2020
@codecov
Copy link

codecov bot commented Sep 22, 2020

Codecov Report

Merging #363 into master will increase coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #363      +/-   ##
==========================================
+ Coverage   77.16%   77.21%   +0.05%     
==========================================
  Files         200      200              
  Lines       10706    10706              
==========================================
+ Hits         8261     8267       +6     
+ Misses       2445     2439       -6     
Impacted Files Coverage Δ
src/SimulationRunner.cc 94.76% <0.00%> (+1.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b21ec8...e44ad79. Read the comment docs.

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

Nice, that had been annoying me too! Thanks for the fix!

@chapulina chapulina added beta Targeting beta release of upcoming collection bug Something isn't working labels Sep 22, 2020
@chapulina chapulina merged commit d364390 into master Sep 22, 2020
@chapulina chapulina deleted the luca/qt_anchor_warnings branch September 22, 2020 17:41
chapulina pushed a commit that referenced this pull request Mar 9, 2021
chapulina pushed a commit that referenced this pull request Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta Targeting beta release of upcoming collection bug Something isn't working 🔮 dome Ignition Dome
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants