AutotoolsPM: Make MakefileParser cancelable

Change-Id: Iccd3c54c401433b82f567cfef281a0043af2efff
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2024-07-15 13:28:18 +02:00
parent d65bed648f
commit 1d3de2b5be
3 changed files with 15 additions and 33 deletions

View File

@@ -34,7 +34,7 @@ AutotoolsBuildSystem::~AutotoolsBuildSystem() = default;
static void parseMakefile(QPromise<MakefileParserOutputData> &promise, const QString &makefile)
{
MakefileParser parser(makefile);
if (parser.parse())
if (parser.parse(QFuture<void>(promise.future())))
promise.addResult(parser.outputData());
else
promise.future().cancel();