mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-25 03:12:56 +00:00
remove redundant checks from QDate short/long month/day getters
upstream commit:
e7f962d271
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
142dfd9a22
commit
069d7b62cc
1 changed files with 0 additions and 12 deletions
|
@ -494,9 +494,6 @@ int QDate::weekNumber(int *yearNumber) const
|
||||||
|
|
||||||
QString QDate::shortMonthName(int month, QDate::MonthNameType type)
|
QString QDate::shortMonthName(int month, QDate::MonthNameType type)
|
||||||
{
|
{
|
||||||
if (month < 1 || month > 12) {
|
|
||||||
month = 1;
|
|
||||||
}
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case QDate::DateFormat:
|
case QDate::DateFormat:
|
||||||
return QLocale::system().monthName(month, QLocale::ShortFormat);
|
return QLocale::system().monthName(month, QLocale::ShortFormat);
|
||||||
|
@ -539,9 +536,6 @@ QString QDate::shortMonthName(int month, QDate::MonthNameType type)
|
||||||
|
|
||||||
QString QDate::longMonthName(int month, MonthNameType type)
|
QString QDate::longMonthName(int month, MonthNameType type)
|
||||||
{
|
{
|
||||||
if (month < 1 || month > 12) {
|
|
||||||
month = 1;
|
|
||||||
}
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case QDate::DateFormat:
|
case QDate::DateFormat:
|
||||||
return QLocale::system().monthName(month, QLocale::LongFormat);
|
return QLocale::system().monthName(month, QLocale::LongFormat);
|
||||||
|
@ -579,9 +573,6 @@ QString QDate::longMonthName(int month, MonthNameType type)
|
||||||
|
|
||||||
QString QDate::shortDayName(int weekday, MonthNameType type)
|
QString QDate::shortDayName(int weekday, MonthNameType type)
|
||||||
{
|
{
|
||||||
if (weekday < 1 || weekday > 7) {
|
|
||||||
weekday = 1;
|
|
||||||
}
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case QDate::DateFormat:
|
case QDate::DateFormat:
|
||||||
return QLocale::system().dayName(weekday, QLocale::ShortFormat);
|
return QLocale::system().dayName(weekday, QLocale::ShortFormat);
|
||||||
|
@ -619,9 +610,6 @@ QString QDate::shortDayName(int weekday, MonthNameType type)
|
||||||
|
|
||||||
QString QDate::longDayName(int weekday, MonthNameType type)
|
QString QDate::longDayName(int weekday, MonthNameType type)
|
||||||
{
|
{
|
||||||
if (weekday < 1 || weekday > 7) {
|
|
||||||
weekday = 1;
|
|
||||||
}
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case QDate::DateFormat:
|
case QDate::DateFormat:
|
||||||
return QLocale::system().dayName(weekday, QLocale::LongFormat);
|
return QLocale::system().dayName(weekday, QLocale::LongFormat);
|
||||||
|
|
Loading…
Add table
Reference in a new issue