From 8c857622f07cd6a63cdf9dab79a0112b39da4f91 Mon Sep 17 00:00:00 2001 From: Keith Gardner Date: Thu, 4 Apr 2013 22:34:49 -0500 Subject: QImage: Added a move constructor. [QTBUG-30517] Change-Id: I173de783ef8113ab10fb553cc82ef60904a15400 Reviewed-by: Thiago Macieira --- src/gui/image/qimage.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gui/image') 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 &); -- cgit v1.2.3