summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Kampas <martin.kampas@tieto.com>2013-11-12 08:09:22 +0100
committerDavid Edmundson <kde@davidedmundson.co.uk>2014-01-28 00:06:39 +0100
commitd6435eb0c335bab46d33d727560e2732bcd203aa (patch)
tree3b4babe468e6419487c878b2dc8a34e48f69b09d /tests
parent1adfbc3329dfa604165d9fd197abb14000e1ac1f (diff)
Fix TestDBusProxyFactory::testDropRefs
(Hopefully) prevent getting the new proxy instantiated on the very same address. Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/dbus/dbus-proxy-factory.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/dbus/dbus-proxy-factory.cpp b/tests/dbus/dbus-proxy-factory.cpp
index 67c8ab53..8596ea93 100644
--- a/tests/dbus/dbus-proxy-factory.cpp
+++ b/tests/dbus/dbus-proxy-factory.cpp
@@ -1,4 +1,5 @@
#include <QtCore/QDebug>
+#include <QtCore/QScopedPointer>
#include <QtCore/QTimer>
#include <QtDBus/QtDBus>
#include <QtTest/QtTest>
@@ -222,6 +223,9 @@ void TestDBusProxyFactory::testDropRefs()
Connection *firstPtr = firstProxy.data();
firstProxy.reset();
+ // Hopefully this prevents getting the new proxy instantiated on the very same address
+ QScopedPointer<char, QScopedPointerArrayDeleter<char> > hole(new char[sizeof(Connection)]);
+
PendingReady *different = mFactory->proxy(mConnName1, mConnPath1,
ChannelFactory::create(QDBusConnection::sessionBus()),
ContactFactory::create());