forked from qt-creator/qt-creator
Python: Use QtConcurrent invocation for async run
Change-Id: I26254d5c78c3b6ea06ed9baec8e52b988a6e9608 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -14,9 +14,9 @@
|
|||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
|
#include <utils/asynctask.h>
|
||||||
#include <utils/mimeutils.h>
|
#include <utils/mimeutils.h>
|
||||||
#include <utils/qtcprocess.h>
|
#include <utils/qtcprocess.h>
|
||||||
#include <utils/runextensions.h>
|
|
||||||
|
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
@@ -145,7 +145,7 @@ Pip *Pip::instance(const FilePath &python)
|
|||||||
|
|
||||||
QFuture<PipPackageInfo> Pip::info(const PipPackage &package)
|
QFuture<PipPackageInfo> Pip::info(const PipPackage &package)
|
||||||
{
|
{
|
||||||
return Utils::runAsync(&Pip::infoImpl, this, package);
|
return Utils::asyncRun(&Pip::infoImpl, this, package);
|
||||||
}
|
}
|
||||||
|
|
||||||
PipPackageInfo Pip::infoImpl(const PipPackage &package)
|
PipPackageInfo Pip::infoImpl(const PipPackage &package)
|
||||||
|
|||||||
@@ -17,10 +17,10 @@
|
|||||||
#include <texteditor/textdocument.h>
|
#include <texteditor/textdocument.h>
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
|
#include <utils/asynctask.h>
|
||||||
#include <utils/infobar.h>
|
#include <utils/infobar.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/qtcprocess.h>
|
#include <utils/qtcprocess.h>
|
||||||
#include <utils/runextensions.h>
|
|
||||||
|
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
#include <QTextCursor>
|
#include <QTextCursor>
|
||||||
@@ -140,8 +140,7 @@ void PySideInstaller::runPySideChecker(const FilePath &python,
|
|||||||
handlePySideMissing(python, pySide, document);
|
handlePySideMissing(python, pySide, document);
|
||||||
watcher->deleteLater();
|
watcher->deleteLater();
|
||||||
});
|
});
|
||||||
watcher->setFuture(
|
watcher->setFuture(Utils::asyncRun(&missingPySideInstallation, python, pySide));
|
||||||
Utils::runAsync(&missingPySideInstallation, python, pySide));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // Python::Internal
|
} // Python::Internal
|
||||||
|
|||||||
@@ -29,9 +29,9 @@
|
|||||||
#include <texteditor/textdocument.h>
|
#include <texteditor/textdocument.h>
|
||||||
#include <texteditor/texteditor.h>
|
#include <texteditor/texteditor.h>
|
||||||
|
|
||||||
|
#include <utils/asynctask.h>
|
||||||
#include <utils/infobar.h>
|
#include <utils/infobar.h>
|
||||||
#include <utils/qtcprocess.h>
|
#include <utils/qtcprocess.h>
|
||||||
#include <utils/runextensions.h>
|
|
||||||
#include <utils/variablechooser.h>
|
#include <utils/variablechooser.h>
|
||||||
|
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
@@ -341,7 +341,7 @@ void PyLSConfigureAssistant::openDocumentWithPython(const FilePath &python,
|
|||||||
instance()->handlePyLSState(python, watcher->result(), document);
|
instance()->handlePyLSState(python, watcher->result(), document);
|
||||||
watcher->deleteLater();
|
watcher->deleteLater();
|
||||||
});
|
});
|
||||||
watcher->setFuture(Utils::runAsync(&checkPythonLanguageServer, python));
|
watcher->setFuture(Utils::asyncRun(&checkPythonLanguageServer, python));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PyLSConfigureAssistant::handlePyLSState(const FilePath &python,
|
void PyLSConfigureAssistant::handlePyLSState(const FilePath &python,
|
||||||
|
|||||||
Reference in New Issue
Block a user