Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit d3152dcd authored by Laurent Montel's avatar Laurent Montel 😁

Port QSignalMapper to new connect api

parent 60c8ecc9
......@@ -44,7 +44,6 @@
#include <QTimer>
#include <QApplication>
#include <QScrollBar>
#include <QSignalMapper>
#include <QLineEdit>
#include <QMenu>
#include <KLocalizedString>
......@@ -723,7 +722,6 @@ void View::slotHeaderContextMenuRequested(const QPoint &pnt)
// the menu for the columns
QMenu menu;
QSignalMapper *showColumnSignalMapper = new QSignalMapper(&menu);
int idx = 0;
for (const auto col : qAsConst(columns)) {
QAction *act = menu.addAction(col->label());
......@@ -732,12 +730,10 @@ void View::slotHeaderContextMenuRequested(const QPoint &pnt)
if (idx == 0) {
QObject::connect(act, SIGNAL(triggered()), showColumnSignalMapper, SLOT(map()));
showColumnSignalMapper->setMapping(act, idx);
QObject::connect(act, &QAction::triggered, this, [this, idx] {slotShowHideColumn(idx);});
QObject::connect(showColumnSignalMapper, SIGNAL(mapped(int)), this, SLOT(slotShowHideColumn(int)));
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