Commit 728e6661 authored by Laurent Montel's avatar Laurent Montel
Browse files

Fix some compile error against qt6

(still need some fix todo. It still uses some kdegames deprecated class)
parent d4d5aab4
Pipeline #117544 passed with stage
in 42 seconds
......@@ -18,7 +18,11 @@ Score::Score(const QString &score)
m_color = QLatin1Char('B');
}
int i = score.indexOf(QLatin1Char(' '));
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
m_score = score.midRef(2, i - 1).toFloat();
#else
m_score = score.mid(2, i - 1).toFloat();
#endif
QString upperBound = score.section(QLatin1Char(' '), 3, 3);
upperBound.chop(1);
m_upperBound = upperBound.toFloat();
......
......@@ -23,7 +23,11 @@ Stone::Stone(const QString &stone, float value)
{
if (stone.size() >= 2) {
m_x = stone[0].toUpper().toLatin1();
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
m_y = stone.midRef(1).toInt();
#else
m_y = stone.mid(1).toInt();
#endif
}
}
......
......@@ -11,6 +11,7 @@
#include <QFile>
#include <QIcon>
#include <QRegExp>
namespace Kigo {
SetupWidget::SetupWidget(Game *game, QWidget *parent)
......
Supports Markdown
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