Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
5.13.2
-
None
Description
Description of problem:
When using the shiboken2 generator, setting any debug level with
--debug-level=(sparse|medium|full)
shows no effect.
How reproducible:
100%
Steps to Reproduce:
1. Download the pyside2-Repo with
git clone git://code.qt.io/pyside/pyside-setup
2. Navigate to the samplebindings example:
cd pyside-setup/examples/samplebinding
3. Execute shiboken2
shiboken2 --debug-level=full --generator-set=shiboken --enable-parent-ctor-heuristic --enable-return-value-heuristic --use-isnull-as-nb_nonzero --avoid-protected-hack -I$(pwd) -T$(pwd) bindings.h bindings.xml
Actual results:
[momo@momolaptop samplebinding]$ shiboken2 --generator-set=shiboken --enable-parent-ctor-heuristic --enable-return-value-heuristic --use-isnull-as-nb_nonzero --avoid-protected-hack -I$(pwd) -T$(pwd) bindings.h bindings.xml (bindings) [263ms] Generating class model (10)... [OK] (bindings) [263ms] Generating enum model (0)... [OK] (bindings) [263ms] Generating namespace model (0)... [OK] (bindings) [263ms] Resolving typedefs (65)... [OK] (bindings) [263ms] Fixing class inheritance... [OK] (bindings) [263ms] Detecting inconsistencies in class model... [OK] (bindings) [263ms] Detecting inconsistencies in typesystem (6)... [OK] (bindings) [263ms] Checking inconsistencies in function modifications... [OK] (bindings) [263ms] Writing log files... [OK] (bindings) [264ms] Running Source generator... [OK] (bindings) [266ms] Running Header generator... [OK]
Expected results:
More debug information mixed into output, e.g. this block:
qt.shiboken: (bindings) traverseFunction: Checking rejection for signature "clone()" for Icecream: false qt.shiboken: (bindings) traverseFunction: Checking rejection for signature "~Icecream()" for Icecream: false qt.shiboken: (bindings) traverseFunction: Checking rejection for signature "getFlavor()" for Icecream: false qt.shiboken: (bindings) traverseFunction: Checking rejection for signature "Truck(bool)" for Truck: false qt.shiboken: (bindings) traverseFunction: Checking rejection for signature "Truck(const Truck&)" for Truck: false qt.shiboken: (bindings) traverseFunction: Checking rejection for signature "operator=(const Truck&)" for Truck: false qt.shiboken: (bindings) traverseFunction: Checking rejection for signature "~Truck()" for Truck: false qt.shiboken: (bindings) traverseFunction: Checking rejection for signature "addIcecreamFlavor(Icecream*)" for Truck: false qt.shiboken: (bindings) traverseFunction: Checking rejection for signature "printAvailableFlavors()" for Truck: false qt.shiboken: (bindings) traverseFunction: Checking rejection for signature "deliver()" for Truck: false qt.shiboken: (bindings) traverseFunction: Checking rejection for signature "arrive()" for Truck: false qt.shiboken: (bindings) traverseFunction: Checking rejection for signature "leave()" for Truck: false qt.shiboken: (bindings) traverseFunction: Checking rejection for signature "setLeaveOnDestruction(bool)" for Truck: false qt.shiboken: (bindings) traverseFunction: Checking rejection for signature "setArrivalMessage(const std::string&)" for Truck: false qt.shiboken: (bindings) traverseFunction: Checking rejection for signature "clearFlavors()" for Truck: false
Additional info:
While building the shiboken2-generator myself I noticed that the problem vanishes when replacing all occurences of qCDebug by qCWarning in the code. The reason for this is probably explained here: https://community.kde.org/Guidelines_and_HOWTOs/Debugging/Using_Error_Messages
It is stated that since Qt5.2 all debug lines are deactivated by default. Indeed, addingÂ
QLoggingCategory::setFilterRules(QStringLiteral("*.debug = true"));
to the start of the main function solves this issue entirely.
Attachments
For Gerrit Dashboard: PYSIDE-1265 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
297498,2 | Output code model in C++-like syntax | dev | pyside/pyside-setup | Status: NEW | 0 | 0 |
296862,1 | WIP: shiboken: enable qCDebug when using debug-level full | 5.14 | pyside/pyside-setup | Status: ABANDONED | -2 | 0 |
297336,4 | shiboken: Remove some progress and other messages | 5.15 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
297337,2 | shiboken: Introduce a separate logging category for documentation generation | 5.15 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
297338,4 | shiboken: Change most debug messages to use qCInfo | 5.15 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
297447,3 | shiboken: Refactor setting of debug level | 5.15 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
300615,1 | shiboken: Change most debug messages to use qCInfo | tqtc/5.15 | pyside/tqtc-pyside-setup | Status: ABANDONED | 0 | 0 |
300740,2 | shiboken: Fix duplicate base classes | 5.15 | pyside/pyside-setup | Status: MERGED | +2 | 0 |