GUI: Refactoring
This commit is contained in:
parent
d181e98d02
commit
ebb3912396
|
@ -522,15 +522,17 @@ QString CheckThread::getAddonFilePath(const QString &dataDir, const QString &add
|
||||||
|
|
||||||
if (!dataDir.isEmpty()) {
|
if (!dataDir.isEmpty()) {
|
||||||
foreach (const QString p, paths) {
|
foreach (const QString p, paths) {
|
||||||
if (QFileInfo(dataDir + p + addonFile).exists())
|
const QString filePath(dataDir + p + addonFile);
|
||||||
return dataDir + p + addonFile;
|
if (QFileInfo(filePath).exists())
|
||||||
|
return filePath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString appPath = QApplication::applicationDirPath();
|
const QString appPath = QApplication::applicationDirPath();
|
||||||
foreach (const QString p, paths) {
|
foreach (const QString p, paths) {
|
||||||
if (QFileInfo(appPath + p + addonFile).exists())
|
const QString filePath(appPath + p + addonFile);
|
||||||
return appPath + p + addonFile;
|
if (QFileInfo(filePath).exists())
|
||||||
|
return filePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
return QString();
|
return QString();
|
||||||
|
|
Loading…
Reference in New Issue