Bug 375748

Summary: connect-non-signal: Internal error in connect to functor
Product: [Developer tools] clazy Reporter: Daniel Pfeifer <daniel>
Component: generalAssignee: Sergio Martins <smartins>
Status: RESOLVED FIXED    
Severity: normal CC: smartins
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Daniel Pfeifer 2017-01-30 12:31:19 UTC
The following code reproduces the error:

class Foo: public QObject { Q_OBJECT
public:
    Foo() { connect(this, &Foo::bar, []{}); }
Q_SIGNALS:
    void bar();
};

The output is:

[-Wclazy-connect-non-signal]: internal error: couldn't find method from pmf connect at /usr/include/qt/QtCore/qobject.h:293:5
Comment 1 Sergio Martins 2017-01-30 20:55:38 UTC
Git commit 8c54251cf280d5b85d12adc806f89e03f8aaf6a6 by Sergio Martins.
Committed on 30/01/2017 at 20:54.
Pushed by smartins into branch 'master'.

connect-non-signal: Don't error out when connect has 3 arguments

That's possible when using lambdas

M  +2    -2    QtUtils.cpp
A  +13   -0    tests/connect-non-signal/bug375748.cpp     [License: UNKNOWN]  *
A  +0    -0    tests/connect-non-signal/bug375748.cpp.expected
M  +4    -0    tests/connect-non-signal/config.json

The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page.


https://commits.kde.org/clazy/8c54251cf280d5b85d12adc806f89e03f8aaf6a6