A good use of auto

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2022-11-02 09:13:44 +00:00
parent 8dfa3393dc
commit 6c45a990ef

View File

@ -291,7 +291,7 @@ void ModPage::openUrl(const QUrl& url)
connect(model->activeJob(), &Task::finished, [url, slug, model, view] {
for (int row = 0; row < model->rowCount({}); row++) {
QModelIndex index = model->index(row);
ModPlatform::IndexedPack pack = model->data(index, Qt::UserRole).value<ModPlatform::IndexedPack>();
auto pack = model->data(index, Qt::UserRole).value<ModPlatform::IndexedPack>();
if (pack.slug == slug) {
view->setCurrentIndex(index);
return;