Load "@2x" images on high-dpi "retina" systems.

Check for the existence of a "@2x" file when adding
an image to QIcon. For example, adding "foo.png" will
also add "foo@2x.png" if that file exists.

Change-Id: If32a3446cf56ca0828de17f6a361091e4c874f26
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
QMetaTypeId: use QByteArray, not QVarLengthArray, to construct type names

So far, type-name strings for class template instantiations were constructed
in QMetaTypeId::qt_metatype_id() by concatenating various bits and pieces
into a QVarLengthArray<char>, presumably to avoid the dynamic memory
allocation for small strings.

Yet, when passing the result to qRegisterNormalisedMetaType, which takes
a QByteArray, the QVarLengthArray was copied from, not by
QByteArray::fromRawData(), but by QByteArray(const char*,int), which
unconditionally results in a dynamic memory allocation after all.

What's worse: the characters are copied twice: First into the QVarLengthArray,
and then into the QByteArray.

Remove the first of these copies by using QByteArray+reserve() to copy
directly into the final QByteArray.

Change-Id: Id915798a318fe97279a7cc0aca176544f99c7e86
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
QWidget: micro-optimisation

Compare string size before content.

Change-Id: I00f9c6c6cf31148af4807455fa6f6b9254dda9d7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
QEventLoop: fix race on 'exit' and 'returnCode' private members

Change-Id: I380046f386448783e3e4e93bde8cbe15b9b0279e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Doc: Replaced canConvert() with canConvert(int)

This change makes the function reference more
relevant to the example being discussed.

Task-number: QTBUG-28204

Change-Id: I50bea45f1e11d7e1eef4bc6726ebb329151fbc3d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Doc: Document Q_OS_WIN* macros

Fix the documentation for Q_OS_WIN32 and document Q_OS_WIN64 and
Q_OS_WIN.

Task-number: QTBUG-23120
Change-Id: Ie040c8deb6aeba326b6fafab302fadf4d93fa49f
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Update the high-dpi manual test.

- Organize the test images into different sizes.
- Add a button and icon drawing test.
- Don't show all tests by default.

Change-Id: I95eff846b8c5159085f53b413dea7212c1ea5071
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Fix missing devicePixelRatio propagation on copy.

Change-Id: I0cb541fe8a92b7a7c159e0a6e5036baf43185a93
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Remove QMacQuartzPaintDevice.

Not used in Qt 5.

Change-Id: Ia0e14414afa524c5cc04151d20c168d93d8dcadb
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Make qt_setDockMenu work and call it.

The application delegate code from Qt 4 implements
a non-working qt_setDockMenu. Correct the signature
of the applicationDockMenu method.

Change-Id: I6f531a78f91e0550b0e66cc4f2fa072006a030f4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Mac style: Fix disabled menu item palette entry

Also, removed an "magic color" form the style implementation.

Change-Id: Iefd3ddc0d9d651d2b87f20eb1f9990a214b651df
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
tst_qthread: fix race on "bool visited"

Change-Id: I438bad9a4f8afb76272c8d8f08461a6d2c9a0b18
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>