Commit 745f296e authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Port away from deprecated KSelectAction::triggered(int)

parent 233af603
......@@ -25,6 +25,7 @@
#include <QMenuBar>
#include <kwidgetsaddons_version.h>
#include <KActionCollection>
#include <QAction>
#include <KToggleAction>
......@@ -381,7 +382,11 @@ MainWindow::MainWindow() : KXmlGuiWindow(nullptr)
selectAction->setEnabled(false);
selectAction->setText(i18n("Set Encoding"));
selectAction->setIcon(QIcon::fromTheme(QStringLiteral("character-set")));
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 78, 0)
connect(selectAction, &KSelectAction::indexTriggered, m_viewContainer, &ViewContainer::changeViewCharset);
#else
connect(selectAction, QOverload<int>::of(&KSelectAction::triggered), m_viewContainer, &ViewContainer::changeViewCharset);
#endif
actionCollection()->addAction(QStringLiteral("tab_encoding"), selectAction);
for (uint i = 1; i <= 10; ++i)
......
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