applets/kicker: Get rid of a separator just above title menu item

BUG: 449132
(cherry picked from commit c0d5d824f4)
wilder-5.25
ivan tkachenko 4 years ago
parent 298ffbc222
commit 520e30a64a
No known key found for this signature in database
GPG Key ID: AF72731B7C654CB3
  1. 8
      applets/kicker/plugin/recentusagemodel.cpp
  2. 11
      applets/kicker/plugin/runnermatchesmodel.cpp

@ -230,12 +230,16 @@ QVariant RecentUsageModel::appData(const QString &resource, int role) const
const QVariantList &jumpList = Kicker::jumpListActions(service);
if (!jumpList.isEmpty()) {
actionList << jumpList << Kicker::createSeparatorActionItem();
actionList << jumpList;
}
const QVariantList &recentDocuments = Kicker::recentDocumentActions(service);
if (!recentDocuments.isEmpty()) {
actionList << recentDocuments << Kicker::createSeparatorActionItem();
actionList << recentDocuments;
}
if (!actionList.isEmpty()) {
actionList << Kicker::createSeparatorActionItem();
}
const QVariantMap &forgetAction = Kicker::createActionItem(i18n("Forget Application"), QStringLiteral("edit-clear-history"), QStringLiteral("forget"));

@ -122,13 +122,20 @@ QVariant RunnerMatchesModel::data(const QModelIndex &index, int role) const
}
const QVariantList &addLauncherActions = Kicker::createAddLauncherActionList(appletInterface, service);
bool needsSeparator = false;
if (!systemImmutable && !addLauncherActions.isEmpty()) {
actionList << addLauncherActions << Kicker::createSeparatorActionItem();
actionList << addLauncherActions;
needsSeparator = true;
}
const QVariantList &recentDocuments = Kicker::recentDocumentActions(service);
if (!recentDocuments.isEmpty()) {
actionList << recentDocuments << Kicker::createSeparatorActionItem();
actionList << recentDocuments;
needsSeparator = false;
}
if (needsSeparator) {
actionList << Kicker::createSeparatorActionItem();
}
const QVariantList &additionalActions = Kicker::additionalAppActions(service);

Loading…
Cancel
Save