Attachment: typesystem.xml
Description: XML document

#ifndef ANABSTRACTCLASS_H
#define ANABSTRACTCLASS_H

// class ANotBindedType
// {
//   private:

//   int i = 0;
// };

// class AnAbstractClass
// {
//   private:

//   virtual void apurevirtualmethod(ANotBindedType* type ) = 0;

//   int a = 0;
  
// };

class Base
{
  public:
    Base(){}
    virtual ~Base() = default;
};

class A : public Base
{
  public:
    A(){}
    ~A()override{}

    A( const A &rh ){};
    A &operator=( const A &rh ){return *this;};
    
    int getI(){return i;}
    
  private:

    int i = 0;
};

class B
{
  public:
    B(A& _a):a(_a){};

  private:

    A a;
};

class C
{
  public:

    virtual ~C(){};

    
    virtual void doStuff( B& mystuff ) = 0;
};

  

#endif

Hi everyone,

I get an issue when I try to wrap a method which take a reference
to a value-type class (see attached files for example).

I get the following error message

> error: no matching conversion for functional-style cast from '::A' to '::B'
>        ::B cppArg0_local = ::B(::A());

Which seems normal taking a look at wrapped code. This line

> ::B cppArg0_local = ::B(::A());

should be written this way to compile

> ::A a;
> ::B cppArg0_local = ::B(a);

I'm new to Shiboken, so maybe there is someting to be configured to
avoid this behavior. Or is this an issue?

Kind regards,
Julien


-- 

Julien Cabieces
Senior Developer at Oslandia
julien.cabie...@oslandia.com
09.72.52.52.76
_______________________________________________
PySide mailing list
PySide@qt-project.org
https://lists.qt-project.org/listinfo/pyside

Reply via email to