mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
Qt: simplify blockingMap occurances
This commit is contained in:
parent
b47a8b9995
commit
313b967217
@ -597,16 +597,10 @@ void game_list_frame::Refresh(const bool fromDrive, const bool scrollAfter)
|
||||
|
||||
QMutex mutex_cat;
|
||||
|
||||
QList<size_t> indices;
|
||||
for (size_t i = 0; i < path_list.size(); ++i)
|
||||
indices.append(i);
|
||||
|
||||
lf_queue<game_info> games;
|
||||
|
||||
QtConcurrent::blockingMap(indices, [&](size_t& i)
|
||||
QtConcurrent::blockingMap(path_list, [&](const std::string& dir)
|
||||
{
|
||||
const std::string dir = path_list[i];
|
||||
|
||||
const Localized thread_localized;
|
||||
|
||||
try
|
||||
@ -1810,13 +1804,8 @@ void game_list_frame::RepaintIcons(const bool& fromSettings)
|
||||
}
|
||||
}
|
||||
|
||||
QList<int> indices;
|
||||
for (int i = 0; i < m_game_data.size(); ++i)
|
||||
indices.append(i);
|
||||
|
||||
QtConcurrent::blockingMap(indices, [this](int& i)
|
||||
QtConcurrent::blockingMap(m_game_data, [this](const game_info& game)
|
||||
{
|
||||
auto game = m_game_data[i];
|
||||
const QColor color = getGridCompatibilityColor(game->compat.color);
|
||||
game->pxmap = PaintedPixmap(game->icon, game->hasCustomConfig, game->hasCustomPadConfig, color);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user