Refactor OS X bundle detection for QFileInfo
authorSamuel Gaist <samuel.gaist@edeltech.ch>
Fri, 2 May 2014 07:26:25 +0000 (09:26 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 2 May 2014 21:15:30 +0000 (23:15 +0200)
commit4c45b6ca8ae38f56efab881f3c996a8a89edbd08
treeb9b3cfa02e3a24e15a624048b612ada7ac4dd9df
parent136ab6592f8034e3954fb8842ed6e2f40cee2b86
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>
src/corelib/io/qfilesystemengine_unix.cpp
src/tools/bootstrap/bootstrap.pro