Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37041538
en ru br
Репозитории ALT

Группа :: Система/Библиотеки
Пакет: qt5-base

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: alt-zonetab.patch
Скачать


--- a/src/corelib/time/qtimezoneprivate_tz.cpp
+++ b/src/corelib/time/qtimezoneprivate_tz.cpp
@@ -74,14 +74,14 @@ struct QTzTimeZone {
 };
 
 // Define as a type as Q_GLOBAL_STATIC doesn't like it
-typedef QHash<QByteArray, QTzTimeZone> QTzTimeZoneHash;
+typedef QMultiHash<QByteArray, QTzTimeZone> QTzTimeZoneHash;
 
 // Parse zone.tab table, assume lists all installed zones, if not will need to read directories
 static QTzTimeZoneHash loadTzTimeZones()
 {
-    QString path = QStringLiteral("/usr/share/zoneinfo/zone.tab");
+    QString path = QStringLiteral("/usr/share/zoneinfo/zone1970.tab");
     if (!QFile::exists(path))
-        path = QStringLiteral("/usr/lib/zoneinfo/zone.tab");
+        path = QStringLiteral("/usr/share/zoneinfo/zone.tab");
 
     QFile tzif(path);
     if (!tzif.open(QIODevice::ReadOnly))
@@ -96,11 +96,13 @@ static QTzTimeZoneHash loadTzTimeZones()
         if (!line.isEmpty() && line.at(0) != '#') {
             // Data rows are tab-separated columns Region, Coordinates, ID, Optional Comments
             const auto parts = line.splitRef(QLatin1Char('\t'));
+for(const auto country_code: parts.at(0).split(QLatin1Char(','), Qt::SkipEmptyParts)) {
             QTzTimeZone zone;
-            zone.country = QLocalePrivate::codeToCountry(parts.at(0));
+            zone.country = QLocalePrivate::codeToCountry(country_code);
             if (parts.size() > 3)
                 zone.comment = parts.at(3).toUtf8();
             zonesHash.insert(parts.at(2).toUtf8(), zone);
+}
         }
     }
     return zonesHash;
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin