Refactor OS X bundle detection for QFileInfo

CFBundleGetPackageInfoInDirectory originally used tests for the presence
of information that are not mandatory in a bundle.
Following Apple's documentation, the new approach is to use
Uniform Type Identifier which queries the OS directly to check whether
the extension conforms to kUTTypeBundle. That includes e.g.
applications, frameworks etc.

Then it tries to determine if the bundle can be opened with an
application that is not Finder.

Last thing, it checks whether the package bit is set.

(cherry picked from qtbase/72d60ea08c14037250459a5424ffee7a36b909b1)
(cherry picked from qtbase/bcfc68f9cd00982decd7ceb312966caf6b1ca05e)
(cherry picked from qtbase/afacf694d5a6f34b88989e76971d70d700ce4949)
Task-number: QTBUG-31884
Change-Id: I4ce3d8b90d116960b2044d3fafe3f745f6141416
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
fix include of private header

Change-Id: I0554933de2536231d7d416d8df5b96eaa459fc51
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Fix - psql driver must format qdatetime using iso

QDatetTime must be formatted as ISO8601 specifies, date/month must be padded with 0 until width is 2
Task-number:QTBUG-33389

Change-Id: I2db10e4b0f55a2666b2a12d7d8fcd03f13b96875
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Use WINVER instead of _MSC_VER for version check in qeventdispatcher_win.cpp.

Task-number: QTBUG-38604
Change-Id: Idb8a8219e09c6aa1a1b24e45b9da640c8d4b7161
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
(cherry picked from qtbase/e30ae1268f8e224369ff7841b90184c8694a86e7)
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Polish the image gestures example.

- Add command line parsing to properly evaluate help option and
  directory argument, add options to disable gestures.
- Add verbose option so that the user can actually see what is
  happening.
- Scale large images.
- Use qreal instead of float.
- Minor polishing: set window title, position file dialog at
  pictures location.

Task-number: QTBUG-37759
Task-number: QTBUG-37203
Change-Id: Ibaf54a13034b150386a8aee476f83a9eba298298
Reviewed-by: Indrajit Tapadar <indrajit.tapadar@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
(cherry picked from qtbase/c0701f3789acf3234e9f6431b4e8c7dc3ccefabb)
Reviewed-by: Marko Kangas <marko.kangas@digia.com>
Don't use QAbstractButton::pixmap() as this will always return 0.

Instead of using pixmap() we use icon() instead which is what the
extension menu is after in this case.

Task-number: QTBUG-38301
Change-Id: I2c238b50b0fcf04318100d2d6d39f563ef3eff5b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
QMdiArea: Ignore events of other instances in the event filter.

This caused for example the variable QMdiAreaPrivate::isSubWindowsTiled
being cleared from another instance, which resulted in odd
resizing behavior.

Task-number: QTBUG-31448
Change-Id: I880f7e415d6654e52499df1bfaf99f2c55d86320
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
(cherry picked from qtbase/9e2c4bc67f30eb1e8d776afe3a092d5994aaab38)
Don't crash on broken GIF images

Broken GIF images could set invalid width and height
values inside the image, leading to Qt creating a null
QImage for it. In that case we need to abort decoding
the image and return an error.

Initial patch by Rich Moore.

Backport of Id82a4036f478bd6e49c402d6598f57e7e5bb5e1e from Qt 5

Task-number: QTBUG-38367
Change-Id: I0680740018aaa8356d267b7af3f01fac3697312a
Security-advisory: CVE-2014-0190
Reviewed-by: Richard J. Moore <rich@kde.org>
Fix MacOS build with SDK 10.7, XCode 4.3 and above

A hardcoded path condition failed and thus the dependency CoreWLAN
was not added. This caused missing symbols.

This patch is not necessary for Qt5 as only SDKs 10.6+ are supported.

Task-number: QTBUG-24361
Change-Id: I273a2be8d2bd7c72e8d7a1eed7c3e62a380e237a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Fix visual index lookup in QTreeViewPrivate::adjustViewOptionsForIndex().

Determine the visual index by looking up the column of the QModelIndex
in the logicalIndices array instead of looping.

Task-number: QTBUG-37813
Change-Id: I5c3c73c67537877b03cdc2c36a52041d99f7f49d
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from qtbase/85aef2dd4b059d2ba9cba4605d9fef87f3e2c4fc)
Fix tst_QStyleSheetStyle::toolTip().

Use the correct palette and enforce plain Windows style to prevent
the Vista style from clobbering the tooltip palette in polish().

Task-number: QTBUG-38183
Change-Id: Id19d548f818d801c4914a343e08207195c343888
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
(cherry picked from qtbase/7a2547164d207119468abbfa4c0eb594948bb608)
Windows: Add missing colors to tooltip palette.

Task-number: QTBUG-38183
Change-Id: Ic3581cc87c0d61140624ddaf6fa85d682120ad4f
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
(cherry picked from qtbase/9fc0c5466238eb8f43d2736d298ac36c65da529e)
Fix detection of newer MinGW toolchains in configure.exe

This fixes a regression in the new MinGW packages that are now built
with mkspec win32-g++-4.6: Since we failed to detect this as a MinGW
mkspec we missed to check for headers in all relevant paths, which
disabled windowsxp, windosvista styles by default.

This commit does not apply to Qt 5, similar issues there are being
fixed independently.

[ChangeLog][Windows] configure.exe now detects newer MinGW versions
correctly, enabling windowsxp and windowsvista styles by default.

Task-number: QTBUG-38706
Change-Id: Ib4e7af69e8040aaa28940f501cce5572588d4378
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Restore dirty line logic in RenderInline::destroy

In ea0cb7ad2066d9c3dc695ab2ebe724249b05ca0f the webkit version was
upgraded which effectively merged http://trac.webkit.org/changeset/85869
The follow up patch was never merged: http://trac.webkit.org/changeset/86060
associated with ​https://bugs.webkit.org/show_bug.cgi?id=60448

Change-Id: I7dff1733439bb3bcfecc767da9147aa09a3159cf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Memory and file descriptor leak in QFontCache

Make the cache also use the ref counts
Make everyone who decrements a ref count check for 0 and delete
Move all cache logic to the cache
Same idea as 36cb3f3 and b3dae68 in Qt 5 without the extra stuff

Task-number: QTBUG-38035
Change-Id: I27bea376f4ec0888463b4ec3ed1a6bef00d041f8
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Tslib QWS: also apply missing release coordinate code to non-raw mode

Even if the normal mode is used the release events may have zero coordinates.

Change-Id: Ia9de05928ab5dfc225665e3b2c9a4d42f6ba984e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Tslib plugin: also apply missing release coordinate code to non-raw mode

Even if the normal mode is used the release events may have zero coordinates.

Change-Id: I2eac8cf50dfcf9e62d8cec2423419a6579266849
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
(cherry picked from qtbase/9ba7cc07dbef542bc73f97f1d7458699d25fbb8d)