From a528b3c538f5628e23b485401b7935364b73488d Mon Sep 17 00:00:00 2001 From: reionwong Date: Sun, 29 Aug 2021 21:33:19 +0800 Subject: [PATCH] Optimize pin to dock --- src/applicationmodel.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/applicationmodel.cpp b/src/applicationmodel.cpp index 7039ebb..cc8ac6d 100644 --- a/src/applicationmodel.cpp +++ b/src/applicationmodel.cpp @@ -100,9 +100,13 @@ void ApplicationModel::addItem(const QString &desktopFile) item->visibleName = desktopInfo.value("Name"); item->exec = desktopInfo.value("Exec"); item->desktopPath = desktopFile; + item->isPinned = true; m_appItems << item; endInsertRows(); + emit itemAdded(); + emit countChanged(); + savePinAndUnPinList(); }