aboutsummaryrefslogtreecommitdiffstats
path: root/tests/old-style-connect/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/old-style-connect/main.cpp')
-rw-r--r--tests/old-style-connect/main.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/tests/old-style-connect/main.cpp b/tests/old-style-connect/main.cpp
index 2da8117f..4303fdff 100644
--- a/tests/old-style-connect/main.cpp
+++ b/tests/old-style-connect/main.cpp
@@ -6,8 +6,8 @@
#include <QtWidgets/QAction>
#include <QtWidgets/QProgressDialog>
#include <QtDBus/QDBusInterface>
-
-
+#include <QtWidgets/QMenu>
+#include <QtWidgets/QMessageBox>
@@ -366,4 +366,21 @@ void testStatic()
TestStatic::disconnect(test, SIGNAL(destroyed(QObject*)), test, SLOT(test(QObject*)));
}
+void test1ArgDisconnect()
+{
+ QObject *o;
+ o->disconnect(SIGNAL(destroyed()));
+}
+
+void testQMenuAndQMessageBox()
+{
+ QMenu m;
+ OtherObj o;
+ m.addAction("test", &o, SLOT(otherSlot())); // Warn
+ m.addAction("test", &o, &OtherObj::otherSlot); // OK
+ QMessageBox box;
+ box.open(); // OK
+ box.open(&o,SLOT(otherSlot())); // Warn
+}
+
#include "main.moc"