Remove last references to QT_PLUGIN_PATH

This commit is contained in:
Kovid Goyal 2019-09-04 07:55:34 +05:30
parent 89f5a0b183
commit c238a249af
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 5 deletions

View File

@ -1112,7 +1112,7 @@ def sanitize_env_vars():
if islinux and isfrozen:
env_vars = {'LD_LIBRARY_PATH':'/lib'}
elif iswindows:
env_vars = {k:None for k in 'QT_PLUGIN_PATH'.split()}
env_vars = {}
elif isosx:
env_vars = {k:None for k in (
'FONTCONFIG_FILE FONTCONFIG_PATH SSL_CERT_FILE').split()}

View File

@ -194,10 +194,10 @@ class BuildTest(unittest.TestCase):
# Ensure that images can be read before QApplication is constructed.
# Note that this requires QCoreApplication.libraryPaths() to return the
# path to the Qt plugins which it always does in the frozen build,
# because the QT_PLUGIN_PATH env var is set. On non-frozen builds,
# it should just work because the hard-coded paths of the Qt
# installation should work. If they do not, then it is a distro
# problem.
# because Qt is patched to know the layout of the calibre application
# package. On non-frozen builds, it should just work because the
# hard-coded paths of the Qt installation should work. If they do not,
# then it is a distro problem.
fmts = set(map(lambda x: x.data().decode('utf-8'), QImageReader.supportedImageFormats())) # no2to3
testf = {'jpg', 'png', 'svg', 'ico', 'gif'}
self.assertEqual(testf.intersection(fmts), testf, "Qt doesn't seem to be able to load some of its image plugins. Available plugins: %s" % fmts)