forked from qt-creator/qt-creator
Fix CppProjectUpdater cancelAndWaitForFinished
The code was pushing an additional QFutureInterface through the whole chain of functions, which was used for canceling. But since it was never started (and never finished, and never used for reporting results), calling waitForFinshed on it never had any effect with Qt5 and locks up with Qt6. Instead of using a separate QFutureInterface, use the actual QFuture that is available and intended for it. Fixes: QTCREATORBUG-24902 Change-Id: I5a49bcecc9cf70fbffa93aee4293004f9369df58 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -106,17 +106,13 @@ public:
|
||||
|
||||
QFuture<void> updateSourceFiles(const QSet<QString> &sourceFiles,
|
||||
ProgressNotificationMode mode = ReservedProgressNotification);
|
||||
QFuture<void> updateSourceFiles(const QFutureInterface<void> &superFuture,
|
||||
const QSet<QString> &sourceFiles,
|
||||
ProgressNotificationMode mode = ReservedProgressNotification);
|
||||
void updateCppEditorDocuments(bool projectsUpdated = false) const;
|
||||
WorkingCopy workingCopy() const;
|
||||
QByteArray codeModelConfiguration() const;
|
||||
|
||||
QList<ProjectInfo> projectInfos() const;
|
||||
ProjectInfo projectInfo(ProjectExplorer::Project *project) const;
|
||||
QFuture<void> updateProjectInfo(QFutureInterface<void> &futureInterface,
|
||||
const ProjectInfo &newProjectInfo);
|
||||
QFuture<void> updateProjectInfo(const ProjectInfo &newProjectInfo);
|
||||
|
||||
/// \return The project part with the given project file
|
||||
ProjectPart::Ptr projectPartForId(const QString &projectPartId) const override;
|
||||
@@ -274,7 +270,7 @@ private:
|
||||
void initializeBuiltinModelManagerSupport();
|
||||
void delayedGC();
|
||||
void recalculateProjectPartMappings();
|
||||
void watchForCanceledProjectIndexer(const QVector<QFuture<void> > &futures,
|
||||
void watchForCanceledProjectIndexer(const QFuture<void> &future,
|
||||
ProjectExplorer::Project *project);
|
||||
|
||||
void replaceSnapshot(const CPlusPlus::Snapshot &newSnapshot);
|
||||
|
||||
Reference in New Issue
Block a user