summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/remoteobject.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-04-14 16:58:37 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-04-16 06:47:21 +0000
commit95ae661cba931a982d12cd68d8b4da392d74bdd0 (patch)
tree301026fb6c779580f3aca80b7734ce361f4f4744 /src/libs/installer/remoteobject.cpp
parentd50e3f94b5b7eea92a8a3bccad926897196c03f8 (diff)
Windows: Fix crashes in elevated installation
Until Qt 5.5.0, QLocalSocket::waitForReadyRead() immediately returns when there are still bytesAvailable(). This means our busy loop for polling new data gets stuck. To work around this we've been explicitly calling processEvents(), which however can have undesired side effects: Namely that non-network events get delivered too, and that 'intermediate' requests are sent to the server, resulting in the protocol getting out of sync - requests get replies from intermediate commands, ultimately leading to crashes. The patch therefore removes the processEvents() call, and instead works around the QLocalSocket::waitForReadyRead() deficiency by subclassing. Task-number: QTIFW-663 Task-number: QTIFW-656 Task-number: QTIFW-659 Change-Id: I4099fa1702cd8dceda954d672c9c3dac0ca7fd66 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/remoteobject.cpp')
-rw-r--r--src/libs/installer/remoteobject.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libs/installer/remoteobject.cpp b/src/libs/installer/remoteobject.cpp
index 581085ab3..add11fa68 100644
--- a/src/libs/installer/remoteobject.cpp
+++ b/src/libs/installer/remoteobject.cpp
@@ -36,6 +36,7 @@
#include "protocol.h"
#include "remoteclient.h"
+#include "localsocket.h"
#include <QCoreApplication>
#include <QElapsedTimer>
@@ -73,7 +74,7 @@ bool RemoteObject::authorize()
if (m_socket)
delete m_socket;
- m_socket = new QLocalSocket;
+ m_socket = new LocalSocket;
m_socket->connectToServer(RemoteClient::instance().socketName());
QElapsedTimer stopWatch;