Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1265

Debug level option (shiboken2) shows no effect

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.13.2
    • Shiboken
    • 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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            momosomium Morian Sonnet
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: