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

Depend on KOpeningHours unconditionally

It's going to be released with 21.04.
parent 19e979f4
......@@ -72,6 +72,7 @@ ecm_find_qmlmodule(QtLocation 5.11)
ecm_find_qmlmodule(QtPositioning 5.11)
ecm_find_qmlmodule(org.kde.prison 1.0)
ecm_find_qmlmodule(org.kde.kosmindoormap 1.0)
ecm_find_qmlmodule(org.kde.kopeninghours 1.0)
if (NOT ANDROID)
ecm_find_qmlmodule(Qt.labs.platform 1.0)
endif()
......
......@@ -75,16 +75,11 @@ Kirigami.OverlaySheet {
}
}
// TODO remove the conditional use once we can hard-depend on KOpeningHours
property bool hasOpeningHoursSupport: Qt.createQmlObject('import QtQml 2.0; import org.kde.kopeninghours 1.0; QtObject{}', contentView, "opening hour availability probe") != null
Component {
id: infoOpeningHoursDelegate
Loader {
source: "IndoorMapInfoSheetOpeningHoursDelegate.qml"
onLoaded: {
item.mapData = elementDetailsSheet.mapData;
item.model = row;
}
IndoorMapInfoSheetOpeningHoursDelegate {
mapData: elementDetailsSheet.mapData
model: row
}
}
......@@ -111,7 +106,7 @@ Kirigami.OverlaySheet {
case OSMElementInformationModel.PostalAddress:
return infoAddressDelegate;
case OSMElementInformationModel.OpeningHoursType:
return contentView.hasOpeningHoursSupport ? infoOpeningHoursDelegate : infoStringDelegate;
return infoOpeningHoursDelegate;
case OSMElementInformationModel.String:
default:
return infoStringDelegate;
......
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