forked from qt-creator/qt-creator
Docker: Set future after connecting
Fixes a "QFutureWatcher::connect: connecting after calling setFuture()
is likely to produce race".
Amends 2a7bf0fdaf
.
Change-Id: I69391984e2e583491bb978e41812b4f5a4c7b1a6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -602,7 +602,6 @@ DockerDevice::DockerDevice()
|
||||
auto future = DockerApi::instance()->networks();
|
||||
|
||||
auto watcher = new QFutureWatcher<expected_str<QList<Network>>>(this);
|
||||
watcher->setFuture(future);
|
||||
QObject::connect(watcher,
|
||||
&QFutureWatcher<expected_str<QList<Network>>>::finished,
|
||||
this,
|
||||
@@ -622,6 +621,7 @@ DockerDevice::DockerDevice()
|
||||
cb({errorItem});
|
||||
}
|
||||
});
|
||||
watcher->setFuture(future);
|
||||
});
|
||||
|
||||
connect(DockerApi::instance(),
|
||||
|
Reference in New Issue
Block a user