summaryrefslogtreecommitdiffstats
path: root/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp')
-rw-r--r--tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp30
1 files changed, 25 insertions, 5 deletions
diff --git a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
index ab750dff330..fe9214c5513 100644
--- a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
+++ b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
@@ -13,11 +13,6 @@
#include <QDBusInterface>
#include <QDBusConnectionInterface>
-#ifdef Q_OS_UNIX
-# include <sys/types.h>
-# include <signal.h>
-#endif
-
void MyObject::method(const QDBusMessage &msg)
{
path = msg.path();
@@ -1473,6 +1468,31 @@ void tst_QDBusConnection::parentClassSignal()
QTRY_COMPARE(recv.signalsReceived, 2);
}
+// see also tst_qdbusconnection_delayed
+void tst_QDBusConnection::delayedDeliveryReenabledAfterUsedInMainThread()
+{
+#if !QT_CONFIG(process)
+ QSKIP("Test requires QProcess");
+#elif defined(HAS_HOOKSETUPFUNCTION)
+ QSKIP("No difference to run by tst_QDBusConnection");
+#else
+# if defined(Q_OS_WIN)
+# define EXE ".exe"
+# else
+# define EXE ""
+# endif
+ if (!QCoreApplication::instance())
+ QSKIP("Test requires a QCoreApplication");
+
+ QProcess process;
+ process.start(QFINDTESTDATA("qdbusdelayeddeliveryreenablehelper" EXE));
+ QVERIFY2(process.waitForFinished(25000), qPrintable(process.errorString()));
+ QCOMPARE(process.readAllStandardError(), QString());
+ QCOMPARE(process.exitCode(), 0);
+# undef EXE
+#endif
+}
+
QString MyObject::path;
QString MyObjectWithoutInterface::path;
QString MyObjectWithoutInterface::interface;