Commit 16319d1a authored by Laurent Montel's avatar Laurent Montel
Browse files

Port shortcut

parent 933d73cd
Pipeline #245993 passed with stage
in 12 minutes and 49 seconds
......@@ -64,6 +64,9 @@
#include <QMenu>
#include <QMimeData>
#include <QTemporaryDir>
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#include <QKeyCombination>
#endif
// Qt includes
#include <QActionGroup>
......@@ -1560,8 +1563,12 @@ void ViewerPrivate::createActions()
mToggleMimePartTreeAction = new KToggleAction(i18n("Show Message Structure"), this);
ac->addAction(QStringLiteral("toggle_mimeparttree"), mToggleMimePartTreeAction);
connect(mToggleMimePartTreeAction, &QAction::toggled, this, &ViewerPrivate::slotToggleMimePartTree);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
ac->setDefaultShortcut(mToggleMimePartTreeAction, QKeySequence(Qt::Key_D | Qt::CTRL | Qt::ALT));
#else
QKeyCombination combinationKeys(Qt::CTRL | Qt::ALT, Qt::Key_D);
ac->setDefaultShortcut(mToggleMimePartTreeAction, combinationKeys);
#endif
mViewSourceAction = new QAction(i18n("&View Source"), this);
ac->addAction(QStringLiteral("view_source"), mViewSourceAction);
connect(mViewSourceAction, &QAction::triggered, this, &ViewerPrivate::slotShowMessageSource);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment