[clazy] [Bug 410714] New: clazy-detaching-temporary: Don't warn on detaching pointer values

Markus bugzilla_noreply at kde.org
Thu Aug 8 06:42:09 BST 2019


https://bugs.kde.org/show_bug.cgi?id=410714

            Bug ID: 410714
           Summary: clazy-detaching-temporary: Don't warn on detaching
                    pointer values
           Product: clazy
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: unassigned-bugs at kde.org
          Reporter: markus.haberlander.sw at gmail.com
                CC: smartins at kde.org
  Target Milestone: ---

SUMMARY
I am currently fixing deprecation warnings for QChart in Qt 5.12. The following
link shows the suggested change (Qt examples changed with adding the
deprecation message):
https://codereview.qt-project.org/c/qt/qtcharts/+/227902/4/examples/charts/scatterinteractions/chartview.cpp

Doing this gives me a warning:
warning: Don't call QList::first() on temporary [-Wclazy-detaching-temporary]

I believe calling QList::first() is no problem here, it only means that a
pointer is copied, which is not a problem IMHO.


STEPS TO REPRODUCE

Run clazy on the Scatter Interactions Sample in Qt 5.12.


OBSERVED RESULT

Clazy returns clazy-detaching-temporary


EXPECTED RESULT

Clazy should not return an error here.


SOFTWARE/OS VERSIONS

Running clazy from QtC 4.9.2, Qt version is 5.12.4.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Unassigned-bugs mailing list