mirror of
https://github.com/tnodir/fort
synced 2024-11-15 16:36:59 +00:00
UI: AppInfoUtil: Handle app's empty FileDescription.
This commit is contained in:
parent
366192a635
commit
6ee83c99d9
@ -112,9 +112,15 @@ bool extractVersionInfo(const QString &appPath, AppInfo &appInfo)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Texts
|
// Texts
|
||||||
appInfo.productName = extractInfoText(infoData, langInfo, L"ProductName");
|
|
||||||
appInfo.companyName = extractInfoText(infoData, langInfo, L"CompanyName");
|
appInfo.companyName = extractInfoText(infoData, langInfo, L"CompanyName");
|
||||||
appInfo.fileDescription = extractInfoText(infoData, langInfo, L"FileDescription");
|
|
||||||
|
const QString productName = extractInfoText(infoData, langInfo, L"ProductName");
|
||||||
|
appInfo.productName = productName;
|
||||||
|
|
||||||
|
const QString fileDescription = extractInfoText(infoData, langInfo, L"FileDescription");
|
||||||
|
appInfo.fileDescription = !fileDescription.isEmpty()
|
||||||
|
? fileDescription
|
||||||
|
: (!productName.isEmpty() ? productName : FileUtil::fileName(appPath));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -128,10 +134,8 @@ bool getInfo(const QString &appPath, AppInfo &appInfo)
|
|||||||
if (appPath.isEmpty())
|
if (appPath.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
appInfo.fileDescription = FileUtil::fileName(appPath);
|
|
||||||
|
|
||||||
if (FileUtil::isSystemApp(appPath)) {
|
if (FileUtil::isSystemApp(appPath)) {
|
||||||
appInfo.fileDescription = appPath;
|
appInfo.fileDescription = FileUtil::systemApp();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user