widgets/qpa: Fix painting to a fully transparent top level widget

QWS used to have a line to change the composite mode from SourceOver
to Source for the top level widget. This wasn't used with QPA and I
removed the internal DontSetCompositionMode in qtbase. It turns out that
the QWS way is the most efficient one to initialize the background of
the widget.

The alternative is to have the QPlatformBackingStore::beginPaint
always clear the entire to be painted area and then paint the background
of the widget. The difference of painting each pixel once or twice is
noticable on embedded platforms and in the range of one to two fps.

This does come from Qt5. The change removes the hasFeature test as
CompositionMode_Source is available for all backends.

Reproduce the issue with:
echo "QWidget {background: transparent}" > style.css
./examples/widgets/wiggly/wiggly -stylesheet style.css

Task-number: QTBUG-24526
Change-Id: I3e3f8a263cd3cf9dec8628ca8a3bb28c70572121
Original-Id: Ica4c980bb3bf6eb87ddb5b510ac7493292d01543
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Refactor navigator event handling

Separate PPS based navigator event notification handling and implementation
of the actual event handling.

Like the similar refactoring for screen events, this will allow to reuse the
same event handler class for BPS driven event processing.

Backport of 4fac40f8b0e7b2a6f5f41eb82196e8b197bc851a

Change-Id: I388c2fc503db0fb4be7b80f82e280cf2c8b73015
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Do not redefine QT_SOCKLEN_T in freebsd-g++'s mkspec.

QT_SOCKLEN_T was being redefined depending on whether FreeBSD was < or
>= 4, branched in early 1999.

FreeBSD < 7 is not supported by the upstream project anymore, so we
can simplify the code and rely on the QT_SOCKLEN_T definition in
common/posix/qplatformdefs.h instead.

Cherry-picked from 1afad60e6030064fee772c37e2647ae8c891ac2f to
qt5/qtbase.

Change-Id: I9883755070d2731b12b1113def17ca217d510d6a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Remove the freebsd-g++34 mkspec.

GCC 3.4 is older than the 4.2.1 in the base system, and should be
removed from the ports tree.

Besides, nobody in their sane mind would want to build Qt with such an
old compiler.

Cherry-picked from 0e8aabadf947926b78de140fabf8be789c96a9ac to
qt5/qtbase.

Change-Id: Ie739d839f1b621aeda693ae6f6a78909a557f3dd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Do not define QT_AOUT_UNDERSCORE in freebsd-g++'s mkspec.

According to FreeBSD svn r52802 from 1999 the -aout compiler option and
the QT_AOUT_UNDERSCORE trick were already obsolete.

Since the FreeBSD project itself only supports versions 7 and above
these days, the definition can be safely removed.

Cherry-picked from 874ebef4535e5ae43d917595f00edd365150cfd9 to
qt5/qtbase.

Change-Id: I93717e7c937f05b36580914608a3d2d1177ef7d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
mkspecs: Sync freebsd-g++40 and freebsd-g++.

Make freebsd-g++40 include gcc-base-unix.conf and g++-unix.conf and
eliminate a lot of duplicate definitions.

Cherry picked from 996672933a61016fdc0ec6d42d536986c5080ac5 to
qt5/qtbase.

Change-Id: Iae42f48b4f43e92567b30f340a25f0bd86c43463
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
qmake vcproj generator: unused variable removed

Change-Id: Iaf8bb1772846001297e1a421c3860f5e4d090a35
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit 65425be8fef69733fb1613e1487f3f6b4fb2d472)
qmake: QMakeProject::intValue added

For variables that are supposed to contain a single int,
this method returns the numeric value.
Only the first value of the variable is taken into account.

Change-Id: Ifa11ba5ac044e0a4703a387a9bcf02043e4681d8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit ee4d723ecc24e6be33b4c30f9693b7fdce79c767)
qmake vcxproj generator: fix handling of /MANIFEST:NO linker option

Task-number: QTBUG-23513

Change-Id: I5dd6fb6fd7910e43acd28057133a3ad6613cfc1a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
(cherry picked from commit 31cfe5ca1b5006566051942254d977581a769e3e)
qmake/Win: fix incomplete generated version resource

Since Windows Vista the resource language must be included to
make the version information visible in Windows Explorer.

Two new variables have been introduced:
RC_LANG (default: 1033) - resource language
RC_CODEPAGE (default: 1200) - resource codepage

