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