QWizard/Win: Fix incorrect cached state after all wizards destroyed

If a QWizard is shown when Aero is enabled, the current visual style is
cached in a static member of QVistaHelper. The cached state is updated
by QVistaHelper when it receives WM_THEMECHANGED or
WM_DWMCOMPOSITIONCHANGED events from Windows.

If all QWizard instances are destroyed, there are no instances of
QVistaHelper to receive these notifications and update the cache. If
Aero is now disabled, the cached current visual style in QVistaHelper
isn't updated. If a wizard is now created and shown, a large black
rectangle is shown in the titlebar.

A static instance count is added so that when no wizards are running,
the cached state is not used.

Task-number: QTBUG-27004
Change-Id: Iefe4c8552388280219c9726418ed7476b8ebb15a
(cherry picked from commit 952ea029f40aaff9de0101fc165907ef8693e4aa)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
qpa: incorrect rendering when stretching and clipping

When using QBlittable with SourceOverScaledPixmapCapability, rendering
through clipAndDrawPixmap is incorrect when stretching: source pixmap
rectangle has to be corrected using scaling factor.

Change-Id: I80ad1c5ddc73a7b7394d0f5b412931c6279c175a
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Update the git-archive export options

The .gitattributes, .gitignore, .commit-template files do not need to be
present in packaged sources, as they are for people using the Git
repository.  People who download tarballs usually don't reimport into
Git -- they should just download the actual repositories.

Meanwhile, the .tag file is quite useful. Instead of making Git extract
to the useless SHA-1 of the "$Id$\n" string, ask git-archive to store
the SHA-1 of the commit being packaged.

Change-Id: I9a24a526e66f58ef2ebd9a2319bf96cf43e3e6f7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Doc: Improved tr()-example

Change-Id: I02400b5c6ad2a5b6a5c6a8ffa9f234f27969e0a8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Decouple -lang-c++ from CXX command on QNX mkspecs

Making -lang-c++ integral part of the $CXX command was wrong, because there are
cases where $CXX must be called without the -lang-c++ file (when building asm
files for instance). This commit moves the -lang-c++ to $CXX_FLAGS where it
belongs.

Backport of commits
    f4f185edd9dda513320e23b9a3e3f92be203884f
    e3224554272600a22fd9d22bdb754832b5127da2

Change-Id: I18be06411648281bd42f3c40b8add637cd7ddfa0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
QNX: Enable pre-compiled header support for QNX

Backport of bc80ee36f8ffe18f8362b2328ca29f92291df132

Change-Id: I76453dadc24c9bf7ff34d972214c057b82143c77
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
QWizard/Win: Fix vista helper cache state invalidation

If the cached state is not dirty and the instanceCount is zero, when the
instanceCount is incremented the cached state will not be correct. To
fix this, reset the cached state to dirty if the instanceCount is
incremented from zero.

Change-Id: Ic49eef7f83b1289a939f998817b1b2b5f5a2a45f
(cherry picked from commit e5ebcbc6343a5d5d815cbbd1812f1f5791b7bc88)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Optimize QTextEngine::findItem by using a binary search.

This is basically a backport from Qt5:

- revert the revert: 22995948cd3f46780be5d8016708aeef0cd7b066
- backport from qtbase: 487583459ea7958f24cd579888a662bcce26caf3
  this fixes the off-by-one error in the binary search

Task-number: QTBUG-17209
Task-number: QTBUG-231
Change-Id: I7f62fb33cf919ecd7fb2246ae01bb23559e11bf4
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
QNX: Move qpa-based mkspecs out of the unsupported directory

RIM is committed to supporting Qt on its platforms and the port works
well.

Backport of commit 219ba05b2a43e40feeb2bdebbf53d6da55f2dba2

Change-Id: If34940018036685c6b8dbda193c97b8c50eef1dd
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Allow compilation on OS X 10.5

Fixes regression introduced by
    aa21fcac3672cc6f0dca064b34bbe02ca4f4def7

Change-Id: Iada496dd8fee390771d8fc12066e93ef086dee90
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: Juhani Taipale <juhani.taipale@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Minimal backport of --device-option support in configure