Task-number: QTBUG-23218
Change-Id: I29e102d19501e3b7a43d5096fc4806bc38a4d846
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
(cherry picked from commit 8987e5d2cb7b7816fd0002fd9ad939ab4f08971b)
qmake vc(x)proj generator: don't create bogus directories

When creating the temporary project object,
Option::output_dir must be adjusted temporarily.

Task-number: QTBUG-22788
Change-Id: Ibf8897a46b63f48b9e33d7e2168b09e559cecec7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit ac7dd2782f078e66c5240a07fff5a25cdf5ba61b)
Symbian: absent changed exports in symbian def-files

Absent the exports deprecated by ed881474111d635bb90d3e08e9fb70c06d19d48b
to enable symbian building.

Change-Id: I775d0159743d7d61866d910eefa9a0f807c7feff
Reviewed-by: Jaakko Helanti <ext-jaakko.helanti@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Symbian: absent changed exports in symbian def-files

Absent the exports changed by b84e033f2e77d108da413c00ee3d9f1636e8ad5b
to enable symbian building.

Change-Id: Ie3d715eea5ec2e955633ecfe019cb7fcaed9377d
Reviewed-by: Jaakko Helanti <ext-jaakko.helanti@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Bump Qt version to 4.8.2

Change-Id: Iecae324b1ae00c0d6fb6ed36a8f4a27f51a31d07
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Simo Fält <simo.falt@nokia.com>
Reviewed-by: Juha Kukkonen <ext-juha.kukkonen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
directfb: Use QPlatformPixmap::fromFile for Qt resources

Move to fromFile to load Qt resources for two reasons. The
first is that ::fromData creates a QBuffer on our raw data
and is passing that to the QImageReaders. Right now we there
is a QFile -> QByteArray -> QBuffer transition that wastes
cycles. The other reason is that QPlatformPixmap::fromData
did/does not check if the decoded image is null and might
cause a crash because of that.

Change-Id: I800bfe4cd9b5d6a0d3531ed33f4228770703e94f
Original-Id: I7cb92d84874323e7205ab28883cc0fe9ecca1e27
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
mkspecs: Rename freebsd-g++40 to freebsd-g++46.

lang/gcc40 was removed from FreeBSD's ports tree in 2007, and the
lang/gcc port, which provides a stable GCC version newer than the one in
the base system, is currently pointing to the 4.6 series.

Cherry-picked from c7b52e2a2a46047b7b6bca74a39c81cf43f1c864 to
qt5/qtbase.

Change-Id: I085e8495d449f47c1cfcf74e7f6511b2a8e3caa1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Fixed networkproxy build under WinCE

The used functionality is partially not available under WinCE.
qnetworkfunctions_wince.h encapsulates the needed extra symbols.
It only needs to compile as the functions are loaded dynamically.

Change-Id: Ieb9010d4f6c7f94d39918b869ac503976e094e49
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from commit 0e317af13f24d88a88c41f5efbd3fe9180ec6bee)
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Fix build with QT_NO_WARNING_OUTPUT

When defining QT_NO_WARNING_OUTPUT then qWarning() is not available so
it should be defined in the same manner as qDebug() in this context
which is as QNoDebug.

The cases in QtNetwork are changed to use qWarning("....") to avoid
having to add in an extra include of QDebug just so that qWarning() is
declared in the QT_NO_WARNING_OUTPUT case.

Task-number: QTBUG-25308
Change-Id: I4960d8943e805697d4c05cc6988306e5c25fc2bb
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Fix for memory leak in 64 bit ODBC driver's call to SQLGetStmtAttr()

Windows API call to SQLGetStmtAttr() attempts to place an 8 byte value
into the isScrollable variable which of type SQLINTEGER which is a long
and is 32 bit on Windows even when the driver is compiled for 64 bit.
Changing the isScrollable to and 8 byte SQLULEN type.

Task-number: QTBUG-25256
Change-Id: I1aae0b306e8d1ff5fc3b293b3e9ddd40546b85ad
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
fix static library names when generating .pc files for pkgconfig

c354d16cc64cf516a0b5149cdc9ef74de096a998 added the version extension
which only occurs on the DLL import library.

cherry-picked from qt5/qtbase 8e053a5dfc9b4c8f100b1e77335439774f52fc61
Change-Id: Ie913adf039d7f3a9aadf43f4af014289a8aeacbe
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>