Inline various date-time fromString(const QString &...) methods
As requested in code-review. Task-number: QTBUG-86400 Change-Id: I14e051e4bad3e8e227c6401e699f979663ffd10f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>bb10
parent
a3bd80c08c
commit
df276fb29f
|
|
@ -1138,14 +1138,6 @@ QString QDate::toString(QStringView format, QCalendar cal) const
|
|||
{
|
||||
return QLocale::c().toString(*this, format, cal);
|
||||
}
|
||||
|
||||
#if QT_STRINGVIEW_LEVEL < 2
|
||||
QString QDate::toString(const QString &format, QCalendar cal) const
|
||||
{
|
||||
return toString(qToStringViewIgnoringNull(format), cal);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // datestring
|
||||
|
||||
/*!
|
||||
|
|
@ -1916,14 +1908,6 @@ QString QTime::toString(QStringView format) const
|
|||
{
|
||||
return QLocale::c().toString(*this, format);
|
||||
}
|
||||
|
||||
#if QT_STRINGVIEW_VERSION < 2
|
||||
QString QTime::toString(const QString &format) const
|
||||
{
|
||||
return toString(qToStringViewIgnoringNull(format));
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // datestring
|
||||
|
||||
/*!
|
||||
|
|
@ -4034,13 +4018,6 @@ QString QDateTime::toString(QStringView format, QCalendar cal) const
|
|||
{
|
||||
return QLocale::c().toString(*this, format, cal);
|
||||
}
|
||||
|
||||
# if QT_STRINGVIEW_LEVEL < 2
|
||||
QString QDateTime::toString(const QString &format, QCalendar cal) const
|
||||
{
|
||||
return toString(qToStringViewIgnoringNull(format), cal);
|
||||
}
|
||||
# endif
|
||||
#endif // datestring
|
||||
|
||||
static inline void massageAdjustedDateTime(QDateTimeData &d, QDate date, QTime time)
|
||||
|
|
|
|||
|
|
@ -99,7 +99,8 @@ public:
|
|||
#if QT_CONFIG(datestring)
|
||||
QString toString(Qt::DateFormat format = Qt::TextDate) const;
|
||||
# if QT_STRINGVIEW_LEVEL < 2
|
||||
QString toString(const QString &format, QCalendar cal = QCalendar()) const;
|
||||
QString toString(const QString &format, QCalendar cal = QCalendar()) const
|
||||
{ return toString(qToStringViewIgnoringNull(format), cal); }
|
||||
# endif
|
||||
QString toString(QStringView format, QCalendar cal = QCalendar()) const;
|
||||
#endif
|
||||
|
|
@ -175,7 +176,8 @@ public:
|
|||
#if QT_CONFIG(datestring)
|
||||
QString toString(Qt::DateFormat f = Qt::TextDate) const;
|
||||
#if QT_STRINGVIEW_LEVEL < 2
|
||||
QString toString(const QString &format) const;
|
||||
QString toString(const QString &format) const
|
||||
{ return toString(qToStringViewIgnoringNull(format)); }
|
||||
#endif
|
||||
QString toString(QStringView format) const;
|
||||
#endif
|
||||
|
|
@ -303,7 +305,8 @@ public:
|
|||
#if QT_CONFIG(datestring)
|
||||
QString toString(Qt::DateFormat format = Qt::TextDate) const;
|
||||
# if QT_STRINGVIEW_LEVEL < 2
|
||||
QString toString(const QString &format, QCalendar cal = QCalendar()) const;
|
||||
QString toString(const QString &format, QCalendar cal = QCalendar()) const
|
||||
{ return toString(qToStringViewIgnoringNull(format), cal); }
|
||||
# endif
|
||||
QString toString(QStringView format, QCalendar cal = QCalendar()) const;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue