Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
Qt Creator 11.0.3
-
None
-
Apple Silicon (M1); MacOS 13.4.1; Qt Creator 11.0.3
Description
I have class JsonParser:
class JsonParser : public QObject { Q_OBJECT protected: QJsonDocument _document; };
In my subclass JsonSpecialistParser : public JsonParser, I have methods of the form
void JsonSpecialistParser::task() { QJsonObject newRoot; //... _document.setObject(newRoot); }
The line containing _document.setObject(newRoot) gets the Clazy warning:
Call to temporary is a no-op: QJsonDocument::setObject [clazy-writing-to-temporary]
I believe this is incorrect as _document is not a temporary and setObject operates on it directly.