summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/compat/removed_api.cpp3
-rw-r--r--src/corelib/text/qstring.cpp15
-rw-r--r--src/corelib/text/qstring.h14
3 files changed, 21 insertions, 11 deletions
diff --git a/src/corelib/compat/removed_api.cpp b/src/corelib/compat/removed_api.cpp
index 2204be9a3c..ddaa6ec61a 100644
--- a/src/corelib/compat/removed_api.cpp
+++ b/src/corelib/compat/removed_api.cpp
@@ -365,4 +365,7 @@ void QXmlStreamReader::addData(const char *data)
#endif // QT_CONFIG(xmlstreamreader)
+// inlined API
+#include "qstring.h"
+
#endif // QT_CORE_REMOVED_SINCE(6, 5)
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp
index bb5c0fe4ee..8b5c02324d 100644
--- a/src/corelib/text/qstring.cpp
+++ b/src/corelib/text/qstring.cpp
@@ -7158,6 +7158,8 @@ QString QString::vasprintf(const char *cformat, va_list ap)
}
/*!
+ \fn QString::toLongLong(bool *ok, int base) const
+
Returns the string converted to a \c{long long} using base \a
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
@@ -7184,11 +7186,6 @@ QString QString::vasprintf(const char *cformat, va_list ap)
\sa number(), toULongLong(), toInt(), QLocale::toLongLong()
*/
-qint64 QString::toLongLong(bool *ok, int base) const
-{
- return toIntegral_helper<qlonglong>(*this, ok, base);
-}
-
qlonglong QString::toIntegral_helper(QStringView string, bool *ok, int base)
{
#if defined(QT_CHECK_RANGE)
@@ -7203,8 +7200,9 @@ qlonglong QString::toIntegral_helper(QStringView string, bool *ok, int base)
return QLocaleData::bytearrayToLongLong(latin1, base, ok);
}
-
/*!
+ \fn QString::toULongLong(bool *ok, int base) const
+
Returns the string converted to an \c{unsigned long long} using base \a
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
@@ -7231,11 +7229,6 @@ qlonglong QString::toIntegral_helper(QStringView string, bool *ok, int base)
\sa number(), toLongLong(), QLocale::toULongLong()
*/
-quint64 QString::toULongLong(bool *ok, int base) const
-{
- return toIntegral_helper<qulonglong>(*this, ok, base);
-}
-
qulonglong QString::toIntegral_helper(QStringView string, bool *ok, uint base)
{
#if defined(QT_CHECK_RANGE)
diff --git a/src/corelib/text/qstring.h b/src/corelib/text/qstring.h
index 300b54feb6..5f2ffd2760 100644
--- a/src/corelib/text/qstring.h
+++ b/src/corelib/text/qstring.h
@@ -882,7 +882,9 @@ public:
{ return toIntegral_helper<long>(*this, ok, base); }
ulong toULong(bool *ok=nullptr, int base=10) const
{ return toIntegral_helper<ulong>(*this, ok, base); }
+ QT_CORE_INLINE_SINCE(6, 5)
qlonglong toLongLong(bool *ok=nullptr, int base=10) const;
+ QT_CORE_INLINE_SINCE(6, 5)
qulonglong toULongLong(bool *ok=nullptr, int base=10) const;
float toFloat(bool *ok=nullptr) const;
double toDouble(bool *ok=nullptr) const;
@@ -1527,6 +1529,18 @@ inline int QString::localeAwareCompare(QStringView s1, QStringView s2)
inline int QStringView::localeAwareCompare(QStringView other) const
{ return QString::localeAwareCompare(*this, other); }
+#if QT_CORE_INLINE_IMPL_SINCE(6, 5)
+qint64 QString::toLongLong(bool *ok, int base) const
+{
+ return toIntegral_helper<qlonglong>(*this, ok, base);
+}
+
+quint64 QString::toULongLong(bool *ok, int base) const
+{
+ return toIntegral_helper<qulonglong>(*this, ok, base);
+}
+#endif
+
namespace QtPrivate {
// used by qPrintable() and qUtf8Printable() macros
inline const QString &asString(const QString &s) { return s; }