fix: incorrect behavior when parse and launch

Signed-off-by: ComixHe <heyuming@deepin.org>
This commit is contained in:
ComixHe
2023-08-25 18:21:11 +08:00
committed by Comix
parent 3988e0c526
commit ce2148e5cd
4 changed files with 17 additions and 8 deletions

View File

@ -69,10 +69,8 @@ void applyIteratively(QList<QDir> dirs, T &&func)
continue;
}
const auto &infoList =
dir.entryInfoList({"*.desktop"},
QDir::Readable | QDir::AllDirs | QDir::Files | QDir::NoSymLinks | QDir::NoDotAndDotDot,
QDir::Name | QDir::DirsLast);
const auto &infoList = dir.entryInfoList(
{"*.desktop"}, QDir::Readable | QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot, QDir::Name | QDir::DirsLast);
for (const auto &info : infoList) {
if (info.isFile() and func(info)) {