diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-02-25 23:07:46 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-28 21:27:41 +0100 |
commit | db8167c224348fe828aaa0746701b7fa3040c2df (patch) | |
tree | c733df7fc7c7509db817e60e27f4aea7757231cb /src/plugins/platforms/windows/qwindowscontext.cpp | |
parent | 98d7d4c1e51010a0ca48ff59f30342e81fd0d066 (diff) |
QPen: add move constructor
After this change, the relation between copy/move constructor calls in QtGui is
something like 40/16.
A moved-from QPen can only be copied, assigned-to or else destroyed. This required
adding a nullptr check to the copy ctor and the dtor and rewriting copy assignment
(which used non-nullptr-safe qAtomicAssign) in terms of copy construction and
swapping.
Extensive tests included. They are implemented such that they work in C++98 as well
as C++11 mode, but they naturally test move semantics only in a C++11 build.
Change-Id: If68f37c10b8eeefb2478cbae386cd2e38b4f6e19
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowscontext.cpp')
0 files changed, 0 insertions, 0 deletions