mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-26 04:32:35 +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;
|
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;
|
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;
|
const Localized thread_localized;
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -1810,13 +1804,8 @@ void game_list_frame::RepaintIcons(const bool& fromSettings)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<int> indices;
|
QtConcurrent::blockingMap(m_game_data, [this](const game_info& game)
|
||||||
for (int i = 0; i < m_game_data.size(); ++i)
|
|
||||||
indices.append(i);
|
|
||||||
|
|
||||||
QtConcurrent::blockingMap(indices, [this](int& i)
|
|
||||||
{
|
{
|
||||||
auto game = m_game_data[i];
|
|
||||||
const QColor color = getGridCompatibilityColor(game->compat.color);
|
const QColor color = getGridCompatibilityColor(game->compat.color);
|
||||||
game->pxmap = PaintedPixmap(game->icon, game->hasCustomConfig, game->hasCustomPadConfig, color);
|
game->pxmap = PaintedPixmap(game->icon, game->hasCustomConfig, game->hasCustomPadConfig, color);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user