Commit 7de59769 authored by Andrius Štikonas's avatar Andrius Štikonas

Port to the new signal/slot syntax.

parent 83410714
......@@ -2,7 +2,7 @@ project (kubrick)
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
set (QT_MIN_VERSION "5.7.0")
set (KF5_MIN_VERSION "5.15.0")
set (KF5_MIN_VERSION "5.23.0")
find_package(ECM 1.7.0 REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
......
......@@ -102,8 +102,6 @@ enum FaceColor {INTERNAL, LEFT, RIGHT, BOTTOM, TOP, BACK, FRONT};
*/
class Cube : public QObject
{
Q_OBJECT
public:
/**
* Constructor for the Cube object
......@@ -141,8 +139,6 @@ private:
class Cubie : public QObject
{
Q_OBJECT
public:
/**
* Constructor for the Cubie object
......
......@@ -1804,7 +1804,7 @@ void Game::advance()
// we do not do this in the advance() method itself. This is not essential,
// but makes the game-logic and rendering more independent of each other.
QTimer::singleShot(0, gameGLView, SLOT (updateGL()));
QTimer::singleShot(0, gameGLView, &GameGLView::updateGL);
}
......
......@@ -20,11 +20,11 @@
#define GAME_H
// The Cube object uses the sqrt() function.
#include <math.h>
#include <stdlib.h>
#include <cmath>
#include <cstdlib>
// KDE includes
#include <kstandardgameaction.h> // Used only to get internal names of actions.
#include <KStandardGameAction> // Used only to get internal names of actions.
#include <KRandomSequence>
// Qt includes
......
......@@ -42,12 +42,11 @@ class Game;
class GameDialog : public KDialog
{
Q_OBJECT
public:
GameDialog (bool changePuzzle, int optionTemp [8], QWidget * parent = 0);
~GameDialog();
private slots:
private:
void slotOk();
void slotHelp();
......
......@@ -35,8 +35,6 @@ class Game; // Forward declaration of Game class.
*/
class GameGLView : public QGLWidget
{
Q_OBJECT
public:
/**
* Create a new GL view for the game
......
This diff is collapsed.
......@@ -40,7 +40,6 @@ class QAction;
*/
class Kubrick : public KXmlGuiWindow
{
Q_OBJECT
public:
/**
* Default Constructor.
......@@ -83,7 +82,7 @@ protected:
*/
bool queryClose() override;
protected slots:
protected:
void optionsConfigureKeys();
// Slots for puzzle-selection actions.
......@@ -132,7 +131,7 @@ private:
int fillPuzzleList (KSelectAction * s, const PuzzleItem itemList []);
void fillDemoList (const DemoItem itemList [], QList<QAction*> &list,
const char *uilist, const char *slot);
const char *uilist, void(Kubrick::*slot)());
QAction * mapAction (QSignalMapper * mapper, const QString & name,
const QString & text, const Qt::Key key, SingmasterMove mapping);
......
......@@ -16,13 +16,13 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*******************************************************************************/
#include <QApplication>
#include <QCommandLineParser>
#include <KAboutData>
#include <KCrash>
#include <QApplication>
#include <Kdelibs4ConfigMigrator>
#include <KLocalizedString>
#include <QCommandLineParser>
#include <kdelibs4configmigrator.h>
#include "kubrick.h"
......
......@@ -56,7 +56,7 @@ public:
void realignCube // Realign the cube to nearest orthogonal axes.
(QList<Move *> & tempMoves);
signals:
Q_SIGNALS:
/**
* This signal is used to pass a move back to the Game object, after the
* MoveTracker has found such a move by tracking the mouse.
......
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