Optimize QColor::setNamedColor

This patch removes two memory allocations from the algorithm.

Change-Id: I9366f9c5ce02fb1cae8adfbd8dff36c7f23af2a7
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
QWeakPointer: add lock() for std::weak_ptr compatibility

[ChangeLog][QtCore][QWeakPointer] Added lock() method for std::weak_ptr compatibility.

Change-Id: I0851d91c51f5a4f04a855a1d8082234ce38396b4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QWeakPointer: add member-swap

[ChangeLog][QtCore][QWeakPointer] Added member-swap function.

Change-Id: Ide3672dc74a9d8153e5f930290d938e8c23993b5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>