summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstring.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/text/qstring.h')
-rw-r--r--src/corelib/text/qstring.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/corelib/text/qstring.h b/src/corelib/text/qstring.h
index 6456c088bb..a8a1211ff5 100644
--- a/src/corelib/text/qstring.h
+++ b/src/corelib/text/qstring.h
@@ -712,13 +712,18 @@ public:
static int localeAwareCompare(QStringView s1, QStringView s2);
- // ### Qt6: make inline except for the long long versions
- short toShort(bool *ok=nullptr, int base=10) const;
- ushort toUShort(bool *ok=nullptr, int base=10) const;
- int toInt(bool *ok=nullptr, int base=10) const;
- uint toUInt(bool *ok=nullptr, int base=10) const;
- long toLong(bool *ok=nullptr, int base=10) const;
- ulong toULong(bool *ok=nullptr, int base=10) const;
+ short toShort(bool *ok=nullptr, int base=10) const
+ { return toIntegral_helper<short>(*this, ok, base); }
+ ushort toUShort(bool *ok=nullptr, int base=10) const
+ { return toIntegral_helper<ushort>(*this, ok, base); }
+ int toInt(bool *ok=nullptr, int base=10) const
+ { return toIntegral_helper<int>(*this, ok, base); }
+ uint toUInt(bool *ok=nullptr, int base=10) const
+ { return toIntegral_helper<uint>(*this, ok, base); }
+ long toLong(bool *ok=nullptr, int base=10) const
+ { return toIntegral_helper<long>(*this, ok, base); }
+ ulong toULong(bool *ok=nullptr, int base=10) const
+ { return toIntegral_helper<ulong>(*this, ok, base); }
qlonglong toLongLong(bool *ok=nullptr, int base=10) const;
qulonglong toULongLong(bool *ok=nullptr, int base=10) const;
float toFloat(bool *ok=nullptr) const;