diff options
author | kh1 <karsten.heimrich@digia.com> | 2014-06-03 15:35:37 +0200 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@digia.com> | 2014-06-03 15:48:08 +0200 |
commit | e07968ebb99b7fe4e67c0470ec486a92816036d5 (patch) | |
tree | ad7e3bf5d95cae2ca57de0b745060f7276c72259 /src/libs/installer/remoteobject.cpp | |
parent | 22fb61b60c0686795f9671789ab3393da6c22987 (diff) |
We need to pass the socket to the connect function.
The keep alive thread does try to delete the socket it gets
from the connect method, but since the socket was created in
a different thread and we will hit the:
"Socket notifiers cannot be disabled from another thread" warning.
Change-Id: Ibafcd67f8cdb51b365c3ef230f1ebd447bdd306a
Reviewed-by: Niels Weber <niels.weber@digia.com>
Diffstat (limited to 'src/libs/installer/remoteobject.cpp')
-rw-r--r-- | src/libs/installer/remoteobject.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libs/installer/remoteobject.cpp b/src/libs/installer/remoteobject.cpp index 2c1aa275a..508c9d609 100644 --- a/src/libs/installer/remoteobject.cpp +++ b/src/libs/installer/remoteobject.cpp @@ -75,10 +75,11 @@ bool RemoteObject::connectToServer(const QVariantList &arguments) if (m_socket) m_socket->deleteLater(); - m_socket = RemoteClient::instance().connect(); - if (!m_socket) + QScopedPointer<QTcpSocket> socket(new QTcpSocket); + if (!RemoteClient::instance().connect(socket.data())) return false; + m_socket = socket.take(); m_stream.setDevice(m_socket); m_stream << QString::fromLatin1(Protocol::Create) << m_type; foreach (const QVariant &arg, arguments) |