Commit 8c026f15 authored by Volker Krause's avatar Volker Krause
Browse files

Clean up deprecated and unused vehicle layout API

parent 037b083a
Pipeline #77406 passed with stage
in 18 seconds
......@@ -176,11 +176,6 @@ Stopover VehicleLayoutQueryModel::stopover() const
return d->m_stopover;
}
Stopover VehicleLayoutQueryModel::departure() const
{
return stopover();
}
int VehicleLayoutQueryModel::rowCount(const QModelIndex &parent) const
{
Q_D(const VehicleLayoutQueryModel);
......
......@@ -31,8 +31,6 @@ class KPUBLICTRANSPORT_EXPORT VehicleLayoutQueryModel : public AbstractQueryMode
Q_PROPERTY(KPublicTransport::Platform platform READ platform NOTIFY contentChanged)
/** The departure this vehicle layout belongs to. */
Q_PROPERTY(KPublicTransport::Stopover stopover READ stopover NOTIFY contentChanged)
/** @deprecated use stopover. */
Q_PROPERTY(KPublicTransport::Stopover departure READ stopover NOTIFY contentChanged)
public:
explicit VehicleLayoutQueryModel(QObject *parent = nullptr);
......@@ -44,7 +42,6 @@ public:
Vehicle vehicle() const;
Platform platform() const;
Stopover stopover() const;
[[deprecated("use stopover()")]] Stopover departure() const;
enum Roles {
VehicleSectionRole = Qt::UserRole
......
......@@ -45,27 +45,12 @@ VehicleLayoutRequest VehicleLayoutReply::request() const
return d->request;
}
Vehicle VehicleLayoutReply::vehicle() const
{
return stopover().vehicleLayout();
}
Platform VehicleLayoutReply::platform() const
{
return stopover().platformLayout();
}
Stopover VehicleLayoutReply::stopover() const
{
Q_D(const VehicleLayoutReply);
return d->stopover;
}
Stopover VehicleLayoutReply::departure() const
{
return stopover();
}
static bool isOneSidedCar(VehicleSection::Type type)
{
return type == VehicleSection::PowerCar || type == VehicleSection::ControlCar;
......
......@@ -28,13 +28,8 @@ public:
/** The request this is the reply for. */
VehicleLayoutRequest request() const;
/** Vehicle layout information found by this query. */
[[deprecated("use stopover().vehicleLayout()")]] Vehicle vehicle() const;
/** Platform layout information found by this query. */
[[deprecated("user stopover().platformLayout()")]] Platform platform() const;
/** The requested Stopover information, including the vehicle and platform layout. */
Stopover stopover() const;
[[deprecated("use stopover()")]] Stopover departure() const;
private:
friend class Manager;
......
......@@ -66,14 +66,4 @@ void VehicleLayoutRequest::setBackendIds(const QStringList &backendIds)
d->backendIds = backendIds;
}
Stopover VehicleLayoutRequest::departure() const
{
return stopover();
}
void VehicleLayoutRequest::setDeparture(const Stopover &departure)
{
setStopover(departure);
}
#include "moc_vehiclelayoutrequest.cpp"
......@@ -28,8 +28,6 @@ class KPUBLICTRANSPORT_EXPORT VehicleLayoutRequest
/** The stopover vehicle and platform layout information are requested for. */
KPUBLICTRANSPORT_PROPERTY(KPublicTransport::Stopover, stopover, setStopover)
/** @deprecated use stopover .*/
Q_PROPERTY(KPublicTransport::Stopover departure READ departure WRITE setDeparture)
public:
/** Creates a vehicle layout request for the given stopover. */
......@@ -51,9 +49,6 @@ public:
*/
void setBackendIds(const QStringList &backendIds);
[[deprecated("use stopover()")]] Stopover departure() const;
[[deprecated("use setStopover()")]] void setDeparture(const Stopover &departure);
///@cond internal
static QJsonObject toJson(const VehicleLayoutRequest &req);
///@endcond
......
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