@@ -180,7 +180,7 @@ void LauncherModel::quickListActionInvoked(const QString &appId, int actionIndex
180 LauncherItem *item = m_list.at(index);
180 LauncherItem *item = m_list.at(index);
181 QuickListModel *model = qobject_cast<QuickListModel*>(item->quickList());
181 QuickListModel *model = qobject_cast<QuickListModel*>(item->quickList());
182 if (model) {
182 if (model) {
183− QString actionId = model->get(actionIndex).actionId();
183+ const QString actionId = model->get(actionIndex).actionId();
185 // Check if this is one of the launcher actions we handle ourselves
185 // Check if this is one of the launcher actions we handle ourselves
186 if (actionId == "pin_item") {
186 if (actionId == "pin_item") {
@@ -191,7 +191,8 @@ void LauncherModel::quickListActionInvoked(const QString &appId, int actionIndex
192 } else if (actionId == "launch_item") {
192 } else if (actionId == "launch_item") {
193 QDesktopServices::openUrl(getUrlForAppId(appId));
193 QDesktopServices::openUrl(getUrlForAppId(appId));
194−
194+ } else if (actionId == "stop_item") { // Quit
195+ m_appManager->stopApplication(appId);
195 // Nope, we don't know this action, let the backend forward it to the application
196 // Nope, we don't know this action, let the backend forward it to the application
197 // TODO: forward quicklist action to app, possibly via m_dbusIface
198 // TODO: forward quicklist action to app, possibly via m_dbusIface
@@ -289,7 +290,7 @@ void LauncherModel::storeAppList()
290void LauncherModel::unpin(const QString &appId)
291void LauncherModel::unpin(const QString &appId)
292− int index = findApplication(appId);
293+ const int index = findApplication(appId);
293 if (index < 0) {
294 if (index < 0) {
@@ -320,7 +321,7 @@ int LauncherModel::findApplication(const QString &appId)
321void LauncherModel::progressChanged(const QString &appId, int progress)
322void LauncherModel::progressChanged(const QString &appId, int progress)
323− int idx = findApplication(appId);
324+ const int idx = findApplication(appId);
324 if (idx >= 0) {
325 if (idx >= 0) {
325 LauncherItem *item = m_list.at(idx);
326 LauncherItem *item = m_list.at(idx);
326 item->setProgress(progress);
327 item->setProgress(progress);
@@ -330,7 +331,7 @@ void LauncherModel::progressChanged(const QString &appId, int progress)
331void LauncherModel::countChanged(const QString &appId, int count)
332void LauncherModel::countChanged(const QString &appId, int count)
333− int idx = findApplication(appId);
334+ const int idx = findApplication(appId);
334 if (idx >= 0) {
335 if (idx >= 0) {
335 LauncherItem *item = m_list.at(idx);
336 LauncherItem *item = m_list.at(idx);
336 item->setCount(count);
337 item->setCount(count);
@@ -405,7 +406,7 @@ void LauncherModel::refresh()
406 // Now walk through settings and see if we need to add something
407 // Now walk through settings and see if we need to add something
407 for (int settingsIndex = 0; settingsIndex < m_settings->storedApplications().count(); ++settingsIndex) {
408 for (int settingsIndex = 0; settingsIndex < m_settings->storedApplications().count(); ++settingsIndex) {
408− QString entry = m_settings->storedApplications().at(settingsIndex);
409+ const QString entry = m_settings->storedApplications().at(settingsIndex);
409 int itemIndex = -1;
410 int itemIndex = -1;
410 for (int i = 0; i < m_list.count(); ++i) {
411 for (int i = 0; i < m_list.count(); ++i) {
411 if (m_list.at(i)->appId() == entry) {
412 if (m_list.at(i)->appId() == entry) {
@@ -468,7 +469,7 @@ void LauncherModel::applicationAdded(const QModelIndex &parent, int row)
471− int itemIndex = findApplication(app->appId());
472+ const int itemIndex = findApplication(app->appId());
472 if (itemIndex != -1) {
473 if (itemIndex != -1) {
473 LauncherItem *item = m_list.at(itemIndex);
474 LauncherItem *item = m_list.at(itemIndex);
474 if (!item->recent()) {
475 if (!item->recent()) {
@@ -511,7 +512,7 @@ void LauncherModel::applicationRemoved(const QModelIndex &parent, int row)
512void LauncherModel::focusedAppIdChanged()
513void LauncherModel::focusedAppIdChanged()
514− QString appId = m_appManager->focusedApplicationId();
515+ const QString appId = m_appManager->focusedApplicationId();
515 for (int i = 0; i < m_list.count(); ++i) {
516 for (int i = 0; i < m_list.count(); ++i) {
516 LauncherItem *item = m_list.at(i);
517 LauncherItem *item = m_list.at(i);
517 if (!item->focused() && item->appId() == appId) {
518 if (!item->focused() && item->appId() == appId) {