Commit baca5039 authored by Volker Krause's avatar Volker Krause
Browse files

Use the sort filter proxy model QML export from KItemModels everywhere

We depend on that meanwhile anyway, so no need to keep our own ones.
parent 3c2c64b0
Pipeline #158798 passed with stage
in 3 minutes and 14 seconds
......@@ -8,6 +8,7 @@ import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15 as QQC2
import org.kde.kirigami 2.17 as Kirigami
import org.kde.kitemmodels 1.0
import org.kde.kpublictransport 1.0
import org.kde.itinerary 1.0
import "." as App
......@@ -41,7 +42,7 @@ Kirigami.ScrollablePage {
id: journeyModel
}
SortFilterProxyModel {
KSortFilterProxyModel {
id: sortedJourneyModel
sourceModel: journeyModel
sortRole: JourneyQueryModel.ScheduledDepartureTime
......
......@@ -8,6 +8,7 @@ import QtQuick 2.5
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.1 as QQC2
import org.kde.kirigami 2.17 as Kirigami
import org.kde.kitemmodels 1.0
import org.kde.kpublictransport 1.0
import org.kde.itinerary 1.0
import "." as App
......@@ -23,7 +24,7 @@ Kirigami.ScrollablePage {
manager: LiveDataManager.publicTransportManager
}
SortFilterProxyModel {
KSortFilterProxyModel {
id: sortedJourneyModel
sourceModel: journeyModel
sortRole: JourneyQueryModel.ScheduledDepartureTime
......
......@@ -129,7 +129,6 @@ void registerApplicationTypes()
qmlRegisterType<CountrySubdivisionModel>("org.kde.itinerary", 1, 0, "CountrySubdivisionModel");
qmlRegisterType<DocumentsModel>("org.kde.itinerary", 1, 0, "DocumentsModel");
qmlRegisterType<LocationInformationDelegateController>("org.kde.itinerary", 1, 0, "LocationInformationDelegateController");
qmlRegisterType<QSortFilterProxyModel>("org.kde.itinerary", 1, 0, "SortFilterProxyModel"); // TODO use this from kitemmodels?
qmlRegisterType<StatisticsModel>("org.kde.itinerary", 1, 0, "StatisticsModel");
qmlRegisterType<StatisticsTimeRangeModel>("org.kde.itinerary", 1, 0, "StatisticsTimeRangeModel");
qmlRegisterType<TicketTokenModel>("org.kde.itinerary", 1, 0, "TicketTokenModel");
......
......@@ -21,7 +21,6 @@
#include <QFile>
#include <QGuiApplication>
#include <QUrl>
#include <QSortFilterProxyModel>
int main(int argc, char **argv)
{
......@@ -57,7 +56,6 @@ int main(int argc, char **argv)
req.setTo(to);
req.setIncludeIntermediateStops(true);
qmlRegisterType<QSortFilterProxyModel>("org.kde.itinerary", 1, 0, "SortFilterProxyModel");
qmlRegisterSingletonType("org.kde.itinerary", 1, 0, "Localizer", [](QQmlEngine*, QJSEngine *engine) -> QJSValue {
return engine->toScriptValue(Localizer());
});
......
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