on xenial help sign in
quickListIndex -> actionIndex as changed in unity-api
commit1e491d56514997e7ff5b45530d7b475760c6ee2e authorMichael Zanetti <michael.zanetti@canonical.com> dateMon 8 Jul 2013, 14:57 (13 years ago) parent8ef032c
4 files changed+5−5
plugins/Unity/Launcher/launchermodel.cpp+2−2 plugins/Unity/Launcher/launchermodel.h+1−1 tests/mocks/Unity/Launcher/MockLauncherModel.cpp+1−1 tests/mocks/Unity/Launcher/MockLauncherModel.h+1−1
plugins/Unity/Launcher/launchermodel.cpp+2−2
@@ -130,7 +130,7 @@ void LauncherModel::requestRemove(const QString &appId)
130130 storeAppList();
131131}
132132
133−void LauncherModel::quickListActionInvoked(const QString &appId, int quickListIndex)
133+void LauncherModel::quickListActionInvoked(const QString &appId, int actionIndex)
134134{
135135 int index = findApplication(appId);
136136 if (index < 0) {
@@ -139,7 +139,7 @@ void LauncherModel::quickListActionInvoked(const QString &appId, int quickListIn
139139
140140 QuickListModel *model = qobject_cast<QuickListModel*>(m_list.at(index)->quickList());
141141 if (model) {
142− QString actionId = model->get(quickListIndex).actionId();
142+ QString actionId = model->get(actionIndex).actionId();
143143 m_backend->triggerQuickListAction(appId, actionId);
144144 }
145145}
plugins/Unity/Launcher/launchermodel.h+1−1
@@ -47,7 +47,7 @@ public:
4747 Q_INVOKABLE void move(int oldIndex, int newIndex);
4848 Q_INVOKABLE void pin(const QString &appId, int index = -1);
4949 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);
5151
5252private:
5353 void storeAppList();
tests/mocks/Unity/Launcher/MockLauncherModel.cpp+1−1
@@ -133,7 +133,7 @@ void MockLauncherModel::requestRemove(const QString &appId)
133133 }
134134}
135135
136−void MockLauncherModel::quickListActionInvoked(const QString &appId, int quickListIndex)
136+void MockLauncherModel::quickListActionInvoked(const QString &appId, int actionIndex)
137137{
138138 Q_UNUSED(appId)
139139 Q_UNUSED(quickListIndex)
tests/mocks/Unity/Launcher/MockLauncherModel.h+1−1
@@ -42,7 +42,7 @@ public:
4242 Q_INVOKABLE void move(int oldIndex, int newIndex);
4343 Q_INVOKABLE void pin(const QString &appId, int index = -1);
4444 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);
4646
4747private:
4848 int findApp(const QString &appId);