[clazy] [Bug 457719] New: Incorrect warning [-Wclazy-incorrect-emit]
Richard
bugzilla_noreply at kde.org
Wed Aug 10 15:26:17 BST 2022
https://bugs.kde.org/show_bug.cgi?id=457719
Bug ID: 457719
Summary: Incorrect warning [-Wclazy-incorrect-emit]
Product: clazy
Version: unspecified
Platform: Other
OS: Linux
Status: REPORTED
Severity: major
Priority: NOR
Component: general
Assignee: unassigned-bugs at kde.org
Reporter: richard.oehlinger at adbsafegate.com
CC: smartins at kde.org
Target Milestone: ---
SUMMARY
Following code produces an incorrect emit warning:
Emitting inside constructor probably has no effect [-Wclazy-incorrect-emit]
When i change the connect to a pointer to method, the error doesn't occour.
***
class MyClass : public QObject
{
Q_OBJECT
public:
void func();
signals:
void mySignal();
};
void MyClass::func()
{
QNetworkReply* logout_reply = nullptr;
QObject::connect(logout_reply, &QNetworkReply::finished, []
{
});
emit mySignal();
}
****
By the way IncorrectEmit::hasEmitKeyboard looks like a mis-spelling.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Unassigned-bugs
mailing list