Commit 9eeae2ad authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compiles with last api

parent ad4e5604
Pipeline #66765 passed with stage
in 22 minutes and 59 seconds
......@@ -48,6 +48,7 @@
#include "warningwidgets/externaleditorwarning.h"
#include "widgets/cryptostateindicatorwidget.h"
#include "widgets/kactionmenutransport.h"
#include <kxmlgui_version.h>
#include <Akonadi/Contact/ContactGroupExpandJob>
#include <Akonadi/KMime/MessageFlags>
......@@ -3399,7 +3400,11 @@ void KMComposerWin::slotUpdateToolbars()
void KMComposerWin::slotEditKeys()
{
#if KXMLGUI_VERSION < QT_VERSION_CHECK(5, 84, 0)
KShortcutsDialog::configure(actionCollection(), KShortcutsEditor::LetterShortcutsDisallowed);
#else
KShortcutsDialog::showDialog(actionCollection(), KShortcutsEditor::LetterShortcutsAllowed, /*isModal*/ true, this);
#endif
}
void KMComposerWin::setFocusToEditor()
......
......@@ -13,6 +13,7 @@
#include <Libkdepim/ProgressStatusBarWidget>
#include <Libkdepim/StatusbarProgressWidget>
#include <PimCommon/BroadcastStatus>
#include <kxmlgui_version.h>
#include <KConfigGroup>
#include <KToolBar>
......@@ -83,6 +84,9 @@ KMMainWin::KMMainWin(QWidget *)
mKMMainWidget->updateQuickSearchLineText();
mShowMenuBarAction->setChecked(KMailSettings::self()->showMenuBar());
slotToggleMenubar(true);
#if KXMLGUI_VERSION >= QT_VERSION_CHECK(5, 84, 0)
connect(guiFactory(), &KXMLGUIFactory::shortcutsSaved, this, &KMMainWin::slotShortcutSaved);
#endif
}
KMMainWin::~KMMainWin()
......@@ -243,7 +247,16 @@ bool KMMainWin::queryClose()
void KMMainWin::slotConfigureShortcuts()
{
#if KXMLGUI_VERSION < QT_VERSION_CHECK(5, 84, 0)
if (guiFactory()->configureShortcuts()) {
mKMMainWidget->updateQuickSearchLineText();
}
#else
guiFactory()->showConfigureShortcutsDialog();
#endif
}
void KMMainWin::slotShortcutSaved()
{
mKMMainWidget->updateQuickSearchLineText();
}
......@@ -55,6 +55,7 @@ private:
void slotConfigureShortcuts();
void slotToggleMenubar(bool dontShowWarning);
void updateHamburgerMenu();
void slotShortcutSaved();
KPIM::ProgressStatusBarWidget *mProgressBar = nullptr;
KMMainWidget *mKMMainWidget = nullptr;
KToggleAction *mShowMenuBarAction = nullptr;
......
Markdown is supported
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