Commit 16f5410f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile without deprecated method

parent a41a52f6
......@@ -44,6 +44,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(pics)
add_subdirectory(sounds)
......
......@@ -39,7 +39,7 @@ ExtManager::ExtManager()
const uint RANGE[6] = { 0, 32, 40, 48, 56, 64 };
QVector<uint> s;
s.resize(6);
qCopy(RANGE, RANGE + 6, s.begin());
std::copy(RANGE, RANGE+6, s.begin());
setScoreHistogram(s, ScoreBound);
QList< const KgDifficultyLevel * > diffList = Kg::difficulty()->levels();
......
......@@ -626,7 +626,7 @@ const char *UNABLE_TO_CONTACT =
bool ManagerPrivate::doQuery(const QUrl &url, QWidget *parent,
QDomNamedNodeMap *map)
{
KIO::http_update_cache(url, true, QDateTime::fromTime_t(0)); // remove cache !
KIO::http_update_cache(url, true, QDateTime::fromSecsSinceEpoch(0)); // remove cache !
QTemporaryFile tmpFile;
if ( !tmpFile.open() ) {
......
......@@ -29,6 +29,7 @@
#include <QIcon>
#include <QStatusBar>
#include <QApplication>
#include <QScreen>
#include <KActionCollection>
#include <KLocalizedString>
......@@ -102,8 +103,11 @@ KReversiMainWindow::KReversiMainWindow(QWidget* parent, bool startDemo)
// load saved settings
loadSettings();
setupGUI(qApp->desktop()->availableGeometry().size() * 0.7);
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
setupGUI(QApplication::screens().at(0)->availableGeometry().size() * 0.7);
#else
setupGUI(screen()->availableGeometry().size() * 0.7);
#endif
m_historyDock->hide();
}
......
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