diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2024-02-22 18:22:10 +0100 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2024-02-23 07:13:54 +0000 |
commit | 97ebd272538c23672c1f925ec4484cdbdb4235d3 (patch) | |
tree | 55a4c1f0f4a1175ede72e51998b319c1d6271d73 | |
parent | 0a3c0ad1f5a08bd544fe70c204df96566ea23101 (diff) |
QmlJsPluginDumper: Ensure we don't take results from the canceled futures
Amends 91c1c244a1256b2dc9979edb1a3ce83c28ef5636
Fixes: QTCREATORBUG-30424
Change-Id: Ie0bddb79362945a040c6cb95edf37fbec3ed064d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
-rw-r--r-- | src/libs/qmljs/qmljsplugindumper.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libs/qmljs/qmljsplugindumper.cpp b/src/libs/qmljs/qmljsplugindumper.cpp index b2591fbf0a..36f2cd802d 100644 --- a/src/libs/qmljs/qmljsplugindumper.cpp +++ b/src/libs/qmljs/qmljsplugindumper.cpp @@ -569,6 +569,9 @@ void PluginDumper::loadQmltypesFile(const FilePaths &qmltypesFilePaths, Utils::onFinished(loadQmlTypeDescription(qmltypesFilePaths), this, [this, qmltypesFilePaths, libraryPath, libraryInfo] (const QFuture<PluginDumper::QmlTypeDescription> &typesFuture) { + if (typesFuture.isCanceled() || typesFuture.resultCount() == 0) + return; + PluginDumper::QmlTypeDescription typesResult = typesFuture.result(); if (!typesResult.dependencies.isEmpty()) { @@ -576,6 +579,9 @@ void PluginDumper::loadQmltypesFile(const FilePaths &qmltypesFilePaths, QSharedPointer<QSet<FilePath>>()), this, [typesResult, libraryInfo, libraryPath, this] (const QFuture<PluginDumper::DependencyInfo> &loadFuture) { + if (loadFuture.isCanceled() || loadFuture.resultCount() == 0) + return; + PluginDumper::DependencyInfo loadResult = loadFuture.result(); QStringList errors = typesResult.errors; QStringList warnings = typesResult.errors; |