-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.0.0
-
None
qmlEngine and qmlContext funcitons always return null for a QML Module API class.
For a constructor null is probably ok, because the functions seem to work the same way for other ("ordinary") classes, too.
SomeModuleApiClass::SomeModuleApiClass(QObject *parent) : QObject(parent)
{
qDebug() << qmlEngine(this); // null, ok?
qDebug() << qmlContext(this); // null, ok?
}
But for any other function qmlEngine and qmlContext should return valid pointers:
SomeModuleApiClass::someFunction()
{
qDebug() << qmlEngine(this); // null, nok!
qDebug() << qmlContext(this); // null, nok!
}