Skip to content

Commit

Permalink
SkinLoader: Avoid detach of Qt container in range loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed May 22, 2021
1 parent afc00bf commit 3ba5bb4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/skin/skinloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ QList<Skin> SkinLoader::getSkins() const {
const QList<QDir> skinSearchPaths = getSkinSearchPaths();
QList<Skin> skins;
for (const QDir& dir : skinSearchPaths) {
for (const QFileInfo& fileInfo : dir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot)) {
const QList<QFileInfo> fileInfos = dir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
for (const QFileInfo& fileInfo : fileInfos) {
QDir skinDir(fileInfo.absoluteFilePath());
if (skinDir.exists(QStringLiteral("skin.xml"))) {
skins.append(Skin(fileInfo));
Expand Down

0 comments on commit 3ba5bb4

Please sign in to comment.