Commit 6fa3e3a2 authored by Volker Krause's avatar Volker Krause
Browse files

Consistently require Qt 5.15 on all platforms

Also, clean up no longer needed Qt version conditionals.
parent bd7af78a
......@@ -48,7 +48,7 @@ if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
endif()
endif()
set(QT_MIN_VERSION 5.14) # for new style QML Connections
set(QT_MIN_VERSION 5.15)
if (ANDROID)
set(QT_MIN_VERSION 5.15.1) # for content: support
endif()
......@@ -94,7 +94,7 @@ endif()
add_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_URL_CAST_FROM_STRING)
add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
add_definitions(-DQT_USE_QSTRINGBUILDER)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
if (ANDROID)
set(CMAKE_MODULE_EXE_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined ${CMAKE_EXE_LINKER_FLAGS}")
endif()
......
......@@ -21,9 +21,7 @@
#include <KItinerary/Place>
#include <KItinerary/Reservation>
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
#include <QAbstractItemModelTester>
#endif
#include <QDirIterator>
#include <QUrl>
#include <QtTest/qtest.h>
......@@ -117,9 +115,7 @@ private Q_SLOTS:
resMgr.setPkPassManager(&mgr);
TimelineModel model;
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
QAbstractItemModelTester tester(&model);
#endif
model.setReservationManager(&resMgr);
QSignalSpy insertSpy(&model, &TimelineModel::rowsInserted);
......@@ -158,9 +154,7 @@ private Q_SLOTS:
clearReservations(&resMgr);
TimelineModel model;
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
QAbstractItemModelTester tester(&model);
#endif
model.setHomeCountryIsoCode(QStringLiteral("DE"));
model.setReservationManager(&resMgr);
......@@ -213,9 +207,7 @@ private Q_SLOTS:
clearReservations(&resMgr);
TimelineModel model;
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
QAbstractItemModelTester tester(&model);
#endif
model.setHomeCountryIsoCode(QStringLiteral("DE"));
model.setReservationManager(&resMgr);
......@@ -265,9 +257,7 @@ private Q_SLOTS:
weatherMgr.setTestModeEnabled(true);
TimelineModel model;
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
QAbstractItemModelTester tester(&model);
#endif
model.setReservationManager(&resMgr);
model.setWeatherForecastManager(&weatherMgr);
QCOMPARE(model.rowCount(), 1); // no weather data, as we don't know where we are
......@@ -410,9 +400,7 @@ private Q_SLOTS:
ReservationManager resMgr;
clearReservations(&resMgr);
TimelineModel model;
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
QAbstractItemModelTester tester(&model);
#endif
model.setReservationManager(&resMgr);
QCOMPARE(model.rowCount(), 1); // 1x TodayMarker
......@@ -488,9 +476,7 @@ private Q_SLOTS:
weatherMgr.setTestModeEnabled(true);
TimelineModel model;
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
QAbstractItemModelTester tester(&model);
#endif
model.setHomeCountryIsoCode(QStringLiteral("DE"));
model.setCurrentDateTime(QDateTime({2196, 10, 14}, {12, 34}));
model.setReservationManager(&resMgr);
......@@ -561,9 +547,7 @@ private Q_SLOTS:
transferMgr.setFavoriteLocationModel(&favLocModel);
TimelineModel model;
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
QAbstractItemModelTester tester(&model);
#endif
model.setHomeCountryIsoCode(QStringLiteral("DE"));
model.setCurrentDateTime(QDateTime({1996, 10, 14}, {12, 34}));
model.setReservationManager(&resMgr);
......
......@@ -11,9 +11,7 @@
#include <tripgroupmanager.h>
#include <tripgroupproxymodel.h>
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
#include <QAbstractItemModelTester>
#endif
#include <QtTest/qtest.h>
#include <QSignalSpy>
#include <QStandardPaths>
......@@ -79,9 +77,7 @@ private Q_SLOTS:
model.setTripGroupManager(&groupMgr);
TripGroupProxyModel proxy;
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
QAbstractItemModelTester tester(&proxy);
#endif
proxy.setSourceModel(&model);
proxy.expand(addSpy.at(0).at(0).toString());
proxy.expand(addSpy.at(1).at(0).toString());
......@@ -133,9 +129,7 @@ private Q_SLOTS:
model.setTripGroupManager(&groupMgr);
TripGroupProxyModel proxy;
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
QAbstractItemModelTester tester(&proxy);
#endif
proxy.setSourceModel(&model);
// future event, should be expanded
......
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