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

%TYPE replaced without namespace

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 1.1.2
    • Shiboken
    • None
    • Scientific Linux 6.4, shiboken-1.1.2, g++ 4.4.7

    Description

      Recently upgraded from shiboken-1.0.0~beta2 to shiboken-1.1.2. The wrapper for one of my classes ended up dropping through ShibokenGenerator::writeCodeSnips() and into lines shibokengenerator.cpp:1603-1606. Not sure what causes this to happen, but that section of code adds a block like " ? %CPPSELF->::%TYPE::%FUNCTION_NAME(%2)" in the wrapper implementation. For this class, the %TYPE template variable was expanded without the full namespace (e.g. it only got "::DataManagerInterface" when it needed "::uss::DataMgnt::DataManagerInterface"). This resulted in a failed compile ("::DataManagerInterface" not defined"). Anyway, I did some debugging and tracked the replacement of %TYPE to Generator::replaceTemplateVariables() in generator.cpp. After examining some other code, I replaced line 287:

      code.replace("%TYPE", cpp_class->name());

      with:

      code.replace("%TYPE", cpp_class->qualifiedCppName());

      and that fixed the generated code.

      I don't know enough about how the code should work to say if this is the correct fix or not.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            clholtz Corbin Holtz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes