fix: 修复打开部分应用失败的问题

当应用desktop文件中Exec字段内容中已包含双引号,则直接去掉,避免出现字符串包裹字符串的问题,导致部分应用无法正常启动

Log:
Influence: 启动器-应用列表中的所有应用都可以正常启动
Bug: https://pms.uniontech.com/task-view-232525.html
Change-Id: I6eaca9dd23f89ebd1dea5a190a2e06b8f657b754
This commit is contained in:
songwentao 2022-12-29 17:17:49 +08:00
parent fbe80cdf10
commit ff4c3b924c

View File

@ -343,7 +343,7 @@ bool StartManager::doLaunchAppWithOptions(const QString &desktopFile)
return false;
}
launch(&info, info.getCommandLine().c_str(), 0, QStringList());
launch(&info, QString::fromStdString(info.getCommandLine()).remove("\""), 0, QStringList());
dbusHandler->markLaunched(desktopFile);
@ -372,7 +372,7 @@ bool StartManager::doLaunchAppWithOptions(QString desktopFile, uint32_t timestam
return false;
}
launch(&info, info.getCommandLine().c_str(), timestamp, files);
launch(&info, QString::fromStdString(info.getCommandLine()).remove("\""), timestamp, files);
// mark app launched
dbusHandler->markLaunched(desktopFile);