1

Do someone know a workaround for use a enum as a function parameter in a c++ function and call them function with squish? The Enum was declared in a other class and namespace as the function itself. Following code is in use and works in qt:

Enum-class:

namespace prem {
     namespace space {

         class Controller : public QObject {
             Q_OBJECT
             Q_ENUMS(ID)

         public:

            enum ID { ONE, TWO, THREE };
          //.... other Stuff

         };
     } 
}

Using class:

namespace prem {
    namespace area {

        class Handler: public QObject {

        //...... some stuff

        public slot:

             void slotHandelID(prem::space::Controller::ID id) {
             // do some stuff 
             } 

        };
    }
}

Now I want to call in the python test script the slotHandelID Function.

controller = findObject("m_controller")
handler = findObject("m_handler")
handler.slotHandelID(controller.ONE)

But I get this

SyntaxError: No matching 'slotHandelID(int)' overload found: Following overloads are available:
    prem::area::Handler::slotHandelID(undefined)

When I define the slotHandelID(prem::space::Controller::ID id) in the Controller class the code works fine.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Andreas
  • 636
  • 1
  • 12
  • 29

1 Answers1

2

The bug is fixed during the new squish version 6.0.

Andreas
  • 636
  • 1
  • 12
  • 29