libcalamares: deal with QtConcurrent::run

In Qt5, you pass the pointer-to-object for a member-function-call
first, and in Qt6, as a regular parameter.
This commit is contained in:
Adriaan de Groot 2023-09-03 15:35:03 +02:00
parent fe8939e745
commit e0b820abbc

View File

@ -49,7 +49,11 @@ RequirementsChecker::run()
for ( const auto& module : m_modules )
{
Watcher* watcher = new Watcher( this );
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
watcher->setFuture( QtConcurrent::run( this, &RequirementsChecker::addCheckedRequirements, module ) );
#else
watcher->setFuture( QtConcurrent::run( &RequirementsChecker::addCheckedRequirements, this, module ) );
#endif
watcher->setObjectName( module->name() );
m_watchers.append( watcher );
connect( watcher, &Watcher::finished, this, &RequirementsChecker::finished );