Commit 9cf56b0a authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Use more memberfunction-pointer-based connects

GIT_SILENT
parent 243198de
......@@ -83,7 +83,11 @@ void KJumpingCube::initKAction() {
QAction * action;
QSignalMapper * gameMapper = new QSignalMapper (this);
connect (gameMapper, SIGNAL (mapped(int)), m_game, SLOT (gameActions(int)));
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
connect (gameMapper, &QSignalMapper::mappedInt, m_game, &Game::gameActions);
#else
connect (gameMapper, QOverload<int>::of(&QSignalMapper::mapped), m_game, &Game::gameActions);
#endif
action = KStandardGameAction::gameNew (gameMapper, QOverload<>::of(&QSignalMapper::map), this);
actionCollection()->addAction (action->objectName(), action);
......@@ -128,7 +132,7 @@ void KJumpingCube::initKAction() {
"QPushButton#ActionButton:disabled { color: white;"
"border-color: beige; background-color: steelblue; }");
gameMapper->setMapping (actionButton, BUTTON);
connect (actionButton, SIGNAL(clicked()), gameMapper, SLOT(map()));
connect (actionButton, &QAbstractButton::clicked, gameMapper, QOverload<>::of(&QSignalMapper::map));
QWidgetAction *widgetAction = new QWidgetAction(this);
widgetAction->setDefaultWidget(actionButton);
......
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