diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-07-22 12:41:40 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-01-12 06:14:56 +0000 |
commit | 6b9c4480bcb46c9d6bb4afc9b208018ff604a8bf (patch) | |
tree | c9d8a9f47e79bab45dfe13f47fcf589f6c39859b /src/corelib/tools/qlocale.h | |
parent | c5e4417d6d608b00782d1e2a154cfdfd2b374392 (diff) |
Mark QLocale as shared
It was already movable, so it's BC. Only needed to add
nothrow member-swap and nothrow move assignment.
Change-Id: Iefedb877078da8ee075eb67185eef221143ddec1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qlocale.h')
-rw-r--r-- | src/corelib/tools/qlocale.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/corelib/tools/qlocale.h b/src/corelib/tools/qlocale.h index e90354138c..b10dee509f 100644 --- a/src/corelib/tools/qlocale.h +++ b/src/corelib/tools/qlocale.h @@ -866,9 +866,13 @@ public: QLocale(Language language, Country country = AnyCountry); QLocale(Language language, Script script, Country country); QLocale(const QLocale &other); +#ifdef Q_COMPILER_RVALUE_REFS + QLocale &operator=(QLocale &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif + QLocale &operator=(const QLocale &other); ~QLocale(); - QLocale &operator=(const QLocale &other); + void swap(QLocale &other) Q_DECL_NOTHROW { qSwap(d, other.d); } Language language() const; Script script() const; @@ -994,7 +998,7 @@ private: QSharedDataPointer<QLocalePrivate> d; }; -Q_DECLARE_TYPEINFO(QLocale, Q_MOVABLE_TYPE); +Q_DECLARE_SHARED(QLocale) Q_DECLARE_OPERATORS_FOR_FLAGS(QLocale::NumberOptions) inline QString QLocale::toString(short i) const |