diff options
Diffstat (limited to 'common/resourceaccess.cpp')
-rw-r--r-- | common/resourceaccess.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp index 85dda6d..fe4293d 100644 --- a/common/resourceaccess.cpp +++ b/common/resourceaccess.cpp | |||
@@ -151,7 +151,6 @@ KAsync::Job<QSharedPointer<QLocalSocket>> ResourceAccess::connectToServer(const | |||
151 | { | 151 | { |
152 | auto s = QSharedPointer<QLocalSocket>{new QLocalSocket, &QObject::deleteLater}; | 152 | auto s = QSharedPointer<QLocalSocket>{new QLocalSocket, &QObject::deleteLater}; |
153 | return KAsync::start<QSharedPointer<QLocalSocket>>([identifier, s](KAsync::Future<QSharedPointer<QLocalSocket>> &future) { | 153 | return KAsync::start<QSharedPointer<QLocalSocket>>([identifier, s](KAsync::Future<QSharedPointer<QLocalSocket>> &future) { |
154 | s->setServerName(identifier); | ||
155 | auto context = new QObject; | 154 | auto context = new QObject; |
156 | QObject::connect(s.data(), &QLocalSocket::connected, context, [&future, &s, context]() { | 155 | QObject::connect(s.data(), &QLocalSocket::connected, context, [&future, &s, context]() { |
157 | Q_ASSERT(s); | 156 | Q_ASSERT(s); |
@@ -163,7 +162,7 @@ KAsync::Job<QSharedPointer<QLocalSocket>> ResourceAccess::connectToServer(const | |||
163 | delete context; | 162 | delete context; |
164 | future.setError(-1, "Failed to connect to server."); | 163 | future.setError(-1, "Failed to connect to server."); |
165 | }); | 164 | }); |
166 | s->open(); | 165 | s->connectToServer(identifier); |
167 | }); | 166 | }); |
168 | } | 167 | } |
169 | 168 | ||