1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +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; QStringList dirList;
for (int i = 0; i < ui.directoryListWidget->count(); ++i) for (int i = 0; i < ui.directoryListWidget->count(); ++i)
{ {
if (ui.directoryListWidget->item(i)->flags() & Qt::ItemIsEnabled) const QListWidgetItem* item = ui.directoryListWidget->item(i);
dirList.append(ui.directoryListWidget->item(i)->text()); if (item->flags() & Qt::ItemIsEnabled)
dirList.append(item->text());
} }
return dirList; return dirList;
} }