windeployqt: Patch qt_prfxpath when deploying Qt5Core
authorKai Koehne <kai.koehne@theqtcompany.com>
Fri, 17 Jul 2015 10:24:47 +0000 (12:24 +0200)
committerKai Koehne <kai.koehne@theqtcompany.com>
Mon, 3 Aug 2015 11:14:59 +0000 (11:14 +0000)
commitc2952ff8df1e18fe0120d8b29901b0b794afccc7
tree06789bc2ba3ebaf11f5cb69b243563de62e89fe8
parenta2dbd63a3b31bf99ed53e55e75219eee9b53f984
windeployqt: Patch qt_prfxpath when deploying Qt5Core

Patch the preconfigured Qt path in Qt5Core to '.'. This allows one to
immediately test whether the generated package is self-contained, without
Qt being able to 'fall back' to the installed Qt for loading plugins. It
is also fixing a potential security issue where Qt tries to load plugins
from 'unexpected' places.

The effect is the same as adding a qt.conf file with all the defaults.
However, a lot of people consider adding a qt.conf ugly.

[ChangeLog][Important behavior changes][windeployqt] windeployqt now
changes the hardcoded QLibraryInfo::PrefixPath in Qt5Core to be relative
to the executable.

Change-Id: Ib59d84453913f28b806ae78a0ef138eb4f0045fa
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
src/windeployqt/main.cpp
src/windeployqt/utils.cpp
src/windeployqt/utils.h