Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#5 Support for Qt Slots

closed
nobody
None
5
2012-05-01
2012-04-19
Thomas Marek
No

Hi, it seems that i can't use supportedAccessSpecifier with "public slots" to support Qt Slot.
Do i miss something?

Thanks,
Thomas

Discussion

  • Can you post a code snippet?

     
  • Thomas Marek
    Thomas Marek
    2012-04-19

    Sure.

    readSampleClass.py:
    ...
    CppHeaderParser.supportedAccessSpecifier.append("public slots")
    ...

    SampleClass.h:
    class SampleClass
    {
    public:
    int meth();

    public slots:
    void testSlot(int i);
    };

    readSampleClass.py output:
    CppHeaderParser view of class SampleClass
    {
    public
    // Methods
    {'inline': False, 'name': 'meth', 'parameters': [], 'friend': False, 'explicit': False, 'constructor': False, 'namespace': '', 'returns_fundamental': True, 'destructor': False, 'pure_virtual': False, 'returns': 'int', 'static': False, 'virtual': False, 'template': False, 'rtnType': 'int', 'extern': False, 'path': 'SampleClass', 'returns_pointer': 0, 'class': None, 'debug': 'int meth ( ) ;', 'returns_class': False}
    {'static': False, 'rtnType': 'slots : void', 'returns_unknown': True, 'parameters': [{'constant': 0, 'name': 'i', 'reference': 0, 'type': 'int', 'static': 0, 'pointer': 0}], 'namespace': '', 'virtual': False, 'destructor': False, 'returns': 'slots : void', 'template': False, 'friend': False, 'returns_class': False, 'extern': False, 'path': 'SampleClass', 'returns_pointer': 0, 'class': None, 'name': 'testSlot', 'pure_virtual': False, 'explicit': False, 'returns_fundamental': False, 'constructor': False, 'debug': 'slots : void testSlot ( int i ) ;', 'inline': False}
    protected
    private
    public slots
    }

    Note the "'returns': 'slots : void'"

     
  • Access Specifiers was intended for words without spaces. I will have to add support for this situation.

     
  • Fixed in commit 70:0a327034898b. Now multi word access specifiers are supported

     
    • status: open --> closed