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!
Git commit e098fe057b9984df3eb630513e90eea0fa471d2a by Sergio Martins. Committed on 11/02/2017 at 19:56. Pushed by smartins into branch '1.1'. connect-non-signal: Add failign unit test A +16 -0 tests/connect-non-signal/bug376137.cpp [License: UNKNOWN] * M +5 -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/e098fe057b9984df3eb630513e90eea0fa471d2a
Git commit a261683a0fc66f07a14a256a3aac859767e297be by Sergio Martins. Committed on 12/02/2017 at 01:10. Pushed by smartins into branch '1.1'. connect-non-signal: Don't fail to detect signals wrapped with a static-cast M +2 -0 src/QtUtils.cpp M +1 -2 tests/connect-non-signal/bug376137.cpp A +0 -0 tests/connect-non-signal/bug376137.cpp.expected M +0 -1 tests/connect-non-signal/config.json https://commits.kde.org/clazy/a261683a0fc66f07a14a256a3aac859767e297be