Skip to content

Commit

Permalink
Satellite plugin: Restore old, non-threaded solution for Qt5.
Browse files Browse the repository at this point in the history
  • Loading branch information
gzotti committed Aug 28, 2024
1 parent 5ea53ef commit 08ed4bf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plugins/Satellites/src/Satellites.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2820,12 +2820,19 @@ void Satellites::update(double deltaTime)
return;

hintFader.update(static_cast<int>(deltaTime*1000));

#if (QT_VERSION<QT_VERSION_CHECK(6,0,0))
for (const auto& sat : std::as_const(satellites))
{
if (sat->initialized && sat->displayed)
sat->update(core, JD);
}
#else
const auto updateSat = [this, JD](QSharedPointer<Satellite>& sat){
if (sat->initialized && sat->displayed)
sat->update(core, JD);
};
QtConcurrent::blockingMap(QThreadPool::globalInstance(), satellites, updateSat);
#endif
}

void Satellites::draw(StelCore* core)
Expand Down

0 comments on commit 08ed4bf

Please sign in to comment.