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:
parent
62536d5cf7
commit
b1765cf05a
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user