aboutsummaryrefslogtreecommitdiffstats
path: root/tests/connect-not-normalized
diff options
context:
space:
mode:
authorSergio Martins <smartins@kde.org>2017-07-04 10:52:34 +0100
committerSergio Martins <smartins@kde.org>2017-07-04 10:52:34 +0100
commitff67d521e8bf44239b34c299c6a106568a3a6b4e (patch)
treea9ff4b3de9929900890edcf0fb9153f873f1dd31 /tests/connect-not-normalized
parent5044c41675581ddd8311a081061b9cdcd18e0f19 (diff)
connect-not-normalized: Add another unit-test
volker reported some case wasn't being caught, I can't reproduce it though.
Diffstat (limited to 'tests/connect-not-normalized')
-rw-r--r--tests/connect-not-normalized/main.cpp15
-rw-r--r--tests/connect-not-normalized/main.cpp.expected1
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/connect-not-normalized/main.cpp b/tests/connect-not-normalized/main.cpp
index 5beceafb..b6560736 100644
--- a/tests/connect-not-normalized/main.cpp
+++ b/tests/connect-not-normalized/main.cpp
@@ -30,3 +30,18 @@ void testConnect()
o.disconnect(&o, SLOT(void foo(const int))); // OK
}
+
+
+class MyObj :public QObject
+{
+public:
+ MyObj()
+ {
+ // volker mentioned this not working, but I can't reproduce
+ connect(ui->host, SIGNAL(textChanged(QString)), // OK
+ SLOT(validateHostAddress(const QString&))); // OK
+ }
+
+ MyObj *ui;
+ MyObj *host;
+};
diff --git a/tests/connect-not-normalized/main.cpp.expected b/tests/connect-not-normalized/main.cpp.expected
index 1120e8fa..ca57945f 100644
--- a/tests/connect-not-normalized/main.cpp.expected
+++ b/tests/connect-not-normalized/main.cpp.expected
@@ -4,3 +4,4 @@ connect-not-normalized/main.cpp:18:5: warning: Signature is not normalized. Use
connect-not-normalized/main.cpp:20:5: warning: Signature is not normalized. Use QVariant instead of const QVariant & [-Wclazy-connect-not-normalized]
connect-not-normalized/main.cpp:26:19: warning: Signature is not normalized. Use destroyed(int,int) instead of destroyed(int, int)
connect-not-normalized/main.cpp:27:19: warning: Signature is not normalized. Use void foo(int) instead of void foo(const int)
+connect-not-normalized/main.cpp:42:17: warning: Signature is not normalized. Use validateHostAddress(QString) instead of validateHostAddress(const QString&)