diff --git a/custom-example/src/CustomPlugin.cc b/custom-example/src/CustomPlugin.cc index f715a4e..a0ba656 100644 --- a/custom-example/src/CustomPlugin.cc +++ b/custom-example/src/CustomPlugin.cc @@ -47,7 +47,7 @@ customQuickInterfaceSingletonFactory(QQmlEngine*, QJSEngine*) { qCDebug(CustomLog) << "Creating CustomQuickInterface instance"; CustomQuickInterface* pIFace = new CustomQuickInterface(); - CustomPlugin* pPlug = dynamic_cast(qgcApp()->toolbox()->corePlugin()); + auto* pPlug = qobject_cast(qgcApp()->toolbox()->corePlugin()); if(pPlug) { pIFace->init(); } else {