| 522 | } |
| 523 | |
| 524 | void SessionController::updateXmlGuiActionList() |
| 525 | { |
| 526 | Q_D(SessionController); |
| 527 | |
| 528 | unplugActionList( QStringLiteral("available_sessions") ); |
| 529 | |
| 530 | if (d->grp) { |
| 531 | auto actions = d->grp->actions(); |
| 532 | std::sort(actions.begin(), actions.end(), [](const QAction* lhs, const QAction* rhs) { |
| 533 | auto s1 = lhs->data().value<Session*>(); |
| 534 | auto s2 = rhs->data().value<Session*>(); |
| 535 | return QString::localeAwareCompare(s1->description(), s2->description()) < 0; |
| 536 | }); |
| 537 | plugActionList(QStringLiteral("available_sessions"), actions); |
| 538 | } |
| 539 | } |
| 540 | |
| 541 | |
| 542 | QString SessionController::cfgSessionGroup() { return QStringLiteral("Sessions"); } |