Fix for OS X QFileDialog showing bundle as directory

Also check if the selectedFile is a bundle to correctly
set currentDir.

This fix does not apply to Qt 5 because QFileDialog has
been reimplemented differently and this file does not
exist anymore.

Task-number: QTBUG-31562

Change-Id: I145108647dd613cb529bb65bc6c7191154dab5b8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Compile with clang's libc++

An overload for std::swap() what works with std::pair<A,B> is included
in libc++ (but not libstdc++). Avoid ambiguity in HashTable.h by
omitting the version there and using the std::swap() version.

Collector.cpp needs to include pthread.h directly, as it is not
automatically included by libc++'s headers (libstdc++ does pull in
pthread.h though).

Cherry-picked from qtscript/48baeef0766ba145d26d374561e152b40245f3b8.

Change-Id: I4dc88638ce8553bb97037b841fc6cc5e8c9911e2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Only use Vista style for Wizards when on Vista or later

If the application is running in XP compatibility mode then we don't
want to show the Vista style for the wizard as this will include a back
button that should not exist. Therefore we check the platform it is on
before trying to resolve the symbols so that it is correct.

Change-Id: Ic7249e06461068fe08184a22bb750ab8736ebc3f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Cleanup the QDrag when doing a drag with the right mouse button on Mac

When doing a drag with the right mouse button on Mac then it will be
ignored straightaway because it will not be accepted. Therefore we
need to cleanup the QDrag object as normal so that it is deleted as
appropriate.

Change-Id: I781fcea7b7c75775adb814090e917363fa7c9189
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Document the fact that QPA is experimental in Qt 4.8

Task-number: QTBUG-26912

Change-Id: I8544a970f58faf9fd9811603d6640ad2b99ebe1d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
QDockWidget: Keep position when undocking.

Initialize undockedGeometry to roughly the current position.

Task-number: QTBUG-31044
Change-Id: I03cbe280d1215bb58ab721b60e29b45359cde76d
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
(cherry picked from qtbase/0d459619a902e547d8c74745453b3bdb8f67a660)