Fix warning on invalid time-zone lookup

Amends commit 569dc0de50a46b64763921199a2706ab34d151a9 to still return
when no zone file is found with the given name, as the code did
before.  Attempting to continue past the error was provoking warnings
from QIODevice::read().

Pick-to: 6.6.0 6.5
Task-number: QTBUG-116017
Change-Id: I0e224a6b30a3f32cd925d87ffba4dcb24f9b8568
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 59bf9160cc285bac1732fd3ade2ac033b2348b28)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Edward Welbourne 2023-09-14 17:31:17 +02:00 committed by Qt Cherry-pick Bot
parent 12e88c1ce3
commit 6d3db093b7

View File

@ -803,8 +803,8 @@ QTzTimeZoneCacheEntry QTzTimeZoneCache::findEntry(const QByteArray &ianaId)
if (check.isValid) { if (check.isValid) {
ret.m_hasDst = check.hasDst; ret.m_hasDst = check.hasDst;
ret.m_posixRule = ianaId; ret.m_posixRule = ianaId;
return ret;
} }
return ret;
} }
QDataStream ds(&tzif); QDataStream ds(&tzif);