summaryrefslogtreecommitdiffstats
path: root/src/libs/installer
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-04-24 10:31:02 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-04-24 09:48:06 +0000
commit82b427b777e2999bf1f6cb3520b72f5103341185 (patch)
tree14f75920019c738faa852a5d26f246db8357640c /src/libs/installer
parentcfc1f596760c1997b39bdfe8a43b4089da685988 (diff)
RemoteObject: Do not use processEvents()
Replace the hand-written calls to processEvents() with socket->waitForConnected(). It's unclear why this wasn't done in the first place (maybe to keep the UI responsive when the IFW was still single-threaded)? Anyhow, this allows delivery of spurious events too, which can lead to weird hang-ups. Task-number: QTBUG-45625 Change-Id: I0ff2b85c05d0cc9d0102cf13791935be83c10536 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'src/libs/installer')
-rw-r--r--src/libs/installer/remoteobject.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/libs/installer/remoteobject.cpp b/src/libs/installer/remoteobject.cpp
index add11fa68..990710609 100644
--- a/src/libs/installer/remoteobject.cpp
+++ b/src/libs/installer/remoteobject.cpp
@@ -77,15 +77,7 @@ bool RemoteObject::authorize()
m_socket = new LocalSocket;
m_socket->connectToServer(RemoteClient::instance().socketName());
- QElapsedTimer stopWatch;
- stopWatch.start();
- while ((m_socket->state() == QLocalSocket::ConnectingState)
- && (stopWatch.elapsed() < 30000)) {
- if ((stopWatch.elapsed() % 2500) == 0)
- QCoreApplication::processEvents();
- }
-
- if (m_socket->state() == QLocalSocket::ConnectedState) {
+ if (m_socket->waitForConnected()) {
bool authorized = callRemoteMethod<bool>(QString::fromLatin1(Protocol::Authorize),
RemoteClient::instance().authorizationKey());
if (authorized)