Simplify (and fix) initialization of a list of time-zones
Looping over the entries had a typo in it and was quite unnecessary, as it just made a fresh copy of a list we already had. Pick-to: 6.6 6.5 6.2 5.15 Change-Id: I0f3023b06163e5854d425d816e465785cda5fc91 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
f8e1194aef
commit
07e4015687
@ -1,3 +1,4 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// Copyright (C) 2019 Crimson AS <info@crimson.no>
|
||||
// Copyright (C) 2018 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author David Faure <david.faure@kdab.com>
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
@ -29,11 +30,7 @@ private Q_SLOTS:
|
||||
static QList<QByteArray> enoughZones()
|
||||
{
|
||||
#ifdef EXHAUSTIVE
|
||||
auto available = QTimeZone::availableTimeZoneIds();
|
||||
QList<QByteArray> result;
|
||||
result.reserve(available.size() + 1);
|
||||
for (conat auto &name : available)
|
||||
result << name;
|
||||
QList<QByteArray> result = QTimeZone::availableTimeZoneIds();
|
||||
#else
|
||||
QList<QByteArray> result {
|
||||
QByteArray("UTC"),
|
||||
|
Loading…
Reference in New Issue
Block a user