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

Use member-functionpointer overloads of KStandardGameAction/KStandardAction

Needs KF5KDEGames 7.3, which also indirectly bumps min KF/Qt deps
parent 640ad124
......@@ -8,8 +8,8 @@ set (RELEASE_SERVICE_COMPACT_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}${RELEASE_
project(klickety VERSION "2.1.${RELEASE_SERVICE_COMPACT_VERSION}")
set (QT_MIN_VERSION "5.10.0")
set (KF5_MIN_VERSION "5.46.0")
set (QT_MIN_VERSION "5.11.0")
set (KF5_MIN_VERSION "5.64.0")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
......@@ -28,7 +28,7 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
DBusAddons
)
find_package(KF5KDEGames 4.9.0 REQUIRED)
find_package(KF5KDEGames 7.3.0 REQUIRED)
include(FeatureSummary)
include(ECMAddAppIcon)
......@@ -51,12 +51,8 @@ add_definitions(
-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x052E00
-DKF_DEPRECATED_WARNINGS_SINCE=0x060000
-DQT_NO_KEYWORDS
-DQT_NO_FOREACH
)
if (${KF5Config_VERSION} STRGREATER "5.56.0")
add_definitions(-DQT_NO_FOREACH)
MESSAGE(STATUS "compile without foreach")
endif()
set(klickety_SRCS
gamescene.cpp
......
......@@ -353,15 +353,15 @@ bool MainWindow::confirmAbort()
void MainWindow::setupActions()
{
// game menu
KStandardGameAction::gameNew( this, SLOT(newGame()), actionCollection() );
KStandardGameAction::gameNew(this, &MainWindow::newGame, actionCollection());
if ( !m_kSameMode ) {
KStandardGameAction::load( this, SLOT(loadGame()), actionCollection() );
KStandardGameAction::save( this, SLOT(saveGame()), actionCollection() );
KStandardGameAction::load(this, &MainWindow::loadGame, actionCollection());
KStandardGameAction::save(this, &MainWindow::saveGame, actionCollection());
}
KStandardGameAction::restart( this, SLOT(restartGame()), actionCollection() );
KStandardGameAction::highscores( this, SLOT(showHighscores()), actionCollection() );
m_pauseAction = KStandardGameAction::pause( this, SLOT(pauseGame(bool)), actionCollection() );
KStandardGameAction::quit( this, SLOT(close()), actionCollection() );
KStandardGameAction::restart(this, &MainWindow::restartGame, actionCollection());
KStandardGameAction::highscores(this, &MainWindow::showHighscores, actionCollection());
m_pauseAction = KStandardGameAction::pause(this, &MainWindow::pauseGame, actionCollection());
KStandardGameAction::quit( this, &MainWindow::close, actionCollection());
QAction * m_newNumGameAction = new QAction( i18n( "New Numbered Game..." ), actionCollection() );
actionCollection()->addAction( QStringLiteral( "game_new_numeric" ), m_newNumGameAction );
connect(m_newNumGameAction, &QAction::triggered, this, &MainWindow::newNumGame);
......@@ -372,10 +372,10 @@ void MainWindow::setupActions()
connect(soundAction, &KToggleAction::triggered, this, &MainWindow::setSoundsEnabled);
// move menu
QAction * undoAction = KStandardGameAction::undo( m_scene, SLOT(undoMove()), actionCollection() );
QAction * undoAction = KStandardGameAction::undo(m_scene, &GameScene::undoMove, actionCollection());
undoAction->setEnabled( false );
connect(m_scene, &GameScene::canUndoChanged, undoAction, &QAction::setEnabled);
QAction * redoAction = KStandardGameAction::redo( m_scene, SLOT(redoMove()), actionCollection() );
QAction * redoAction = KStandardGameAction::redo(m_scene, &GameScene::redoMove, actionCollection());
redoAction->setEnabled( false );
connect(m_scene, &GameScene::canRedoChanged, redoAction, &QAction::setEnabled);
......@@ -393,7 +393,7 @@ void MainWindow::setupActions()
connect(redoAllAction, &QAction::triggered, m_scene, &GameScene::redoAllMove);
// settings menu
KStandardAction::preferences( this, SLOT(configureSettings()), actionCollection() );
KStandardAction::preferences(this, &MainWindow::configureSettings, actionCollection());
if ( m_kSameMode ) {
Kg::difficulty()->addLevel(new KgDifficultyLevel(0,
......
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