This parial backport only adds the --device-option so it becomes
possible to set and cache additional qmake variables.

Partial cherry pick from qtbase/84e98fd9d2594637e928096c8fcb19d52e5e2676

Change-Id: I96636766aec7e12bfb1d377c8a607301a325a46c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Add qmake CROSS_COMPILE variable via load(device_config)

The compiler prefix could be set optionally by CROSS_COMPILE.

Partial cherry pick from qtbase/2dc3181bdcc0d447d2bec42fa3b7cbecb640a51a

Change-Id: I9a9cc31d7c5fda8b33fe280ee2a90cda0196da7d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Add cross_compile to qconfig.pri for global advertising

.qmake.cache is not necessarily accessible to other modules which depend on
information about whether we are cross compiling or not. We might as well
advertise this fact globally via the CONFIG variable in qconfig.pri.

Backported qtbase/3c47b52bd37488d41a3ad068de7976c838b7d63c

Change-Id: Ie2566a44fb26e26af97c791e1ed1592fd650dbbd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Disable rpath, pkg-config, "reduce export" flag when x-compiling for mingw

This patch disables rpath and pkg-config because both are not supported by Windows.
The reduce export flag produces linker errors when Dlls are used.

Partial cherry pick from qtbase/07a978d3d4b41739eff1061dc45dbfa737bf78b9

Change-Id: Iee679373397a2f97780876471a138c7bcddd2c7b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Revert "Speed up QTextEngine::resolveAdditionalFormats"

This reverts commit 49fbb6e14af78f751fa114c3cf986aaa607d7408 which
introduced crashes e.g. in Qt Creator. Since the original
change was an optimization, it is reverted in the Qt 4.8 branch
since stability is the main priority there. The crash has been
fixed for the corresponding Qt 5 commit.

It would be an option to recommit the optimization and the
crash fix to a future minor release of Qt 4.

Task-number: QTBUG-27140
Change-Id: I9dc959ea252fe55a22fd90f333ccb335b3ef1311
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Never compile QPA with EGL support on Windows

It's a follow-up of d7168ae0ff930f19f206a1b56c03fc35b22bb948,
which is doing exactly the same on linux.

Change-Id: Id9eb996d2edf5867491fd420bdf743e0f799a778
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Symbian: Handle Qt input hints for email and url editors

Earlier Qt input hints ImhEmailCharactersOnly and
ImhUrlCharactersOnly were handled in Symbian by function
CAknEdwinState::SetSpecialCharacterTableResourceId.
Along with the new QML touch input any support for this
mechanism has apparently ceased, and the input hint
has no effect. To get '/' to the first page of url editor
virtual keyboard, or '@' to the first page of email editor
virtual keyboard, one has to use function
CAknEdwinState::SetExtensionFlags instead.
Smileys are disabled when these hints are set.

Change-Id: Iec87274da40a7d59c97a479affed7d143dd5aa25
Task-id: ou1cimx1#1012431
Reviewed-by: Marko Kenttälä <ext-marko.r.kenttala@nokia.com>
Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
Symbian: fix symbian QtCore deffiles (for QUrl::detach)

Freeze added exports caused by commit c3fe37fe
(change Ie2674e46eb7416b0e753323b673c10f9d3457f6d).

Change-Id: Icca8eff81e62f73639ee7f21b087370dfe501571
Reviewed-by: Jaakko Helanti <ext-jaakko.helanti@nokia.com>
Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
Symbian: fix symbian QtCore deffile (for QObjectPrivate)

Freeze added exports caused by commit 3c4c9709
(change If5c3701426208875f3b775040c4e7bcbaac2b0a9), to fix Symbian
winscw build break.

Change-Id: Ia8c14d95004e17059af05e91431b71b6767d3885
Reviewed-by: Jaakko Helanti <ext-jaakko.helanti@nokia.com>
Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
Fix calculation of logical child index for row headers.

Change-Id: I6b7a5b4d698d496a6710dd479b24f10c7d7e5851
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>