Fix detection of mingw gcc >=4.6

Make sure that the version check works for gcc e.g. from mingw-builds,
which contains spaces in the version info, e.g.

g++ (i686-posix-dwarf, Built by MinGW-W64 project) 4.8.2

In Qt 5, support for MinGW-gcc versions older than 4.6 was dropped.

Change-Id: Idac5fb3a8cd01200558032ea1bd997e30f0e8b8b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Remove incorrect check for mingw 64 bit

MinGW-w64 has '64' too, but isn't necessarily a 64 bit build ...
But the variable wasn't used anyway, so we can as well just remove
the check.

Change-Id: Ifba3ce344c5dc5e692f105bc99081ae4c69c779c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Fix the Carbon build

The function does not exist when building for Carbon with the 10.5 SDK
so since this means the function will effectively do nothing, so we
just return false in this case.

Change-Id: If41762a055ebeccfcfce751e164b6a6e7e1db437
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
QDeclarativeTypeLoader doesn't close processed QNetworkReplies

backport of Qt5 patch https://codereview.qt-project.org/#change,76825

This bug causes that Cascades QML application cannot open more than
system ulimit defined number of different asset:///*.qml files.

The realFile is ordinary closed in the ~QNetworkReplyFileImpl(),
the QDeclarativeTypeLoader::networkReplyFinished() calls
reply->deleteLater(). There are tricky situations when event-loop is
not entered and too many read already files are waiting for close.

This patch close() file when all the data is read. It can be done
this way since the QNetworkReplyFileImplnetworkreply is a sequential
device.

For more info, please, read comments on QTBUG-36032

cherry-pick from: qtbase cc88e6e92c806def34bce8cdcab275934ab646bf

Task-number: QTBUG-36032
Change-Id: I896cf9a89c541d743db1ccc11ab853219d844884
Reviewed-by: Richard J. Moore <rich@kde.org>
Restore dirty line logic in RenderInline::destroy

Ported from http://trac.webkit.org/changeset/86060
Add wkhtmltopdf definition to qwebframe.h

Define __EXTENSIVE_WKHTMLTOPDF_QT_HACK__ in qwebframe.h
so that wkhtmltopdf can check for it
Remove some graphics dependencies

Check for graphics mode in various webkit and qt classes, and
give sane fallback defaults in the case of tty mode.
Fix static build of webkit

Remove warning not allowing webkit in static build
Include JavaScriptCore in static build
make the static build for WebKit work properly

The following commits were ported from PhantomJS (for Webkit changes only):

https://github.com/ariya/phantomjs/commit/31157fbb98a9765c0043847a3a41359838aad0d0
https://github.com/ariya/phantomjs/commit/b11c6de9abfcf373f985b2c6629f34ec28b81ea6
https://github.com/ariya/phantomjs/commit/e7499d0b3332be1d2027238f1001c105b18a2950
https://github.com/ariya/phantomjs/commit/55a660f35a0c9ccf82a0296e83a9b4ff72ce637b
https://github.com/ariya/phantomjs/commit/62584ce7d4984030f2fb693760abab432ce5f591
fix build of WebKit on 64-bit MSVC 2010

The following link was used as a reference (with adaptations for static build)
http://blog.inventic.eu/2011/01/problem-with-qt-compilation-under-windows-64-bit
Fix static builds for Mac OS X
ignore untracked files generated during the build
do not build the QtWebkit tests
msvc: link to multithreaded static CRT + suppress warnings C4099, C4100, C4189

This is based on the corresponding commits in phantomjs:

https://github.com/ariya/phantomjs/commit/c3b30ac13654509b2fb3bfbf54789b885eff81a8
https://github.com/ariya/phantomjs/commit/d2c3a078ab50a8abd4b588744416ebfbfe2f905c
msvc: disable incremental linking for debug builds

This is because QtWebkit fails to link on 32-bit Windows.
Add support for links, hyperlinks and outlines to the pdf print system
Output pdf creation date in local time according to pdf spec
add support for not compressing pdf files
Add support for pdf forms in pdf print engine

Add text fields
Add initial checkbox support
Add radiobutton stup

The font support is still very basic
Add webpage print control API

The api allows for reusing a paint device to print more then one webpage,
spooling arbetrary pages, and querying the location of a html element,
in the printed document