aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/debugger
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2016-06-27 22:34:13 +0300
committerOrgad Shaneh <orgads@gmail.com>2016-06-28 12:54:02 +0000
commit847637708f398af968d2163c907dbe3b93587699 (patch)
treebc98545456c854f2f30c04cd7ed987795ab8c42b /tests/manual/debugger
parent4d9f79964dc0eb1c24c84c753942f0c73488a414 (diff)
Tests: Use Qt5-style connects
The heavy lifting was done by clazy. Change-Id: If3332a2b4a6d011d2cb74996f5dd750452093f31 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests/manual/debugger')
-rw-r--r--tests/manual/debugger/qquick1/myplugin/mytype.cpp2
-rw-r--r--tests/manual/debugger/qquick1/myplugin/mytype.h3
-rw-r--r--tests/manual/debugger/qquick2/myplugin/mytype.cpp2
-rw-r--r--tests/manual/debugger/qquick2/myplugin/mytype.h3
-rw-r--r--tests/manual/debugger/simple/simple_test_app.cpp19
-rw-r--r--tests/manual/debugger/spacy path/app with space.cpp4
-rw-r--r--tests/manual/debugger/spacy-file/app with space.cpp4
7 files changed, 17 insertions, 20 deletions
diff --git a/tests/manual/debugger/qquick1/myplugin/mytype.cpp b/tests/manual/debugger/qquick1/myplugin/mytype.cpp
index d8e5275571..10127323b6 100644
--- a/tests/manual/debugger/qquick1/myplugin/mytype.cpp
+++ b/tests/manual/debugger/qquick1/myplugin/mytype.cpp
@@ -10,7 +10,7 @@ MyType::MyType(QObject *parent)
updateTimerText();
m_timer = new QTimer(this);
m_timer->setInterval(1000);
- connect(m_timer, SIGNAL(timeout()), SLOT(updateTimerText()));
+ connect(m_timer, &QTimer::timeout, this, &MyType::updateTimerText);
m_timer->start();
}
diff --git a/tests/manual/debugger/qquick1/myplugin/mytype.h b/tests/manual/debugger/qquick1/myplugin/mytype.h
index 30c90c9ef6..e833fe81b8 100644
--- a/tests/manual/debugger/qquick1/myplugin/mytype.h
+++ b/tests/manual/debugger/qquick1/myplugin/mytype.h
@@ -20,10 +20,9 @@ public:
signals:
void timeChanged(const QString &newText);
-private slots:
+private:
void updateTimerText();
-private:
QString m_timeText;
QTimer *m_timer;
diff --git a/tests/manual/debugger/qquick2/myplugin/mytype.cpp b/tests/manual/debugger/qquick2/myplugin/mytype.cpp
index f3232af870..f36105528c 100644
--- a/tests/manual/debugger/qquick2/myplugin/mytype.cpp
+++ b/tests/manual/debugger/qquick2/myplugin/mytype.cpp
@@ -10,7 +10,7 @@ MyType::MyType(QObject *parent)
updateTimerText();
m_timer = new QTimer(this);
m_timer->setInterval(1000);
- connect(m_timer, SIGNAL(timeout()), SLOT(updateTimerText()));
+ connect(m_timer, &QTimer::timeout, this, &MyType::updateTimerText);
m_timer->start();
}
diff --git a/tests/manual/debugger/qquick2/myplugin/mytype.h b/tests/manual/debugger/qquick2/myplugin/mytype.h
index 30c90c9ef6..e833fe81b8 100644
--- a/tests/manual/debugger/qquick2/myplugin/mytype.h
+++ b/tests/manual/debugger/qquick2/myplugin/mytype.h
@@ -20,10 +20,9 @@ public:
signals:
void timeChanged(const QString &newText);
-private slots:
+private:
void updateTimerText();
-private:
QString m_timeText;
QTimer *m_timer;
diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp
index 695de846c7..20f74e347c 100644
--- a/tests/manual/debugger/simple/simple_test_app.cpp
+++ b/tests/manual/debugger/simple/simple_test_app.cpp
@@ -1792,10 +1792,10 @@ namespace qobject {
parent.setObjectName("A Parent");
QObject child(&parent);
child.setObjectName("A Child");
- QObject::connect(&child, SIGNAL(destroyed()), &parent, SLOT(deleteLater()));
- QObject::connect(&child, SIGNAL(destroyed()), &child, SLOT(deleteLater()));
- QObject::disconnect(&child, SIGNAL(destroyed()), &parent, SLOT(deleteLater()));
- QObject::disconnect(&child, SIGNAL(destroyed()), &child, SLOT(deleteLater()));
+ QObject::connect(&child, &QObject::destroyed, &parent, &QObject::deleteLater);
+ QObject::connect(&child, &QObject::destroyed, &child, &QObject::deleteLater);
+ QObject::disconnect(&child, &QObject::destroyed, &parent, &QObject::deleteLater);
+ QObject::disconnect(&child, &QObject::destroyed, &child, &QObject::deleteLater);
child.setObjectName("A renamed Child");
BREAK_HERE;
// Check child "A renamed Child" QObject.
@@ -1889,11 +1889,11 @@ namespace qobject {
QObject ob1;
ob1.setObjectName("Another Object");
- QObject::connect(&ob, SIGNAL(destroyed()), &ob1, SLOT(deleteLater()));
- QObject::connect(&ob1, SIGNAL(destroyed()), &ob, SLOT(deleteLater()));
+ QObject::connect(&ob, &QObject::destroyed, &ob1, &QObject::deleteLater);
+ QObject::connect(&ob1, &QObject::destroyed, &ob, &QObject::deleteLater);
BREAK_HERE;
- QObject::disconnect(&ob, SIGNAL(destroyed()), &ob1, SLOT(deleteLater()));
- QObject::disconnect(&ob1, SIGNAL(destroyed()), &ob, SLOT(deleteLater()));
+ QObject::disconnect(&ob, &QObject::destroyed, &ob1, &QObject::deleteLater);
+ QObject::disconnect(&ob1, &QObject::destroyed, &ob, &QObject::deleteLater);
dummyStatement(&ob, &ob1);
#endif
}
@@ -1930,7 +1930,6 @@ namespace qobject {
Q_OBJECT
public:
Receiver() { setObjectName("Receiver"); }
- public slots:
void aSlot() {
QObject *s = sender();
if (s) {
@@ -1945,7 +1944,7 @@ namespace qobject {
{
Sender sender;
Receiver receiver;
- QObject::connect(&sender, SIGNAL(aSignal()), &receiver, SLOT(aSlot()));
+ QObject::connect(&sender, &Sender::aSignal, &receiver, &Receiver::aSlot);
// Break here.
// Single step through signal emission.
sender.doEmit();
diff --git a/tests/manual/debugger/spacy path/app with space.cpp b/tests/manual/debugger/spacy path/app with space.cpp
index af7226bbc3..1dfa82c0ef 100644
--- a/tests/manual/debugger/spacy path/app with space.cpp
+++ b/tests/manual/debugger/spacy path/app with space.cpp
@@ -222,8 +222,8 @@ void testObject(int &argc, char *argv[])
QObject ob1;
ob1.setObjectName("Another Object");
- QObject::connect(&ob, SIGNAL(destroyed()), &ob1, SLOT(deleteLater()));
- QObject::connect(&app, SIGNAL(lastWindowClosed()), &ob, SLOT(deleteLater()));
+ QObject::connect(&ob, &QObject::destroyed, &ob1, &QObject::deleteLater);
+ QObject::connect(&app, &QGuiApplication::lastWindowClosed, &ob, &QObject::deleteLater);
QList<QObject *> obs;
obs.append(&ob);
diff --git a/tests/manual/debugger/spacy-file/app with space.cpp b/tests/manual/debugger/spacy-file/app with space.cpp
index af7226bbc3..1dfa82c0ef 100644
--- a/tests/manual/debugger/spacy-file/app with space.cpp
+++ b/tests/manual/debugger/spacy-file/app with space.cpp
@@ -222,8 +222,8 @@ void testObject(int &argc, char *argv[])
QObject ob1;
ob1.setObjectName("Another Object");
- QObject::connect(&ob, SIGNAL(destroyed()), &ob1, SLOT(deleteLater()));
- QObject::connect(&app, SIGNAL(lastWindowClosed()), &ob, SLOT(deleteLater()));
+ QObject::connect(&ob, &QObject::destroyed, &ob1, &QObject::deleteLater);
+ QObject::connect(&app, &QGuiApplication::lastWindowClosed, &ob, &QObject::deleteLater);
QList<QObject *> obs;
obs.append(&ob);