Make sure QFont's resolve mask is copied on compilers with C++0x support
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Fri, 29 Apr 2011 08:07:12 +0000 (10:07 +0200)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Fri, 29 Apr 2011 08:12:27 +0000 (10:12 +0200)
The QFont consists of a d pointer and a resolve mask, and they should
both be copied in the assignment operator.

Task-number: QTBUG-18921
Done-by: Friedemann Kleint
(cherry picked from commit cb5e526c6023237c36aac3446a0a18288f39f3a9)

src/gui/text/qfont.h

index 8dbc746..0c7b6f8 100644 (file)
@@ -239,7 +239,7 @@ public:
     bool isCopyOf(const QFont &) const;
 #ifdef Q_COMPILER_RVALUE_REFS
     inline QFont &operator=(QFont &&other)
-    { qSwap(d, other.d); return *this; }
+    { qSwap(d, other.d); qSwap(resolve_mask, other.resolve_mask);  return *this; }
 #endif
 
 #ifdef Q_WS_WIN