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

Knife tool introduces unused Q_PROPERTY #5949

Closed
JohannesLorenz opened this issue Mar 13, 2021 · 3 comments
Closed

Knife tool introduces unused Q_PROPERTY #5949

JohannesLorenz opened this issue Mar 13, 2021 · 3 comments
Assignees
Labels

Comments

@JohannesLorenz
Copy link
Contributor

JohannesLorenz commented Mar 13, 2021

Bug Summary

8acb922 introduces warnings that mouseHotspotHand and mouseHotspotKnife in include/TrackContentObjectView.h are not accessed (see logs).

Cause: #5949.

Steps to reproduce

Compile (at least, I found the warning on MacOS CI, but it's probably everywhere).

Expected behavior

No warning.

Actual behavior

Warning.

Affected LMMS versions

master

Logs

Click to expand
AutoMoc: /Users/travis/build/LMMS/lmms/include/TrackContentObjectView.h:57: Warning: Property declaration mouseHotspotHand has no READ accessor function or associated MEMBER variable. The property will be invalid.

/Users/travis/build/LMMS/lmms/include/TrackContentObjectView.h:58: Warning: Property declaration mouseHotspotKnife has no READ accessor function or associated MEMBER variable. The property will be invalid.

@Spekular
Copy link
Member

This is a weird warning considering the fact that the properties are definitely read correctly (changing the property in the theme changes the cursor hotspot). I vaguely remember reading that you don't need to write both WRITE and READ in some cases, but perhaps that was via MEMBER and NOTIFY. Still, I suppose I'll make a PR to switch to MEMBER/NOTIFY and see if that fixes it.

@JohannesLorenz
Copy link
Contributor Author

@Spekular Can you point out where in the code you access this property in a reading sense? I can't find it.

@Spekular
Copy link
Member

The property is linked to setMouseHotspotKnife, which sets m_mouseHotspotKnife, which is read. I double checked this by messing up the hotspot so the cut position is incorrect. With the property removed LMMS spits out errors on launch + the cut position remains unmodified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants