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

Make it compile

parent 4b5a7221
......@@ -27,7 +27,7 @@ add_executable(ksudoku ${ksudoku_SRCS})
target_link_libraries(ksudoku
ksudoku_gui ksudoku_logic
KF5KDEGames kdegamesprivate
KF5KDEGames KF5KDEGamesPrivate
KF5::KIOCore
)
......
......@@ -40,6 +40,7 @@ target_link_libraries(ksudoku_gui
KF5::KIOCore
Qt5::Core
Qt5::Gui
Qt5::Svg
)
if(OPENGL_SUPPORT)
......
......@@ -41,7 +41,7 @@ void GameActions::init() {
QAction * a;
KShortcut shortcut;
//QT5 KShortcut shortcut;
for(int i = 0; i < 25; ++i) {
a = new QAction(this);
m_collection->addAction(QString("val-select%1").arg(i+1,2,10,QChar('0')), a);
......@@ -53,12 +53,14 @@ void GameActions::init() {
a = new QAction(this);
m_collection->addAction(QString("val-enter%1").arg(i+1,2,10,QChar('0')), a);
a->setText(i18n("Enter %1 (%2)", QChar('a'+i), i+1));
#if 0 //QT5
shortcut = a->shortcut();
shortcut.setPrimary( Qt::Key_A + i);
if(i < 9) {
shortcut.setAlternate( Qt::Key_1 + i);
}
a->setShortcut(shortcut);
#endif
m_enterValueMapper->setMapping(a, i+1);
connect(a, SIGNAL(triggered(bool)), m_enterValueMapper, SLOT(map()));
m_actions << a;
......@@ -66,12 +68,12 @@ void GameActions::init() {
a = new QAction(this);
m_collection->addAction(QString("val-mark%1").arg(i+1,2,10,QChar('0')), a);
a->setText(i18n("Mark %1 (%2)", QChar('a'+i), i+1));
shortcut = a->shortcut();
shortcut.setPrimary( QKeySequence(Qt::ShiftModifier | Qt::Key_A + i));
//QT5 shortcut = a->shortcut();
//QT5 shortcut.setPrimary( QKeySequence(Qt::ShiftModifier | Qt::Key_A + i));
if(i < 9) {
shortcut.setAlternate( QKeySequence(Qt::ShiftModifier | Qt::Key_1 + i));
//QT5 shortcut.setAlternate( QKeySequence(Qt::ShiftModifier | Qt::Key_1 + i));
}
a->setShortcut(shortcut);
//QT5 a->setShortcut(shortcut);
m_markValueMapper->setMapping(a, i+1);
connect(a, SIGNAL(triggered(bool)), m_markValueMapper, SLOT(map()));
m_actions << a;
......@@ -108,10 +110,10 @@ void GameActions::init() {
a = new QAction(this);
m_collection->addAction("move_clear_cell", a);
a->setText(i18n("Clear Cell"));
shortcut = a->shortcut();
shortcut.setPrimary(Qt::Key_Backspace);
shortcut.setAlternate(Qt::Key_Delete);
a->setShortcut(shortcut);
//QT5 shortcut = a->shortcut();
//QT5 shortcut.setPrimary(Qt::Key_Backspace);
//QT5 shortcut.setAlternate(Qt::Key_Delete);
//QT5 a->setShortcut(shortcut);
connect(a, SIGNAL(triggered(bool)), SLOT(clearValue()));
m_actions << a;
}
......
......@@ -3,7 +3,7 @@
#include <QSvgRenderer>
#include <KStandardDirs>
#include <kpixmapcache.h>
#include <KDebug>
#define USE_UNSTABLE_LIBKDEGAMESPRIVATE_API
#include <libkdegamesprivate/kgametheme.h>
......
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