diff options
author | Keith Gardner <kreios4004@gmail.com> | 2013-04-04 22:34:49 -0500 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-08 16:28:20 +0200 |
commit | 8c857622f07cd6a63cdf9dab79a0112b39da4f91 (patch) | |
tree | 4f537ba3c5c629bc335bea46a15b99ce2aaea855 /src/gui/image/qimage.h | |
parent | adcc9a196adedf7bc701efe022f4959caeb7086f (diff) |
QImage: Added a move constructor.
[QTBUG-30517]
Change-Id: I173de783ef8113ab10fb553cc82ef60904a15400
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/image/qimage.h')
-rw-r--r-- | src/gui/image/qimage.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h index 50d4bc7666..a4aaf049f0 100644 --- a/src/gui/image/qimage.h +++ b/src/gui/image/qimage.h @@ -139,6 +139,11 @@ public: explicit QImage(const QString &fileName, const char *format = 0); QImage(const QImage &); +#ifdef Q_COMPILER_RVALUE_REFS + inline QImage(QImage &&other) + : QPaintDevice(), d(0) + { qSwap(d, other.d); } +#endif ~QImage(); QImage &operator=(const QImage &); |