Commit 3352f576 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

We depend against qt5.15/kf5.90

parent 80917084
Pipeline #176755 passed with stage
in 4 minutes and 16 seconds
......@@ -458,11 +458,7 @@ bool PlayerInfos::isNameUsed(const QString &newName) const
if ( newName==name() ) return false; // own name...
for (uint i=0; i<nbEntries(); i++)
if ( newName.toLower()==item(QStringLiteral( "name" ))->read(i).toString().toLower() ) return true;
#if KI18N_VERSION >= QT_VERSION_CHECK(5, 89, 0)
if ( newName==ItemContainer::ANONYMOUS_LABEL.toString() ) return true;
#else
if ( newName==i18n(ItemContainer::ANONYMOUS_LABEL) ) return true;
#endif
return false;
}
......
......@@ -15,9 +15,7 @@
#include <KLocalizedString>
#include <KSharedConfig>
#include <KHighscore>
#if KI18N_VERSION >= QT_VERSION_CHECK(5, 89, 0)
#include <KLazyLocalizedString>
#endif
#include <QDateTime>
#include <QTextStream>
......@@ -96,11 +94,7 @@ class ItemContainer
bool canHaveSubGroup() const { return !_subGroup.isNull(); }
static const char ANONYMOUS[]; // name assigned to anonymous players
#if KI18N_VERSION >= QT_VERSION_CHECK(5, 89, 0)
static const KLazyLocalizedString ANONYMOUS_LABEL;
#else
static const char ANONYMOUS_LABEL[];
#endif
QVariant read(uint i) const;
QString pretty(uint i) const;
......
......@@ -106,11 +106,7 @@ QString Item::pretty(uint, const QVariant &value) const
break;
case Anonymous:
if ( value.toString()==QLatin1String( ItemContainer::ANONYMOUS ) )
#if KI18N_VERSION >= QT_VERSION_CHECK(5, 89, 0)
return ItemContainer::ANONYMOUS_LABEL.toString();
#else
return i18n(ItemContainer::ANONYMOUS_LABEL);
#endif
break;
case NoSpecial:
break;
......
......@@ -10,9 +10,7 @@
#include <QtGlobal> // for QT_VERSION_CHECK
// KF
#include <ki18n_version.h>
#if KI18N_VERSION >= QT_VERSION_CHECK(5, 89, 0)
#include <KLazyLocalizedString>
#endif
// Qt
#include <QComboBox>
#include <QVector>
......@@ -75,17 +73,9 @@ class StatisticsTab : public AdditionalTab
private:
enum Count { Total = 0, Won, Lost, Draw, Nb_Counts };
#if KI18N_VERSION >= QT_VERSION_CHECK(5, 89, 0)
static const KLazyLocalizedString COUNT_LABELS[Nb_Counts];
#else
static const char *COUNT_LABELS[Nb_Counts];
#endif
enum Trend { CurrentTrend = 0, WonTrend, LostTrend, Nb_Trends };
#if KI18N_VERSION >= QT_VERSION_CHECK(5, 89, 0)
static const KLazyLocalizedString TREND_LABELS[Nb_Trends];
#else
static const char *TREND_LABELS[Nb_Trends];
#endif
struct Data {
uint count[Nb_Counts];
double trend[Nb_Trends];
......
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