diff options
Diffstat (limited to 'tests/old-style-connect/not-in-hierarchy.cpp')
-rw-r--r-- | tests/old-style-connect/not-in-hierarchy.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/old-style-connect/not-in-hierarchy.cpp b/tests/old-style-connect/not-in-hierarchy.cpp new file mode 100644 index 00000000..a562ddc3 --- /dev/null +++ b/tests/old-style-connect/not-in-hierarchy.cpp @@ -0,0 +1,22 @@ +#include <QtCore/QObject> + +class A : public QObject { +public slots: + void OnEvent() {} +}; + +class B : public QObject { +public slots: + void OnEvent() {} +}; + +class C : public QObject +{ + C(QObject *client) + { + connect(this, SIGNAL(mysig()), client, SLOT(OnEvent())); // TODO: Would be nice to not warn in this case + } + +signals: + void mysig(); +}; |