mirror of
https://github.com/tnodir/fort
synced 2024-11-15 07:25:18 +00:00
UI: AppInfoCache: Get by normalized path
This commit is contained in:
parent
1dff5f7345
commit
22e50a03b8
@ -15,7 +15,7 @@ namespace {
|
||||
|
||||
const QLoggingCategory LC("appInfo");
|
||||
|
||||
constexpr int DATABASE_USER_VERSION = 5;
|
||||
constexpr int DATABASE_USER_VERSION = 6;
|
||||
|
||||
constexpr int APP_CACHE_MAX_COUNT = 2000;
|
||||
|
||||
|
@ -263,7 +263,7 @@ void ConfAppManager::logBlockedApp(const LogEntryBlocked &logEntry)
|
||||
if (appIdByPath(appPath) > 0)
|
||||
return; // already added by user
|
||||
|
||||
const QString appName = IoC<AppInfoCache>()->appName(appOriginPath);
|
||||
const QString appName = IoC<AppInfoCache>()->appName(appPath);
|
||||
|
||||
App app;
|
||||
app.blocked = logEntry.blocked();
|
||||
|
@ -646,8 +646,13 @@ void ProgramEditDialog::fillEditName()
|
||||
if (appPath.isEmpty())
|
||||
return;
|
||||
|
||||
const QString appName =
|
||||
isWildcard() ? appPath.replace('\n', ' ') : IoC<AppInfoCache>()->appName(appPath);
|
||||
QString appName;
|
||||
if (isWildcard()) {
|
||||
appName = appPath.left(64).replace('\n', ' ');
|
||||
} else {
|
||||
appPath = FileUtil::normalizePath(appPath);
|
||||
appName = IoC<AppInfoCache>()->appName(appPath);
|
||||
}
|
||||
|
||||
m_editName->setText(appName);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user