CTK icon indicating copy to clipboard operation
CTK copied to clipboard

BUG: Fix python wrapping for classes with only default constructor

Open hina-shah opened this issue 7 years ago • 5 comments

This PR includes the following:

  • Fixes regular expression in ctkWrapPythonQt.py which parses the class constructors to populate the classes to be passed to PythonQT for wrapping. It was skipping the classes which only had default constructors (i.e. no constructors of the type className(QObject* ...). Also, the closing parenthesis was not identified. @jcfr: you might want to check the RE! I have compared the build outputs (by switching on verbose in the ctkMacroWrapPythonQt.cmake), and the following classes are added to Python wrapping now: ctkErrorLogLevel, ctkErrorLogQtMessageHandler, ctkErrorLogTerminalOutput, and ctkEventTranslatorPlayerWidget. ctkErrorLogAbstractMessageHandler is skipped because it has a pure virtual method, and not because the constructor type is wrong. The other classes are unaffected.

  • Adds a default constructor to ctkCheckableHeaderView class so that it will be included for Python wrapping. This is actually a hack. Some methods of the class are enabled for Python wrapping as well.

hina-shah avatar Apr 11 '18 20:04 hina-shah

👍 This looks good to me, but let's hold off until @jcfr is back to look at it.

pieper avatar Apr 11 '18 22:04 pieper

@jcfr : When you get time, could you please look at this PR? Thanks! CircleCi failed on uploading the report at the end, but other than that all the tests were passed.

hina-shah avatar Apr 23 '18 14:04 hina-shah

Thanks Hina. Travelling , I will have a look when I am back in office around May 7.

Thanks Jc

On Mon, Apr 23, 2018, 7:34 AM hina-shah [email protected] wrote:

@jcfr https://github.com/jcfr : When you get time, could you please look at this PR? Thanks! CircleCi failed on uploading the report at the end, but other than that all the tests were passed.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/commontk/CTK/pull/796#issuecomment-383597442, or mute the thread https://github.com/notifications/unsubscribe-auth/AANXo61JY8SsWg_OP9ErpWpQshhgBlxhks5treZ5gaJpZM4TQvUN .

jcfr avatar Apr 23 '18 15:04 jcfr

Hi @jcfr, could you take a look at this again? Thanks!

jamesobutler avatar Jul 05 '18 03:07 jamesobutler

@jcfr Please have a look at it whenever you have time. Thanks!

lassoan avatar Sep 23 '18 22:09 lassoan

Superseded by https://github.com/commontk/CTK/pull/985 and https://github.com/commontk/CTK/pull/1078

lassoan avatar Apr 05 '23 20:04 lassoan