summaryrefslogtreecommitdiff
path: root/src/gui/kernel/qcursor.h
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-04-19 21:12:21 +0200
committerOlivier Goffart <olivier.goffart@nokia.com>2010-09-03 12:57:10 +0200
commitda0e1a682362144b9f13b4c564f86e09efb681bb (patch)
tree8cbf68a93b055515b2a56d9e0667c530b27e39e2 /src/gui/kernel/qcursor.h
parent605aa0cf1889110620dc0d5d84066be8177fe9c2 (diff)
downloadqt4-tools-da0e1a682362144b9f13b4c564f86e09efb681bb.tar.gz
C++0x move operators
This makes assignement faster from temporaries, as the operator is fully inline, and doesn't do any atomic operations. Reviewed-by: joao
Diffstat (limited to 'src/gui/kernel/qcursor.h')
-rw-r--r--src/gui/kernel/qcursor.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qcursor.h b/src/gui/kernel/qcursor.h
index 2490d206fb..ed6b254f65 100644
--- a/src/gui/kernel/qcursor.h
+++ b/src/gui/kernel/qcursor.h
@@ -96,6 +96,10 @@ public:
QCursor(const QCursor &cursor);
~QCursor();
QCursor &operator=(const QCursor &cursor);
+#ifdef Q_COMPILER_RVALUE_REFS
+ inline QCursor &operator=(QCursor &&other)
+ { qSwap(d, other.d); return *this; }
+#endif
operator QVariant() const;
Qt::CursorShape shape() const;