Fix focus in Active Qt webbrowser.

Active X controls may cause WM_SETFOCUS/WM_KILLFOCUS to be sent to
native child windows. Ensure the focus widget is set correctly in
these cases.

Task-number: QTBUG-37126
Change-Id: I2a4cbb148eab48e47ca3f37b2076020c95d213a5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
QSharedPointer: implement move ctor

Change-Id: I46974aa1d056be797db959b547a1516157b598ca
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QSharedPointer/QWeakPointer: clean up class definition

Remove superfluous class template arguments (<T>).
Qualify one member function call with this-> instead of QSharedPointer<T>::.

Change-Id: I5cbe8776fc914138b7ceb4747a08c6475227197b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
Enable menuless dialogs on Windows.

Handle the flags combination Qt::Dialog && !Qt::WindowSystemMenuHint
such that it results in exStyle = WS_EX_DLGMODALFRAME and style =
WS_POPUP | WS_BORDER | WS_SYSMENU and a window class without icon.

Do not set !Qt::WindowSystemMenuHint in QWidgetPrivate::adjustFlags()
for dialogs on Windows.

[ChangeLog][QtWidgets][QDialog][Windows] Dialogs can now be menuless.

Task-number: QTBUG-2027

Change-Id: Ieb86985e8a5291d826c103fe478ecde43971f08e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Add qHashBits(), a hash function for a memory block

The function arguments have been chosen to avoid caller-side casting of
argument types, when passing object addresses and type sizeof()s.

[ChangeLog][QtCore] Added qHashBits() to aid implementing qHash() overloads
for custom types.

Change-Id: I983a8560769bb27e489f23ebb6db51850ddd65f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>