Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP6:Update
sudoku-sensei
0001-Basic-port-to-Qt5.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Basic-port-to-Qt5.patch of Package sudoku-sensei
From e75514cd1d17ea024f66717585d9947dcfa1698a Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux <christophe@krop.fr> Date: Sat, 13 Apr 2019 13:45:19 +0200 Subject: [PATCH] Basic port to Qt5. --- Dshowabout.cpp | 2 +- Dshowmanual.cpp | 2 +- Dshowsolution.cpp | 3 ++- Dshowtutorial.cpp | 2 +- SudokuSensei.pro | 3 ++- SudokuView.cpp | 2 +- SudokuView.h | 2 +- diagrules.cpp | 18 ++++++++++-------- editor.cpp | 3 ++- editor.h | 2 +- graphics.cpp | 6 +++--- graphics.h | 4 ++-- mainwindow.cpp | 2 ++ mask.cpp | 2 +- newgame.cpp | 10 +++++----- newtable.cpp | 2 +- 16 files changed, 36 insertions(+), 29 deletions(-) diff --git a/Dshowabout.cpp b/Dshowabout.cpp index a719de8..2d0bba4 100644 --- a/Dshowabout.cpp +++ b/Dshowabout.cpp @@ -39,7 +39,7 @@ Latest versions: http://sourceforge.net/projects/sudoku-sensei /* */ /************************************************************************************************/ -#include <QtGui> +#include <QtWidgets> #include "Dshowabout.h" #include <QProcess> diff --git a/Dshowmanual.cpp b/Dshowmanual.cpp index 2a7d11c..d7d97d2 100644 --- a/Dshowmanual.cpp +++ b/Dshowmanual.cpp @@ -39,7 +39,7 @@ Latest versions: http://sourceforge.net/projects/sudoku-sensei /* */ /************************************************************************************************/ -#include <QtGui> +#include <QtWidgets> #include "Dshowmanual.h" #include <QProcess> diff --git a/Dshowsolution.cpp b/Dshowsolution.cpp index c866852..42f592a 100644 --- a/Dshowsolution.cpp +++ b/Dshowsolution.cpp @@ -38,8 +38,9 @@ Latest versions: http://sourceforge.net/projects/sudoku-sensei /************************************************************************************************/ -#include <QtGui> +#include <QtWidgets> #include "Dshowsolution.h" +#include <QLabel> #include <QProcess> #include "dmem.h" diff --git a/Dshowtutorial.cpp b/Dshowtutorial.cpp index 1c77436..58565cc 100644 --- a/Dshowtutorial.cpp +++ b/Dshowtutorial.cpp @@ -39,7 +39,7 @@ Latest versions: http://sourceforge.net/projects/sudoku-sensei /* */ /************************************************************************************************/ -#include <QtGui> +#include <QtWidgets> #include "Dshowtutorial.h" #include <QProcess> diff --git a/SudokuSensei.pro b/SudokuSensei.pro index 1b2d90c..67a38d8 100644 --- a/SudokuSensei.pro +++ b/SudokuSensei.pro @@ -1,9 +1,10 @@ ###################################################################### # Automatically generated by qmake (2.01a) lun jul 2 16:19:58 2007 ###################################################################### +QT += core printsupport widgets TEMPLATE = app -TARGET = +#TARGET = DEPENDPATH += . language INCLUDEPATH += .+ RC_FILE = SudokuSensei.rc diff --git a/SudokuView.cpp b/SudokuView.cpp index d9cb77c..8c231c0 100644 --- a/SudokuView.cpp +++ b/SudokuView.cpp @@ -41,7 +41,7 @@ Latest versions: http://sourceforge.net/projects/sudoku-sensei #include "mask.h" #include <math.h> -#include <QtGui> +#include <QtWidgets> //#include <QtOpenGL> #include <QPainter> #include <QColor> diff --git a/SudokuView.h b/SudokuView.h index 0532444..2a2104c 100644 --- a/SudokuView.h +++ b/SudokuView.h @@ -59,7 +59,7 @@ Latest versions: http://sourceforge.net/projects/sudoku-sensei #include <QHBoxLayout> #include <QListWidget> #include <QMutex> -#include <QtGui> +#include <QtWidgets> #include "ui_Denlargewindow.h" #include "thread-sensei.h" diff --git a/diagrules.cpp b/diagrules.cpp index 2af30c8..3ef44e4 100644 --- a/diagrules.cpp +++ b/diagrules.cpp @@ -44,6 +44,8 @@ Latest versions: http://sourceforge.net/projects/sudoku-sensei #include "dmem.h" #include "myassert.h" +#include <QMessageBox> + #define MAX_RULES 100 //#define _DEBUG @@ -1414,13 +1416,13 @@ void RulesDialog::AddNameOfGroup( s_rule rule, QString *a, SudokuView * mSudoku, /********************************************************/ void RulesDialog::retranslateUi(QDialog *Rules) { - Rules->setWindowTitle(QApplication::translate("Rules", "Rules", 0, QApplication::UnicodeUTF8)); - label->setText(QApplication::translate("Rules", "&Simple Rules", 0, QApplication::UnicodeUTF8)); - label_2->setText(QApplication::translate("Rules", "A&dvanced Rules", 0, QApplication::UnicodeUTF8)); - label_3->setText(QApplication::translate("Rules", "&Expert Rules", 0, QApplication::UnicodeUTF8)); - label_4->setText(QApplication::translate("Rules", "&Redundant Rules", 0, QApplication::UnicodeUTF8)); - But_Apply_Rule->setText(QApplication::translate("Rules", "Apply Rule", 0, QApplication::UnicodeUTF8)); - But_Apply_All->setText(QApplication::translate("Rules", "Apply All Rules", 0, QApplication::UnicodeUTF8)); - But_Show_Rules->setText(QApplication::translate("Rules","Show Redundant Rules", 0, QApplication::UnicodeUTF8)); + Rules->setWindowTitle(QApplication::translate("Rules", "Rules", 0)); + label->setText(QApplication::translate("Rules", "&Simple Rules", 0)); + label_2->setText(QApplication::translate("Rules", "A&dvanced Rules", 0)); + label_3->setText(QApplication::translate("Rules", "&Expert Rules", 0)); + label_4->setText(QApplication::translate("Rules", "&Redundant Rules", 0)); + But_Apply_Rule->setText(QApplication::translate("Rules", "Apply Rule", 0)); + But_Apply_All->setText(QApplication::translate("Rules", "Apply All Rules", 0)); + But_Show_Rules->setText(QApplication::translate("Rules","Show Redundant Rules", 0)); Q_UNUSED(Rules); } diff --git a/editor.cpp b/editor.cpp index 3190947..9cc52c6 100644 --- a/editor.cpp +++ b/editor.cpp @@ -35,7 +35,8 @@ Latest versions: http://sourceforge.net/projects/sudoku-sensei /* */ /************************************************************************************************/ -#include <QtGui> +#include <QMessageBox> +#include <QtWidgets> #include <QPointF> #include "editor.h" #include "SudokuView.h" diff --git a/editor.h b/editor.h index a8e6973..83b3234 100644 --- a/editor.h +++ b/editor.h @@ -85,7 +85,7 @@ class EditorCell : public QGraphicsRectItem { public: - EditorCell ( QGraphicsItem * parent=0, QGraphicsScene * scene=0 ) : QGraphicsRectItem::QGraphicsRectItem ( parent , scene ) {} + EditorCell ( QGraphicsItem * parent=0 ) : QGraphicsRectItem::QGraphicsRectItem ( parent ) {} int x,y; diff --git a/graphics.cpp b/graphics.cpp index 414cb92..0d34070 100644 --- a/graphics.cpp +++ b/graphics.cpp @@ -43,7 +43,7 @@ Latest versions: http://sourceforge.net/projects/sudoku-sensei //#define _DEBUG #include "graphics.h" #include <QSettings> -#include <QtGui> +#include <QtWidgets> #include "sudoku-pub.h" #include "mask.h" #include "SudokuView.h" @@ -58,8 +58,8 @@ Latest versions: http://sourceforge.net/projects/sudoku-sensei /***************/ /* Constructor */ /***************/ -GraphCell::GraphCell ( QGraphicsItem * parent, QGraphicsScene * scene ) - : QGraphicsRectItem (parent, scene), +GraphCell::GraphCell ( QGraphicsItem * parent ) + : QGraphicsRectItem (parent), pTextPoss (NULL ), // Fast varibables initialization nTextPoss ( 0 ), mTextPoss ( 0 ), diff --git a/graphics.h b/graphics.h index c47a00f..13c7ea9 100644 --- a/graphics.h +++ b/graphics.h @@ -38,7 +38,7 @@ Latest versions: http://sourceforge.net/projects/sudoku-sensei #ifndef GRAPHICS_H #define GRAPHICS_H -#include <QtGui> +#include <QtWidgets> #include "sudoku-pub.h" // Include that to compile faster @@ -95,7 +95,7 @@ class GraphCell : public QGraphicsRectItem // TODO: More funcionality - GraphCell ( QGraphicsItem * parent=0, QGraphicsScene * scene = 0); + GraphCell ( QGraphicsItem * parent=0 ); // GraphCell ( const QRectF & rect, QGraphicsItem * parent=0, QGraphicsScene * scene = 0); // GraphCell ( qreal x, qreal y, qreal width, qreal height, QGraphicsItem * parent=0, QGraphicsScene * scene = 0); diff --git a/mainwindow.cpp b/mainwindow.cpp index 94fa2e6..4e0b750 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -37,6 +37,8 @@ Latest versions: http://sourceforge.net/projects/sudoku-sensei #include <QProcess> #include <QSettings> #include <QFileDialog> +#include <QPrinter> +#include <QPrintDialog> #include "mainwindow.h" #include "newgame.h" diff --git a/mask.cpp b/mask.cpp index f013e57..d49a7a5 100644 --- a/mask.cpp +++ b/mask.cpp @@ -33,7 +33,7 @@ Latest versions: http://sourceforge.net/projects/sudoku-sensei /* */ /************************************************************************************************/ #include "mask.h" -#include <QtGui> +#include <QtWidgets> // mask() and simbols() moved to the header file diff --git a/newgame.cpp b/newgame.cpp index eb7daa1..4fbbb10 100644 --- a/newgame.cpp +++ b/newgame.cpp @@ -37,7 +37,7 @@ Latest versions: http://sourceforge.net/projects/sudoku-sensei /* */ /************************************************************************************************/ -#include <QtGui> +#include <QtWidgets> #include "newgame.h" #include <QProcess> #include "dmem.h" @@ -143,17 +143,17 @@ NewGame::NewGame(QWidget *parent) } void NewGame::aceptClicked() { - if (BoardEmpty->isChecked()==TRUE) + if (BoardEmpty->isChecked()) { setOutput(-3); } - else if (BoardWrited ->isChecked()==TRUE) + else if (BoardWrited ->isChecked()) { setOutput(-2);// TODO: GenerateBoard(TextBoard); } - else if (BoardGenerate->isChecked()==TRUE) + else if (BoardGenerate->isChecked()) { - if (highdif->isChecked()==TRUE) + if (highdif->isChecked()) setOutput(-1); else setOutput ( level->value() ); diff --git a/newtable.cpp b/newtable.cpp index 154ae34..935dd86 100644 --- a/newtable.cpp +++ b/newtable.cpp @@ -39,7 +39,7 @@ Latest versions: http://sourceforge.net/projects/sudoku-sensei /* It calls MyEditor class defined in editor.cpp, editor.h, Deditor.ui and */ /* SudokuWidget class defined in SudokuWidget.cpp, SudokuWidget.h */ /************************************************************************************************/ -#include <QtGui> +#include <QtWidgets> #include "newtable.h" #include "SudokuView.h" #include "SudokuBoard.h" -- 2.21.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor