From f4a1d4ae2a7317af267354de5c3499d64a6a3131 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 4 Jan 2020 03:58:35 +0000 Subject: [PATCH] use proper type for index in QLocale::monthName(), QLocale::standaloneMonthName(), QString QLocale::dayName() and QLocale::standaloneDayName() Signed-off-by: Ivailo Monev --- src/core/tools/qlocale.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/tools/qlocale.cpp b/src/core/tools/qlocale.cpp index 7993bc22a..99f81fb91 100644 --- a/src/core/tools/qlocale.cpp +++ b/src/core/tools/qlocale.cpp @@ -1702,7 +1702,7 @@ QString QLocale::monthName(int month, FormatType type) const } #endif - const quint16 idx = month - 1; + const qint16 idx = month - 1; switch (type) { case QLocale::LongFormat: return getLocaleListData(d()->m_long_month_names, idx); @@ -1740,7 +1740,7 @@ QString QLocale::standaloneMonthName(int month, FormatType type) const } #endif - const quint16 idx = month - 1; + const qint16 idx = month - 1; switch (type) { case QLocale::LongFormat: return getLocaleListData(d()->m_standalone_long_month_names, idx); @@ -1776,7 +1776,7 @@ QString QLocale::dayName(int day, FormatType type) const } #endif - const quint16 idx = day - 1; + const qint16 idx = day - 1; switch (type) { case QLocale::LongFormat: return getLocaleListData(d()->m_long_day_names, idx); @@ -1815,7 +1815,7 @@ QString QLocale::standaloneDayName(int day, FormatType type) const } #endif - quint16 idx = day - 1; + const qint16 idx = day - 1; switch (type) { case QLocale::LongFormat: return getLocaleListData(d()->m_standalone_long_day_names, idx);