summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qlocale_tools_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/text/qlocale_tools_p.h')
-rw-r--r--src/corelib/text/qlocale_tools_p.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/corelib/text/qlocale_tools_p.h b/src/corelib/text/qlocale_tools_p.h
index 61c4061f1a..9b02403ea4 100644
--- a/src/corelib/text/qlocale_tools_p.h
+++ b/src/corelib/text/qlocale_tools_p.h
@@ -26,14 +26,6 @@ enum StrayCharacterMode {
WhitespacesAllowed
};
-template <typename T> struct QSimpleParsedNumber
-{
- T result;
- // When used < 0, -used is how much was used, but it was an error.
- qsizetype used;
- bool ok() const { return used > 0; }
-};
-
// API note: this function can't process a number with more than 2.1 billion digits
[[nodiscard]] QSimpleParsedNumber<double>
qt_asciiToDouble(const char *num, qsizetype numLen,
@@ -68,7 +60,7 @@ void qt_doubleToAscii(double d, QLocaleData::DoubleForm form, int precision,
template <typename UcsInt>
[[nodiscard]] inline UcsInt unicodeForDigit(uint digit, UcsInt zero)
{
- // Must match QLocaleData::numericToCLocale()'s digit-digestion.
+ // Must match qlocale.cpp's NumberTokenizer's digit-digestion.
Q_ASSERT(digit < 10);
if (!digit)
return zero;
@@ -90,7 +82,8 @@ template <typename UcsInt>
return qstrntod(s00, len, se, ok);
}
-[[nodiscard]] QSimpleParsedNumber<qlonglong> qstrntoll(const char *nptr, qsizetype size, int base);
+[[nodiscard]] Q_AUTOTEST_EXPORT
+QSimpleParsedNumber<qlonglong> qstrntoll(const char *nptr, qsizetype size, int base);
[[nodiscard]] QSimpleParsedNumber<qulonglong> qstrntoull(const char *nptr, qsizetype size, int base);
QT_END_NAMESPACE