Python: Allow installing multiple pip packages in one task

Change-Id: If6cc1373cd38c07b29ac48fa51bf0ed35d6f104b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2023-01-24 11:28:28 +01:00
parent 4b73de5580
commit f5c41a7f83
4 changed files with 32 additions and 16 deletions

View File

@@ -66,7 +66,8 @@ class PipInstallTask : public QObject
Q_OBJECT
public:
explicit PipInstallTask(const Utils::FilePath &python);
void setPackage(const PipPackage &package);
void addPackage(const PipPackage &package);
void setPackages(const QList<PipPackage> &packages);
void run();
signals:
@@ -78,8 +79,10 @@ private:
void handleOutput();
void handleError();
QString packagesDisplayName() const;
const Utils::FilePath m_python;
PipPackage m_package;
QList<PipPackage> m_packages;
Utils::QtcProcess m_process;
QFutureInterface<void> m_future;
QFutureWatcher<void> m_watcher;