Changeset View
Changeset View
Standalone View
Standalone View
kate/session/katesessionmanager.cpp
Show First 20 Lines • Show All 508 Lines • ▼ Show 20 Line(s) | |||||
509 | 509 | | |||
510 | KateSessionList KateSessionManager::sessionList() | 510 | KateSessionList KateSessionManager::sessionList() | ||
511 | { | 511 | { | ||
512 | return m_sessions.values(); | 512 | return m_sessions.values(); | ||
513 | } | 513 | } | ||
514 | 514 | | |||
515 | void KateSessionManager::updateJumpListActions(const QStringList &sessionList) | 515 | void KateSessionManager::updateJumpListActions(const QStringList &sessionList) | ||
516 | { | 516 | { | ||
517 | #if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) | ||||
517 | KService::Ptr service = KService::serviceByStorageId(qApp->desktopFileName()); | 518 | KService::Ptr service = KService::serviceByStorageId(qApp->desktopFileName()); | ||
518 | if (!service) { | 519 | if (!service) { | ||
519 | return; | 520 | return; | ||
520 | } | 521 | } | ||
521 | 522 | | |||
522 | QScopedPointer<KDesktopFile> df(new KDesktopFile(service->entryPath())); | 523 | QScopedPointer<KDesktopFile> df(new KDesktopFile(service->entryPath())); | ||
523 | 524 | | |||
524 | QStringList newActions = df->readActions(); | 525 | QStringList newActions = df->readActions(); | ||
Show All 38 Lines | 562 | for (int i = 0; i < maxEntryCount; ++i) { | |||
563 | const QString &session = sessionList.at(i); | 564 | const QString &session = sessionList.at(i); | ||
564 | 565 | | |||
565 | KConfigGroup grp = df->actionGroup(action); | 566 | KConfigGroup grp = df->actionGroup(action); | ||
566 | grp.writeEntry(QStringLiteral("Name"), session); | 567 | grp.writeEntry(QStringLiteral("Name"), session); | ||
567 | grp.writeEntry(QStringLiteral("Exec"), QStringLiteral("kate -s %1").arg(KShell::quoteArg(session))); // TODO proper executable name? | 568 | grp.writeEntry(QStringLiteral("Exec"), QStringLiteral("kate -s %1").arg(KShell::quoteArg(session))); // TODO proper executable name? | ||
568 | } | 569 | } | ||
569 | 570 | | |||
570 | df->desktopGroup().writeXdgListEntry("Actions", newActions); | 571 | df->desktopGroup().writeXdgListEntry("Actions", newActions); | ||
572 | #endif | ||||
571 | } | 573 | } | ||
572 | 574 | | |||
573 | //END KateSessionManager | 575 | //END KateSessionManager | ||
574 | 576 | |