aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/python/pythonrunconfiguration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/python/pythonrunconfiguration.cpp')
-rw-r--r--src/plugins/python/pythonrunconfiguration.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/plugins/python/pythonrunconfiguration.cpp b/src/plugins/python/pythonrunconfiguration.cpp
index dc383961172..552d41128b3 100644
--- a/src/plugins/python/pythonrunconfiguration.cpp
+++ b/src/plugins/python/pythonrunconfiguration.cpp
@@ -9,6 +9,7 @@
#include "pysideuicextracompiler.h"
#include "pythonconstants.h"
#include "pythonlanguageclient.h"
+#include "pythonplugin.h"
#include "pythonproject.h"
#include "pythonsettings.h"
#include "pythontr.h"
@@ -31,6 +32,7 @@
#include <utils/aspects.h>
#include <utils/fileutils.h>
+#include <utils/futuresynchronizer.h>
#include <utils/layoutbuilder.h>
#include <utils/outputformatter.h>
#include <utils/theme/theme.h>
@@ -241,15 +243,12 @@ void PythonRunConfigurationPrivate::checkForPySide(const FilePath &python,
{
const PipPackage package(pySidePackageName);
QObject::disconnect(m_watcherConnection);
- m_watcherConnection = QObject::connect(&m_watcher,
- &QFutureWatcher<PipPackageInfo>::finished,
- q,
- [=]() {
- handlePySidePackageInfo(m_watcher.result(),
- python,
- pySidePackageName);
- });
- m_watcher.setFuture(Pip::instance(python)->info(package));
+ m_watcherConnection = QObject::connect(&m_watcher, &QFutureWatcherBase::finished, q, [=] {
+ handlePySidePackageInfo(m_watcher.result(), python, pySidePackageName);
+ });
+ const auto future = Pip::instance(python)->info(package);
+ m_watcher.setFuture(future);
+ PythonPlugin::futureSynchronizer()->addFuture(future);
}
void PythonRunConfigurationPrivate::handlePySidePackageInfo(const PipPackageInfo &pySideInfo,