[clazy] [Bug 376137] New: Internal error caused by overloaded signal
Daniel Pfeifer
bugzilla_noreply at kde.org
Tue Feb 7 15:00:07 GMT 2017
https://bugs.kde.org/show_bug.cgi?id=376137
Bug ID: 376137
Summary: Internal error caused by overloaded signal
Product: clazy
Version: unspecified
Platform: Other
OS: Linux
Status: UNCONFIRMED
Severity: crash
Priority: NOR
Component: general
Assignee: unassigned-bugs at kde.org
Reporter: daniel at pfeifer-mail.de
CC: smartins at kde.org
Target Milestone: ---
Here is the code to reproduce it:
#include <QObject>
class Foo : public QObject
{
Q_OBJECT
public:
Foo()
{
connect(this, static_cast<void (Foo::*)(int)>(&Foo::bar), [](int) {});
connect(this, qOverload<float>(&Foo::bar), [](float) {});
}
Q_SIGNALS:
void bar(int);
void bar(float);
};
Currently, both connect calls produce "internal error: couldn't find method
from pmf connect".
Once this is fixed, you may think about adding a checker that flags the use of
static_cast in signal connections and recommends to use qOverload. Thanks!
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Unassigned-bugs
mailing list