summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlocale.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qlocale.cpp')
-rw-r--r--src/corelib/tools/qlocale.cpp36
1 files changed, 24 insertions, 12 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 4d5924a03e..51b886b0e0 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -1371,8 +1371,10 @@ qulonglong QLocale::toULongLong(const QString &s, bool *ok) const
}
/*!
- Returns the float represented by the localized string \a s, or 0.0
- if the conversion failed.
+ 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 \c nullptr, failure is reported by setting *\a{ok}
to \c false, and success by setting *\a{ok} to \c true.
@@ -1391,8 +1393,10 @@ float QLocale::toFloat(const QString &s, bool *ok) const
}
/*!
- Returns the double represented by the localized string \a s, or
- 0.0 if the conversion failed.
+ 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 \c nullptr, failure is reported by setting *\a{ok}
to \c false, and success by setting *\a{ok} to \c true.
@@ -1538,8 +1542,10 @@ qulonglong QLocale::toULongLong(const QStringRef &s, bool *ok) const
}
/*!
- Returns the float represented by the localized string \a s, or 0.0
- if the conversion failed.
+ 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 \c nullptr, failure is reported by setting *\a{ok}
to \c false, and success by setting *\a{ok} to \c true.
@@ -1560,8 +1566,10 @@ float QLocale::toFloat(const QStringRef &s, bool *ok) const
}
/*!
- Returns the double represented by the localized string \a s, or
- 0.0 if the conversion failed.
+ 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 \c nullptr, failure is reported by setting *\a{ok}
to \c false, and success by setting *\a{ok} to \c true.
@@ -1710,8 +1718,10 @@ qulonglong QLocale::toULongLong(QStringView s, bool *ok) const
}
/*!
- Returns the float represented by the localized string \a s, or 0.0
- if the conversion failed.
+ 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 \c nullptr, failure is reported by setting *\a{ok}
to \c false, and success by setting *\a{ok} to \c true.
@@ -1729,8 +1739,10 @@ float QLocale::toFloat(QStringView s, bool *ok) const
}
/*!
- Returns the double represented by the localized string \a s, or
- 0.0 if the conversion failed.
+ 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 \c nullptr, failure is reported by setting *\a{ok}
to \c false, and success by setting *\a{ok} to \c true.