1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00

Do single lookup for widget item

This commit is contained in:
elsid 2023-03-20 23:07:37 +01:00
parent 62536d5cf7
commit b1765cf05a
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

View File

@ -377,8 +377,9 @@ QStringList Launcher::DataFilesPage::selectedDirectoriesPaths() const
QStringList dirList;
for (int i = 0; i < ui.directoryListWidget->count(); ++i)
{
if (ui.directoryListWidget->item(i)->flags() & Qt::ItemIsEnabled)
dirList.append(ui.directoryListWidget->item(i)->text());
const QListWidgetItem* item = ui.directoryListWidget->item(i);
if (item->flags() & Qt::ItemIsEnabled)
dirList.append(item->text());
}
return dirList;
}