Bug 1822789 - Debug level option (shiboken2) shows no effect
Summary: Debug level option (shiboken2) shows no effect
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pyside2
Version: 31
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Richard Shaw
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-09 20:29 UTC by Morian Sonnet
Modified: 2020-04-25 02:20 UTC (History)
3 users (show)

Fixed In Version: python-pyside2-5.13.2-3.fc31 python-pyside2-5.13.2-3.fc32
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-18 00:07:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Morian Sonnet 2020-04-09 20:29:53 UTC
Description of problem:
When using the shiboken2 generator, setting any debug level with --debug-level=(sparse|medium|full) shows no effect.


Version-Release number of selected component (if applicable):
shiboken2-1:5.13.2-1.fc31.x86_64


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 main function solves this issue.

Comment 1 Fedora Update System 2020-04-10 12:33:04 UTC
FEDORA-2020-b05f2dfb3a has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-b05f2dfb3a

Comment 2 Fedora Update System 2020-04-10 12:33:05 UTC
FEDORA-2020-f31c1d92e8 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-f31c1d92e8

Comment 3 Fedora Update System 2020-04-10 16:56:47 UTC
FEDORA-2020-f31c1d92e8 has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-f31c1d92e8`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-f31c1d92e8

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2020-04-11 18:51:36 UTC
FEDORA-2020-b05f2dfb3a has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-b05f2dfb3a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-b05f2dfb3a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2020-04-18 00:07:33 UTC
FEDORA-2020-f31c1d92e8 has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2020-04-25 02:20:30 UTC
FEDORA-2020-b05f2dfb3a has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.