Make ICallHandler have a protected ctor which takes a QObject* as a parameter. Then in the ctor of CallHandler, pass the parent. For example:
class ICallHandler
: public QObject{
public:
virtual ~ICallHandler(){};
public slots:
virtual void onIncomingCall() = 0;
protected:
};
class ICallHandler : public QObject
{
public:
virtual ~ICallHandler(){};
public slots:
virtual void onIncomingCall() = 0;
protected:
ICallHandler(QObject *parent = NULL) : QObject(parent) {}
};
To copy to clipboard, switch view to plain text mode
Then in the CallHandler ctor:
CallHandler
::CallHandler(QObject *parent
) :
ICallHandler(parent)
{
}
CallHandler::CallHandler(QObject *parent)
:
ICallHandler(parent)
{
}
To copy to clipboard, switch view to plain text mode
Bookmarks