diff options
author | Keith Gardner <kreios4004@gmail.com> | 2013-02-02 13:37:31 -0600 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-18 22:24:54 +0100 |
commit | cfc09b656420a42a9f4b8e7b8b3ebe4fc4a426a2 (patch) | |
tree | e5d660f5fbc86ebca28c7a5b18d7bd0b881126e0 /src/corelib/tools/qlocale.h | |
parent | 3654a4a3c1cb2ac9bb8b486877d9f1e6a6b220be (diff) |
QLocale: Added QStringRef overloads to toInt(), toUInt(), etc...
Added the following function overloads to QLocale: toShort, toUShort,
toInt, toUInt, toLong, toULong, toLongLong, toULongLong, toFloat, and
toDouble.
Change-Id: I8cd90ca08b88338b08a73a72492f4c91c4f46ea4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qlocale.h')
-rw-r--r-- | src/corelib/tools/qlocale.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/tools/qlocale.h b/src/corelib/tools/qlocale.h index cb008da0c9..f7f30ea0d5 100644 --- a/src/corelib/tools/qlocale.h +++ b/src/corelib/tools/qlocale.h @@ -67,6 +67,7 @@ class Q_CORE_EXPORT QLocale Q_ENUMS(Country) Q_ENUMS(MeasurementSystem) friend class QString; + friend class QStringRef; friend class QByteArray; friend class QIntValidator; friend class QDoubleValidatorPrivate; @@ -710,6 +711,15 @@ public: float toFloat(const QString &s, bool *ok = 0) const; double toDouble(const QString &s, bool *ok = 0) const; + short toShort(const QStringRef &s, bool *ok = 0) const; + ushort toUShort(const QStringRef &s, bool *ok = 0) const; + int toInt(const QStringRef &s, bool *ok = 0) const; + uint toUInt(const QStringRef &s, bool *ok = 0) const; + qlonglong toLongLong(const QStringRef &s, bool *ok = 0) const; + qulonglong toULongLong(const QStringRef &s, bool *ok = 0) const; + float toFloat(const QStringRef &s, bool *ok = 0) const; + double toDouble(const QStringRef &s, bool *ok = 0) const; + QString toString(qlonglong i) const; QString toString(qulonglong i) const; inline QString toString(short i) const; |