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) ...@@ -72,6 +72,7 @@ ecm_find_qmlmodule(QtLocation 5.11)
ecm_find_qmlmodule(QtPositioning 5.11) ecm_find_qmlmodule(QtPositioning 5.11)
ecm_find_qmlmodule(org.kde.prison 1.0) ecm_find_qmlmodule(org.kde.prison 1.0)
ecm_find_qmlmodule(org.kde.kosmindoormap 1.0) ecm_find_qmlmodule(org.kde.kosmindoormap 1.0)
ecm_find_qmlmodule(org.kde.kopeninghours 1.0)
if (NOT ANDROID) if (NOT ANDROID)
ecm_find_qmlmodule(Qt.labs.platform 1.0) ecm_find_qmlmodule(Qt.labs.platform 1.0)
endif() endif()
......
...@@ -75,16 +75,11 @@ Kirigami.OverlaySheet { ...@@ -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 { Component {
id: infoOpeningHoursDelegate id: infoOpeningHoursDelegate
Loader { IndoorMapInfoSheetOpeningHoursDelegate {
source: "IndoorMapInfoSheetOpeningHoursDelegate.qml" mapData: elementDetailsSheet.mapData
onLoaded: { model: row
item.mapData = elementDetailsSheet.mapData;
item.model = row;
}
} }
} }
...@@ -111,7 +106,7 @@ Kirigami.OverlaySheet { ...@@ -111,7 +106,7 @@ Kirigami.OverlaySheet {
case OSMElementInformationModel.PostalAddress: case OSMElementInformationModel.PostalAddress:
return infoAddressDelegate; return infoAddressDelegate;
case OSMElementInformationModel.OpeningHoursType: case OSMElementInformationModel.OpeningHoursType:
return contentView.hasOpeningHoursSupport ? infoOpeningHoursDelegate : infoStringDelegate; return infoOpeningHoursDelegate;
case OSMElementInformationModel.String: case OSMElementInformationModel.String:
default: default:
return infoStringDelegate; 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