1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-23 13:33:50 +03:00

fix Importer::standardPath behavior

This commit is contained in:
Michail Vourlakos 2019-07-22 09:49:04 +03:00
parent 5849105c45
commit cea1155685

View File

@ -220,19 +220,10 @@ QString Importer::standardPath(QString subPath, bool localfirst)
{
QStringList paths = standardPaths(localfirst);
if (localfirst) {
for(const auto &pt : paths) {
QString ptF = pt + "/" +subPath;
if (QFileInfo(ptF).exists()) {
return ptF;
}
}
} else {
for (int i=paths.count()-1; i>=0; i--) {
QString ptF = paths[i] + "/" +subPath;
if (QFileInfo(ptF).exists()) {
return ptF;
}
for(const auto &pt : paths) {
QString ptF = pt + "/" +subPath;
if (QFileInfo(ptF).exists()) {
return ptF;
}
}