File indexing completed on 2025-02-02 05:02:39
0001 /* 0002 SPDX-FileCopyrightText: 2023 Volker Krause <vkrause@kde.org> 0003 SPDX-License-Identifier: LGPL-2.0-or-later 0004 */ 0005 0006 #include "weatherinformation.h" 0007 0008 #include <KItinerary/LocationUtil> 0009 #include <KItinerary/Place> 0010 0011 using namespace KItinerary; 0012 0013 QString WeatherInformation::labelForPlace(const QVariant &place) 0014 { 0015 // TODO add fallbacks to region if we have no better name 0016 const auto addr = LocationUtil::address(place); 0017 if (!addr.addressLocality().isEmpty()) { 0018 return addr.addressLocality(); 0019 } 0020 return LocationUtil::name(place); 0021 } 0022 0023 #include "moc_weatherinformation.cpp"