Commit 072a92c4 authored by Volker Krause's avatar Volker Krause
Browse files

Fix a few Qt6 compilation errors

parent b56a39b9
Pipeline #182735 passed with stage
in 1 minute and 23 seconds
......@@ -204,7 +204,11 @@ void Json::fromJson(const QMetaObject *mo, const QJsonObject &obj, void *elem)
}
auto valueData = mt.create();
*reinterpret_cast<int*>(valueData) = numValue;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QVariant value(prop.userType(), valueData);
#else
QVariant value(prop.metaType(), valueData);
#endif
prop.writeOnGadget(elem, value);
continue;
}
......
......@@ -26,9 +26,8 @@
#include <KPublicTransport/StopoverReply>
#include <KPublicTransport/StopoverRequest>
#include <KNotifications/KNotification>
#include <KLocalizedString>
#include <KNotification>
#include <QDir>
#include <QDirIterator>
......
......@@ -19,11 +19,13 @@ using namespace KItinerary;
void ReservationHelper::setup()
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QMetaType::registerEqualsComparator<BusTrip>();
QMetaType::registerEqualsComparator<Flight>();
QMetaType::registerEqualsComparator<Person>();
QMetaType::registerEqualsComparator<Ticket>();
QMetaType::registerEqualsComparator<TrainTrip>();
#endif
}
std::pair<QString, QString> ReservationHelper::lineNameAndNumber(const QVariant &res)
......
......@@ -320,3 +320,5 @@ StatisticsItem::Trend StatisticsModel::trend(StatisticsModel::AggregateType type
{
return trend(m_statData[type][stat], m_prevStatData[type][stat]);
}
#include "moc_statisticsmodel.cpp"
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