From f3e798c4572e308f6f520c6d966ae7f74fe835b7 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 17 Apr 2018 14:12:50 +0200 Subject: Improve qt.conf registration handling When PyInstaller is used to deploy a PySide2 application, it changes the layout of the copied PySide2 files (no Qt subfolder, all shared libraries are copied next to tehe generated executable). In that case using the internal qt.conf won't work. Detect if there a exists a qt.conf file next to the executable, and use that file instead. Note that this won't work when the executable path has unicode characters in conjunction with Python 2 and Windows, but that is an unsupported config anyway (due to the mixing MSVC issue). Also add a logging category to ease figuring out which qt.conf file is used if a need ever arises to do so. Task-number: PYSIDE-642 Change-Id: I1260cbc13e5e62be72c4ed9c64c2aa5905d2e9c6 Reviewed-by: Cristian Maureira-Fredes Reviewed-by: Friedemann Kleint --- sources/pyside2/libpyside/pyside.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sources/pyside2/libpyside/pyside.h') diff --git a/sources/pyside2/libpyside/pyside.h b/sources/pyside2/libpyside/pyside.h index becb92208..d36965d7b 100644 --- a/sources/pyside2/libpyside/pyside.h +++ b/sources/pyside2/libpyside/pyside.h @@ -50,6 +50,7 @@ #include #include #include +#include struct SbkObjectType; @@ -163,6 +164,8 @@ PYSIDE_API QString pyStringToQString(PyObject *str); */ PYSIDE_API bool registerInternalQtConf(); +Q_DECLARE_LOGGING_CATEGORY(lcPySide2) + } //namespace PySide -- cgit v1.2.3