diff options
author | Sergio Martins <smartins@kde.org> | 2018-03-28 22:13:54 +0100 |
---|---|---|
committer | Sergio Martins <smartins@kde.org> | 2018-03-28 22:13:54 +0100 |
commit | a7d808a87d4f120505edffab47ae9128154f3beb (patch) | |
tree | c72eb2191814d995a939dd83061c29208acc20d5 /tests/connect-non-signal | |
parent | a5ff4acabe83ee0e9fde223d06db5b79602e7f90 (diff) |
connect-non-signal: Make it know about QOverload
BUG: 392441
Diffstat (limited to 'tests/connect-non-signal')
-rw-r--r-- | tests/connect-non-signal/main.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/connect-non-signal/main.cpp b/tests/connect-non-signal/main.cpp index e41c5c6f..ecd4c13a 100644 --- a/tests/connect-non-signal/main.cpp +++ b/tests/connect-non-signal/main.cpp @@ -1,5 +1,5 @@ #include <QtCore/QObject> - +#include <QtWidgets/QComboBox> class MyObj; class MyObj : public QObject { @@ -51,3 +51,9 @@ void test3() QObject::connect(o, &MyDerivedObj::myVirtualSig, o, &MyObj::foo); // Warn, overridden but not a signal now QObject::connect(o, &MyObj::myVirtualSig, o, &MyObj::foo); // OK } + +void test_bug392441() +{ + QComboBox *combo; + QObject::connect(combo, QOverload<const QString &>::of(&QComboBox::currentIndexChanged), [] (QString) {}); // OK +} |