summaryrefslogtreecommitdiffstats
path: root/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qlocalsocket/tst_qlocalsocket.cpp')
-rw-r--r--tests/auto/qlocalsocket/tst_qlocalsocket.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
index 97058d3..a8aab19 100644
--- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
@@ -124,8 +124,6 @@ tst_QLocalSocket::tst_QLocalSocket()
#endif
))
qWarning() << "lackey executable doesn't exists!";
-
- QLocalServer::removeServer("tst_localsocket");
}
tst_QLocalSocket::~tst_QLocalSocket()
@@ -150,7 +148,13 @@ public:
LocalServer() : QLocalServer()
{
connect(this, SIGNAL(newConnection()), this, SLOT(slotNewConnection()));
- };
+ }
+
+ bool listen(const QString &name)
+ {
+ removeServer(name);
+ return QLocalServer::listen(name);
+ }
QList<int> hits;
@@ -555,7 +559,7 @@ void tst_QLocalSocket::sendData()
// QLocalSocket/Server can take a name or path, check that it works as expected
void tst_QLocalSocket::fullPath()
{
- QLocalServer server;
+ LocalServer server;
QString name = "qlocalsocket_pathtest";
#if defined(Q_OS_SYMBIAN)
QString path = "";
@@ -875,7 +879,7 @@ void tst_QLocalSocket::recycleServer()
unlink("recycletest1");
#endif
- QLocalServer server;
+ LocalServer server;
QLocalSocket client;
QVERIFY(server.listen("recycletest1"));