on xenial help sign in
quickListIndex -> actionIndex as changed in unity-api
1e491d5Michael Zanetti
plugins/Unity/Launcher/launchermodel.cpp+2−2
@@ -130,7 +130,7 @@ void LauncherModel::requestRemove(const QString &appId)
130 storeAppList();
130 storeAppList();
131}
131}
132
132
133−void LauncherModel::quickListActionInvoked(const QString &appId, int quickListIndex)
133+void LauncherModel::quickListActionInvoked(const QString &appId, int actionIndex)
134{
134{
135 int index = findApplication(appId);
135 int index = findApplication(appId);
136 if (index < 0) {
136 if (index < 0) {
@@ -139,7 +139,7 @@ void LauncherModel::quickListActionInvoked(const QString &appId, int quickListIn
139
139
140 QuickListModel *model = qobject_cast<QuickListModel*>(m_list.at(index)->quickList());
140 QuickListModel *model = qobject_cast<QuickListModel*>(m_list.at(index)->quickList());
141 if (model) {
141 if (model) {
142− QString actionId = model->get(quickListIndex).actionId();
142+ QString actionId = model->get(actionIndex).actionId();
143 m_backend->triggerQuickListAction(appId, actionId);
143 m_backend->triggerQuickListAction(appId, actionId);
144 }
144 }
145}
145}
plugins/Unity/Launcher/launchermodel.h+1−1
@@ -47,7 +47,7 @@ public:
47 Q_INVOKABLE void move(int oldIndex, int newIndex);
47 Q_INVOKABLE void move(int oldIndex, int newIndex);
48 Q_INVOKABLE void pin(const QString &appId, int index = -1);
48 Q_INVOKABLE void pin(const QString &appId, int index = -1);
49 Q_INVOKABLE void requestRemove(const QString &appId);
49 Q_INVOKABLE void requestRemove(const QString &appId);
50− Q_INVOKABLE void quickListActionInvoked(const QString &appId, int quickListIndex);
50+ Q_INVOKABLE void quickListActionInvoked(const QString &appId, int actionIndex);
51
51
52private:
52private:
53 void storeAppList();
53 void storeAppList();
tests/mocks/Unity/Launcher/MockLauncherModel.cpp+1−1
@@ -133,7 +133,7 @@ void MockLauncherModel::requestRemove(const QString &appId)
133 }
133 }
134}
134}
135
135
136−void MockLauncherModel::quickListActionInvoked(const QString &appId, int quickListIndex)
136+void MockLauncherModel::quickListActionInvoked(const QString &appId, int actionIndex)
137{
137{
138 Q_UNUSED(appId)
138 Q_UNUSED(appId)
139 Q_UNUSED(quickListIndex)
139 Q_UNUSED(quickListIndex)
tests/mocks/Unity/Launcher/MockLauncherModel.h+1−1
@@ -42,7 +42,7 @@ public:
42 Q_INVOKABLE void move(int oldIndex, int newIndex);
42 Q_INVOKABLE void move(int oldIndex, int newIndex);
43 Q_INVOKABLE void pin(const QString &appId, int index = -1);
43 Q_INVOKABLE void pin(const QString &appId, int index = -1);
44 Q_INVOKABLE void requestRemove(const QString &appId);
44 Q_INVOKABLE void requestRemove(const QString &appId);
45− Q_INVOKABLE void quickListActionInvoked(const QString &appId, int quickListIndex);
45+ Q_INVOKABLE void quickListActionInvoked(const QString &appId, int actionIndex);
46
46
47private:
47private:
48 int findApp(const QString &appId);
48 int findApp(const QString &appId);