Commit 5d62b11d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

It compiles fine without deprecated method

parent 8cd96a96
......@@ -33,6 +33,9 @@ if (${KF5Config_VERSION} STRGREATER "5.56.0")
add_definitions(-DQT_NO_FOREACH)
MESSAGE(STATUS "compile without foreach")
endif()
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
endif()
add_subdirectory(src)
add_subdirectory(doc)
......
......@@ -116,6 +116,10 @@ public:
{
return score() < player.score();
}
bool operator>(const KSquaresPlayer &player) const
{
return score() > player.score();
}
protected:
/// Is the player a human
......
......@@ -197,7 +197,7 @@ void KSquaresWindow::gameReset()
void KSquaresWindow::gameOver(const QVector<KSquaresPlayer> &_playerList)
{
QVector<KSquaresPlayer> playerList = _playerList;
std::sort(playerList.begin(), playerList.end(), qGreater<KSquaresPlayer>());
std::sort(playerList.begin(), playerList.end(), std::greater<KSquaresPlayer>());
//m_scene->displayScoreTable(playerList);
ScoresDialog scoresDialog(this);
......
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