forked from openkylin/ukui-menu
修改从收藏区域点开应用蓝点不消失的bug
This commit is contained in:
parent
eb1b79fe43
commit
7e1e60ea4a
|
@ -112,9 +112,6 @@ Item {
|
|||
}
|
||||
if (mouse.button === Qt.LeftButton) {
|
||||
appManager.launchApp(id);
|
||||
if (recentInstall) {
|
||||
appManager.appLaunched(id);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -140,9 +137,6 @@ Item {
|
|||
Keys.onPressed: {
|
||||
if (event.key === Qt.Key_Enter || event.key === Qt.Key_Return) {
|
||||
appManager.launchApp(id);
|
||||
if (recentInstall) {
|
||||
appManager.appLaunched(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -346,7 +346,9 @@ void AppDataWorker::fixToTopSlot(const QString &path, const int &num)
|
|||
|
||||
void AppDataWorker::setAppLaunched(const QString &path)
|
||||
{
|
||||
if (m_appManager->m_normalApps.value(path).launched() == 0) {
|
||||
m_applicationInfo->setAppLaunchedState(path);
|
||||
}
|
||||
}
|
||||
|
||||
void AppDataWorker::loadPreInstallAppData()
|
||||
|
|
|
@ -50,6 +50,8 @@ AppManager::AppManager(QObject *parent) : QObject(parent)
|
|||
bool AppManager::launchApp(const QString &desktopFilePath)
|
||||
{
|
||||
Q_EMIT request(UkuiMenuApplication::Hide);
|
||||
AppDataManager::instance()->appLaunch(desktopFilePath);
|
||||
|
||||
if (launchAppWithDBus(desktopFilePath)) {
|
||||
return true;
|
||||
}
|
||||
|
@ -78,11 +80,6 @@ bool AppManager::launchBinaryApp(const QString &app, const QString &args)
|
|||
return QProcess::startDetached(cmd);
|
||||
}
|
||||
|
||||
void AppManager::appLaunched(const QString &desktopFilePath)
|
||||
{
|
||||
AppDataManager::instance()->appLaunch(desktopFilePath);
|
||||
}
|
||||
|
||||
bool AppManager::launchAppWithDBus(const QString &app)
|
||||
{
|
||||
if (!m_appManagerDbusInterface) {
|
||||
|
|
|
@ -35,7 +35,6 @@ public:
|
|||
|
||||
Q_INVOKABLE bool launchApp(const QString &desktopFilePath);
|
||||
Q_INVOKABLE bool launchBinaryApp(const QString &app, const QString &args = QString());
|
||||
Q_INVOKABLE void appLaunched(const QString &desktopFilePath);
|
||||
|
||||
private:
|
||||
explicit AppManager(QObject *parent = nullptr);
|
||||
|
|
Loading…
Reference in New Issue