Make unicode ranges in font take precedence over codepage

Change 4b2c73b4767bcb512cbc17f65186eac5d004db07 triggered a
regression on Android, because the DroidSansFallback.ttf font
has codepage ranges that list Arabic as a supported codepage
despite the fact that the font has no glyphs for Arabic.

If a font has valid unicode ranges which does not specify
support for e.g. Arabic, then the code page ranges for the
same script should be ignored.

[ChangeLog][Android][Fonts] Fixed support for Arabic text.

Task-number: QTBUG-36789
Change-Id: I7c5a0e303fd9ed2733275814fe752ae0fb54a207
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
QtConcurrent: Extend workaround GCC bug 58800 in median calculation

GNU/Linux distributions like Fedora update the __GLIBCXX__ date (e.g.
because of applied extra patches on top) and thus make the current
workaround useless. As long as no official gcc/libstdc++ version is
released, we can increment the "upper bound" date to cover such cases.

See also comment #1 at QTCREATORBUG-11129.

Change-Id: I1fdf6f312664163f6a99a8eddf490646ff25a87d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Mark the QArrayData alloc/dealloc functions as nothrow

Throwing is handled at a higher level.

Change-Id: I573e4ded135b61e35fbe6e188be09acf449911fc
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Redo the Q_FOREACH loop control without GCC statement expressions

It's possible to do without them, which probably makes the number of
supported compilers a lot bigger: they just need to support decltype()
or __typeof__.

That includes the Intel compiler. The old code was also apparently
working, but no one had realized the old workaround for some old version
was still in place.

The loop overhead is more or less the same. I have not done benchmarks,
but inspection of the generated assembly shows more or less the same
number of instructions.

Change-Id: I32d499c84a6ddd19d994b49f17a469acb5c3a3f1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Add the option of using decltype() in Q_FOREACH

This should allow more compilers to use the shorter & simpler version of
the macro.

Change-Id: Ibd2bf20f479b707a7806d0265a5580ebfc2e7733
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Bump Qt version to 5.4.0

Change-Id: I9eea1d2e383aff7eec4817b17c098a6fcc03e041
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Doc: Removed Contents listing for Qt Examples and Tutorials page.

-Qt Examples and Tutorials page does not need the table of contents.

Task-number: QTBUG-36838
Change-Id: Id51ebc7cba7831a24cd9d8e8e6bde7f96bece326
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Doc: Updated CSS used by the offline documentation.

-new layout for landing page
-updates to title sizes and changes to footer
-fixes to general paragraph issues

-index.qdoc changed in qtdoc repository

Task-number: QTBUG-36411
Change-Id: Icb4fb0374e474137686f4cb67c64dc0249fef2c4
Reviewed-by: Martin Smith <martin.smith@digia.com>
WinRT package_manifest: Remove comment about manifest overwrite

This comment is wrong and should be removed. The manifest is always
generated.

Change-Id: I281737dd6a358380fb557063eadae88909f5078b
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
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>
Fix paint artifacts.

Android is using double buffering, so, we need to repaint the bounding
rect of the repaint region, otherwise black holes will appear.

Change-Id: I21f36a6f5f1a6c64b605c0fef3af10dfdc5ec6e2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Rework the splash screen for Android.

Allow the developers to define a splash screen which will be visible
until the first window is created.

[ChangeLog][Android] Allow the developers to define a splash
screen which will be visible until the first window is created.

Task-number: QTBUG-30652

Change-Id: I5da80be417ffffb03e66009f45745d4b387d2912
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Avoid truncation warning in openglwindow example

msvc shows a warning about double -> float truncation. Avoid this.

Change-Id: I1b74cf407c81c881df5e95cc7d64a210888595e3
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Remove QT_OPENGLPROXY_DEBUG

Change-Id: Iac4c5217eca88ac14acca55d19e421d8e33cdb1d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
eglfs: Fix swapped red and blue with QOpenGLWidget

Change-Id: I0793d0b53c0e7df65fecfe43ef9daaf07413ea77
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Avoid using GLX Pbuffers on Catalyst

Trigger QOffscreenSurface's fallback mode (hidden QWindow and a regular window
surface) instead. queryDummyContext() already works like this but the same must
be done for any QOffscreenSurface.

Task-number: QTBUG-36900
Change-Id: I64176ac6704e9d6ed768fa3d456c40c8818be6dc
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Expose NPOTTextureRepeat in QOpenGLFunctions

Desktop GL 2.0 and higher supports GL_REPEAT on non-power-of-two
textures. GL_ARB_texture_non_power_of_two mentions this explicitly
in issue #8.

Change-Id: Ia7f3b412b39cca4bec8a6caec3b1281b4c29ab75
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>