on xenial help sign in
some more debugging
b0e9756Michael Zanetti
plugins/Unity/Launcher/launchermodel.cpp+6
@@ -23,6 +23,8 @@
23
23
24#include <unity/shell/application/ApplicationInfoInterface.h>
24#include <unity/shell/application/ApplicationInfoInterface.h>
25
25
26+#include <QDebug>
27+
26using namespace unity::shell::application;
28using namespace unity::shell::application;
27
29
28LauncherModel::LauncherModel(QObject *parent):
30LauncherModel::LauncherModel(QObject *parent):
@@ -156,6 +158,7 @@ void LauncherModel::requestRemove(const QString &appId)
156 }
158 }
157
159
158 if (m_appManager->findApplication(appId)) {
160 if (m_appManager->findApplication(appId)) {
161+ qDebug() << "unpinning app" << appId;
159 m_list.at(index)->setPinned(false);
162 m_list.at(index)->setPinned(false);
160 return;
163 return;
161 }
164 }
@@ -248,6 +251,7 @@ void LauncherModel::storeAppList()
248 QStringList appIds;
251 QStringList appIds;
249 Q_FOREACH(LauncherItem *item, m_list) {
252 Q_FOREACH(LauncherItem *item, m_list) {
250 if (item->pinned()) {
253 if (item->pinned()) {
254+ qDebug() << "storing pinned app:" << item->appId();
251 appIds << item->appId();
255 appIds << item->appId();
252 }
256 }
253 }
257 }
@@ -324,6 +328,8 @@ void LauncherModel::applicationRemoved(const QModelIndex &parent, int row)
324 }
328 }
325 }
329 }
326
330
331+ qDebug() << "app removed:" << appIndex << m_list.at(appIndex)->pinned();
332+
327 if (appIndex > -1 && !m_list.at(appIndex)->pinned()) {
333 if (appIndex > -1 && !m_list.at(appIndex)->pinned()) {
328 beginRemoveRows(QModelIndex(), appIndex, appIndex);
334 beginRemoveRows(QModelIndex(), appIndex, appIndex);
329 m_list.takeAt(appIndex)->deleteLater();
335 m_list.takeAt(appIndex)->deleteLater();