Fix split-view shortcuts

The split-view actions define a shortcut using `Konsole::ACCEL`, which
since !609 expands to `Qt::CTRL | Qt::SHIFT` on systems that aren't
macOS.  This breaks the shortcut for the split-view actions however as
`Qt::Key_ParenLeft` and `Qt::Key_ParenRight` do not work with the
`Qt::SHIFT` modifier.

Using `Qt::CTRL` (Cmd on macOS, Ctrl everywhere else) as the base
accelerator for these two actions makes splitting views work again as
expected.
wilder
Georg Gadinger 4 years ago committed by Tomaz Canabrava
parent 7e7278df48
commit 9b0721a2e4
  1. 4
      src/ViewManager.cpp

@ -113,14 +113,14 @@ void ViewManager::setupActions()
action->setText(i18nc("@action:inmenu", "Split View Left/Right"));
connect(action, &QAction::triggered, this, &ViewManager::splitLeftRight);
collection->addAction(QStringLiteral("split-view-left-right"), action);
collection->setDefaultShortcut(action, Konsole::ACCEL | Qt::Key_ParenLeft);
collection->setDefaultShortcut(action, QKeySequence(Qt::CTRL | Qt::Key_ParenLeft));
splitViewActions->addAction(action);
action = new QAction(this);
action->setIcon(QIcon::fromTheme(QStringLiteral("view-split-top-bottom")));
action->setText(i18nc("@action:inmenu", "Split View Top/Bottom"));
connect(action, &QAction::triggered, this, &ViewManager::splitTopBottom);
collection->setDefaultShortcut(action, Konsole::ACCEL | Qt::Key_ParenRight);
collection->setDefaultShortcut(action, QKeySequence(Qt::CTRL | Qt::Key_ParenRight));
collection->addAction(QStringLiteral("split-view-top-bottom"), action);
splitViewActions->addAction(action);

Loading…
Cancel
Save