summaryrefslogtreecommitdiffstats
path: root/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h')
-rw-r--r--tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
index 058f4e8115..4137859414 100644
--- a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
+++ b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
@@ -1,6 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// Copyright (C) 2016 Intel Corporation.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef TST_QDBUSCONNECTION_H
#define TST_QDBUSCONNECTION_H
@@ -21,11 +21,14 @@ public:
BaseObject(QObject *parent = nullptr) : QObject(parent) { }
public slots:
void anotherMethod() { }
+signals:
+ void baseObjectSignal();
};
class MyObject: public BaseObject
{
Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "local.MyObject")
public slots:
void method(const QDBusMessage &msg);
@@ -33,6 +36,9 @@ public:
static QString path;
int callCount;
MyObject(QObject *parent = nullptr) : BaseObject(parent), callCount(0) {}
+
+signals:
+ void myObjectSignal();
};
class MyObjectWithoutInterface: public QObject
@@ -114,6 +120,11 @@ private slots:
void callVirtualObject();
void callVirtualObjectLocal();
void pendingCallWhenDisconnected();
+ void connectionLimit();
+
+ void emptyServerAddress();
+
+ void parentClassSignal();
public:
QString serviceName() const { return "org.qtproject.Qt.Autotests.QDBusConnection"; }
@@ -154,7 +165,7 @@ public:
bool registerObject()
{
- Q_FOREACH (const QString &name, m_connections) {
+ for (const QString &name : std::as_const(m_connections)) {
if (!registerObject(QDBusConnection(name)))
return false;
}
@@ -163,7 +174,7 @@ public:
void unregisterObject()
{
- Q_FOREACH (const QString &name, m_connections) {
+ for (const QString &name : std::as_const(m_connections)) {
QDBusConnection c(name);
c.unregisterObject(m_path);
}