diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-10-18 15:50:05 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-10-20 09:27:21 +0000 |
commit | dd8351b654180205c63e06c5099a1329762a91d2 (patch) | |
tree | cd47bb79b2fa2d5c2ae79883e0b8ee7bd932a94d /src | |
parent | 21b1a492edbdf74de9de8709b37b9f2483b35bed (diff) |
QLatin1String: add default ctor
A pending change in uic depends on this.
[ChangeLog][QtCore][QLatin1String] Added default constructor.
Change-Id: Ie6f5dfc7b38683a488b0ff7f31404800ef5ee188
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/tools/qstring.cpp | 6 | ||||
-rw-r--r-- | src/corelib/tools/qstring.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 38b5dcfe1f..f2c44a1de9 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -8225,6 +8225,12 @@ QString &QString::setRawData(const QChar *unicode, int size) \sa QString, QLatin1Char, {QStringLiteral()}{QStringLiteral} */ +/*! \fn QLatin1String::QLatin1String() + \since 5.6 + + Constructs a QLatin1String object that stores a nullptr. +*/ + /*! \fn QLatin1String::QLatin1String(const char *str) Constructs a QLatin1String object that stores \a str. diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 7829317d1f..4c51b84ab8 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -83,6 +83,7 @@ template <typename T> class QVector; class QLatin1String { public: + Q_DECL_CONSTEXPR inline QLatin1String() Q_DECL_NOTHROW : m_size(0), m_data(Q_NULLPTR) {} Q_DECL_CONSTEXPR inline explicit QLatin1String(const char *s) : m_size(s ? int(strlen(s)) : 0), m_data(s) {} Q_DECL_CONSTEXPR inline explicit QLatin1String(const char *s, int sz) : m_size(sz), m_data(s) {} inline explicit QLatin1String(const QByteArray &s) : m_size(s.size()), m_data(s.constData()) {} |