1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

QmlPluginLoader: Fallback to main.qml as entrypoint if not set

This commit is contained in:
David Rosca 2019-04-20 10:54:01 +02:00
parent 10eb20c162
commit 231101151e
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ void QmlPlugin::initPlugin(Plugins::Plugin *plugin)
} }
qmlPluginLoader->createComponent(); qmlPluginLoader->createComponent();
if (!qmlPluginLoader->instance()) { if (!qmlPluginLoader->instance()) {
qWarning().noquote() << "Falied to create component for" << name << "plugin:" << qmlPluginLoader->component()->errorString(); qWarning().noquote() << "Failed to create component for" << name << "plugin:" << qmlPluginLoader->component()->errorString();
return; return;
} }

View File

@ -29,7 +29,7 @@ QmlPluginLoader::QmlPluginLoader(const QString &name, const QString &path, const
{ {
m_name = name; m_name = name;
m_path = path; m_path = path;
m_entryPoint = entryPoint; m_entryPoint = entryPoint.isEmpty() ? QSL("main.qml") : entryPoint;
initEngineAndComponent(); initEngineAndComponent();
} }