QLibraryInfo::location() paths are relative to
"myapp.app/Contents/" when the application has a
bundle and relative to the executable when not.
However CFBundleGetMainBundle() can and will return
a valid CFBundleRef even if the application is built
as a standalone executable.
Add a test that verifies that the path constructed
with "/Contents" exists on disk. Fall back to the
non-bundle code path if it doesn't.
This bug was hit in cases where a qt.conf file was
present side-by-side with the app binary, for example
in qtbase/bin.
Task-number: QTBUG-38039
Change-Id: Id993599208fe94fff283c725778f8ad47b610ba7
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>