summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qlocale.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-05-22 14:24:01 +0200
committerLars Knoll <lars.knoll@qt.io>2020-06-11 15:52:25 +0200
commit39e229fe13a2112dcc5d033f4535fd019aab800b (patch)
tree42ab8a99c397e22b78cbbec4b2c2346e275fb51e /src/corelib/text/qlocale.cpp
parent8ea11e0cf7f442f687089ffdf54de1f7540cb20b (diff)
Remove more QStringRef overloads that aren't required
The QStringView versions will do the job just fine :) Task-number: QTBUG-84319 Change-Id: I376b310deb27683fd98bbcc55e0f56014cacecc3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/corelib/text/qlocale.cpp')
-rw-r--r--src/corelib/text/qlocale.cpp217
1 files changed, 0 insertions, 217 deletions
diff --git a/src/corelib/text/qlocale.cpp b/src/corelib/text/qlocale.cpp
index a2cf2caec0..8217641aa3 100644
--- a/src/corelib/text/qlocale.cpp
+++ b/src/corelib/text/qlocale.cpp
@@ -1582,223 +1582,6 @@ double QLocale::toDouble(const QString &s, bool *ok) const
{
return d->m_data->stringToDouble(s, ok, d->m_numberOptions);
}
-
-/*!
- Returns the short int represented by the localized string \a s.
-
- If the conversion fails the function returns 0.
-
- If \a ok is not \nullptr, failure is reported by setting *\a{ok}
- to \c false, and success by setting *\a{ok} to \c true.
-
- This function ignores leading and trailing whitespace.
-
- \sa toUShort(), toString()
-
- \since 5.1
-*/
-
-short QLocale::toShort(const QStringRef &s, bool *ok) const
-{
- return toIntegral_helper<short>(d, s, ok);
-}
-
-/*!
- Returns the unsigned short int represented by the localized string \a s.
-
- If the conversion fails the function returns 0.
-
- If \a ok is not \nullptr, failure is reported by setting *\a{ok}
- to \c false, and success by setting *\a{ok} to \c true.
-
- This function ignores leading and trailing whitespace.
-
- \sa toShort(), toString()
-
- \since 5.1
-*/
-
-ushort QLocale::toUShort(const QStringRef &s, bool *ok) const
-{
- return toIntegral_helper<ushort>(d, s, ok);
-}
-
-/*!
- Returns the int represented by the localized string \a s.
-
- If the conversion fails the function returns 0.
-
- If \a ok is not \nullptr, failure is reported by setting *\a{ok}
- to \c false, and success by setting *\a{ok} to \c true.
-
- This function ignores leading and trailing whitespace.
-
- \sa toUInt(), toString()
-
- \since 5.1
-*/
-
-int QLocale::toInt(const QStringRef &s, bool *ok) const
-{
- return toIntegral_helper<int>(d, s, ok);
-}
-
-/*!
- Returns the unsigned int represented by the localized string \a s.
-
- If the conversion fails the function returns 0.
-
- If \a ok is not \nullptr, failure is reported by setting *\a{ok}
- to \c false, and success by setting *\a{ok} to \c true.
-
- This function ignores leading and trailing whitespace.
-
- \sa toInt(), toString()
-
- \since 5.1
-*/
-
-uint QLocale::toUInt(const QStringRef &s, bool *ok) const
-{
- return toIntegral_helper<uint>(d, s, ok);
-}
-
-/*!
- Returns the long int represented by the localized string \a s.
-
- If the conversion fails the function returns 0.
-
- If \a ok is not \nullptr, failure is reported by setting *\a{ok}
- to \c false, and success by setting *\a{ok} to \c true.
-
- This function ignores leading and trailing whitespace.
-
- \sa toInt(), toULong(), toDouble(), toString()
-
- \since 5.13
- */
-
-
-long QLocale::toLong(const QStringRef &s, bool *ok) const
-{
- return toIntegral_helper<long>(d, s, ok);
-}
-
-/*!
- Returns the unsigned long int represented by the localized
- string \a s.
-
- If the conversion fails the function returns 0.
-
- If \a ok is not \nullptr, failure is reported by setting *\a{ok}
- to \c false, and success by setting *\a{ok} to \c true.
-
- This function ignores leading and trailing whitespace.
-
- \sa toLong(), toInt(), toDouble(), toString()
-
- \since 5.13
- */
-
-ulong QLocale::toULong(const QStringRef &s, bool *ok) const
-{
- return toIntegral_helper<ulong>(d, s, ok);
-}
-
-/*!
- Returns the long long int represented by the localized string \a s.
-
- If the conversion fails the function returns 0.
-
- If \a ok is not \nullptr, failure is reported by setting *\a{ok}
- to \c false, and success by setting *\a{ok} to \c true.
-
- This function ignores leading and trailing whitespace.
-
- \sa toInt(), toULongLong(), toDouble(), toString()
-
- \since 5.1
-*/
-
-
-qlonglong QLocale::toLongLong(const QStringRef &s, bool *ok) const
-{
- return toIntegral_helper<qlonglong>(d, s, ok);
-}
-
-/*!
- Returns the unsigned long long int represented by the localized
- string \a s.
-
- If the conversion fails the function returns 0.
-
- If \a ok is not \nullptr, failure is reported by setting *\a{ok}
- to \c false, and success by setting *\a{ok} to \c true.
-
- This function ignores leading and trailing whitespace.
-
- \sa toLongLong(), toInt(), toDouble(), toString()
-
- \since 5.1
-*/
-
-qulonglong QLocale::toULongLong(const QStringRef &s, bool *ok) const
-{
- return toIntegral_helper<qulonglong>(d, s, ok);
-}
-
-/*!
- Returns the float represented by the localized string \a s.
-
- Returns an infinity if the conversion overflows or 0.0 if the
- conversion fails for any other reason (e.g. underflow).
-
- If \a ok is not \nullptr, failure is reported by setting *\a{ok}
- to \c false, and success by setting *\a{ok} to \c true.
-
- This function does not fall back to the 'C' locale if the string
- cannot be interpreted in this locale.
-
- This function ignores leading and trailing whitespace.
-
- \sa toDouble(), toInt(), toString()
-
- \since 5.1
-*/
-
-float QLocale::toFloat(const QStringRef &s, bool *ok) const
-{
- return QLocaleData::convertDoubleToFloat(toDouble(s, ok), ok);
-}
-
-/*!
- Returns the double represented by the localized string \a s.
-
- Returns an infinity if the conversion overflows or 0.0 if the
- conversion fails for any other reason (e.g. underflow).
-
- If \a ok is not \nullptr, failure is reported by setting *\a{ok}
- to \c false, and success by setting *\a{ok} to \c true.
-
- This function does not fall back to the 'C' locale if the string
- cannot be interpreted in this locale.
-
- \snippet code/src_corelib_text_qlocale.cpp 3
-
- Notice that the last conversion returns 1234.0, because '.' is the
- thousands group separator in the German locale.
-
- This function ignores leading and trailing whitespace.
-
- \sa toFloat(), toInt(), toString()
-
- \since 5.1
-*/
-
-double QLocale::toDouble(const QStringRef &s, bool *ok) const
-{
- return d->m_data->stringToDouble(s, ok, d->m_numberOptions);
-}
#endif // QT_STRINGVIEW_LEVEL < 2
/*!