Opened 7 years ago
Closed 7 years ago
#13064 closed Bug Report - General (Fixed)
MythRect::NormRect does not use result of normalized()
Reported by: | Stuart Auchterlonie | Owned by: | Stuart Auchterlonie |
---|---|---|---|
Priority: | minor | Milestone: | 29.0 |
Component: | MythTV - User Interface Library | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
This is an error that flags up on the build network
mythrect.cpp: In member function ‘void MythRect::NormRect()’: mythrect.cpp:115:16: warning: ignoring return value of ‘QRect QRect::normalized() const’, declared with attribute warn_unused_result [-Wunused-result] normalized(); ^ In file included from /usr/include/qt5/QtCore/QRect:1:0, from mythrect.h:4, from mythrect.cpp:4: /usr/include/qt5/QtCore/qrect.h:69:11: note: declared here QRect normalized() const Q_DECL_NOTHROW Q_REQUIRED_RESULT; ^~~~~~~~~~
Attachments (2)
Change History (6)
Changed 7 years ago by
Attachment: | ticket13064-fix-mythrect-normrect.diff added |
---|
comment:1 Changed 7 years ago by
comment:2 Changed 7 years ago by
That suggestion does not work, it plays havoc with the theme display. Clearly, normalize does not work in this situation.
I suggest just remove the normalize() call, since it does nothing anyway. I tested the updated patch, which now does that, and it does not cause problems.
Changed 7 years ago by
Attachment: | 20170712_rect.patch added |
---|
Apply the normalized result to the MythRect object
comment:3 Changed 7 years ago by
In 65d90d894c418fb6493a1b1fca40cad2955e70a2/mythtv:
Fixes #13064. Don't call normalized() as the result is ignored and it causes issues with theme display
comment:4 Changed 7 years ago by
Resolution: | → Fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
As I see it, the problem is that the result of normalized call is discarded, so it achieves nothing. The result of the call should be applied to the MythRect object. Attached is my suggested patch.