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

            Bug ID: 363428
           Summary: false positive for writing to temporary
                    QTextTableCell::setFormat
           Product: clazy
           Version: unspecified
          Platform: Other
                OS: other
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: unassigned-b...@kde.org
          Reporter: eric.lemaniss...@gmail.com
                CC: smart...@kde.org

Calling setFormat on a temporary QTextTableCell raises "Call to temporary is a
no-op", but it is not, because QTextTableCell is just an indirection to the
underlying QTextTable.

all other QTextTableCell members are const, so they are no-ops if the return
value is ignored

Reproducible: Always

Steps to Reproduce:

    QTextCursor cursor;
    QTextTableCellFormat cellFormat;
// ...
    QTextTable *currentTable = cursor.currentTable();
    currentTable->cellAt(cursor).setFormat(cellFormat);

Actual Results:  
warning: Call to temporary is a no-op: QTextTableCell::setFormat
[-Wclazy-writing-to-temporary]
    currentTable->cellAt(cursor).setFormat(cellFormat);
    ^

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to