diff --git a/src/lib/plugins/plugins.cpp b/src/lib/plugins/plugins.cpp index 907360e19..405f7602e 100644 --- a/src/lib/plugins/plugins.cpp +++ b/src/lib/plugins/plugins.cpp @@ -474,7 +474,7 @@ void Plugins::initQmlPlugin(Plugin *plugin) plugin->qmlPluginLoader->createComponent(); if (!plugin->qmlPluginLoader->instance()) { - qWarning() << "Initializing" << name << "failed:" << plugin->qmlPluginLoader->component()->errorString(); + qWarning().noquote() << "Falied to create component for" << name << "plugin:" << plugin->qmlPluginLoader->component()->errorString(); return; } diff --git a/src/lib/plugins/qml/qmlpluginloader.cpp b/src/lib/plugins/qml/qmlpluginloader.cpp index 6a64b8460..dd22c8193 100644 --- a/src/lib/plugins/qml/qmlpluginloader.cpp +++ b/src/lib/plugins/qml/qmlpluginloader.cpp @@ -27,6 +27,11 @@ QmlPluginLoader::QmlPluginLoader(const QString &path) void QmlPluginLoader::createComponent() { m_interface = qobject_cast(m_component->create()); + + if (!m_interface) { + return; + } + m_interface->setEngine(m_engine); connect(m_interface, &QmlPluginInterface::qmlPluginUnloaded, this, [this]{ delete m_component;