Fix QFontMetrics width

Commit f4dd534 introduced a regression, so that QFontMetrics reported
a wrong size (to be more specific width) for FreeType fonts.
The calculation of glyph advances has to to reflect (rounded)
integral number of pixels. This was only done when the glyph was cached.
So in some cases the first call to QFontMetrics::size gave a different
result than the second.
This patch reverts f4dd5344fbbce257a40e014acc4e87f4773f40.

The tst_QFontMetrics::same auto test only happened to work on some
platforms, on BlackBerry for instance it did not. Extended the test
case to make sure it works for different font sizes.

Change-Id: Ia5bb9abd3ff98193c9bba048b85207672ed8d9c3
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Loosen checks for Q_COMPILER_VARIADIC_MACROS

So far we did bind the definition of Q_COMPILER_VARIADIC_MACROS to
C++11 (so gcc, clang will not define it in default gnu++98 standard).
However, variadic macros are a feature of the gcc preprocessor since
version 2.97, and are enabled in the default configurations on gcc, clang,
icc.

This might cause warnings and errors though if one enables additional
warnings in gcc, clang (e.g. by -pedantic). Anyhow, as a precedent
qglobal.h already relies on  'long long' ... The warning can be disabled
by adding '-Wno-variadic-macros'.

[ChangeLog][Compiler Specific Changes] Variadic macros are now enabled
more liberally for gcc, clang, icc. If you have warnings (because you e.g.
compile with -pedantic), disable them by -Wno-variadic-macros.

Change-Id: Ie979b85809508ad70cab75e6981f20496429f463
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Windows: Ensure clipboard is flushed out before QGuiApplication is destroyed.

Otherwise, OleFlushClipboard() might query the data again which causes
problems for QMimeData-derived classes using QPixmap/QImage.

Task-number: QTBUG-36958

Change-Id: I89e58eeb64bd3481e89ad789f310f19ddb4604a2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
QTextObject: replace a use of an inefficient QList with QVector

The QTextLayout::FormatRange is larger than void* and thus should not be held in
QList. Use a QVector instead.

This is public, but as of yet unreleased API.

Change-Id: Ie04a561b43c91c3b2befb3cac2981821f84d5f77
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>