Bug 375748 - connect-non-signal: Internal error in connect to functor
Summary: connect-non-signal: Internal error in connect to functor
Status: RESOLVED FIXED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Sergio Martins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-30 12:31 UTC by Daniel Pfeifer
Modified: 2017-01-30 20:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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