Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
1.1.2
-
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.