diff --git a/src/lib/plugins/qml/qmlplugin.cpp b/src/lib/plugins/qml/qmlplugin.cpp index 6a4eba65d..2462812d5 100644 --- a/src/lib/plugins/qml/qmlplugin.cpp +++ b/src/lib/plugins/qml/qmlplugin.cpp @@ -53,8 +53,7 @@ Plugins::Plugin QmlPlugin::loadPlugin(const QString &name) plugin.pluginPath = fullPath; DesktopFile desktopFile(fullPath + QSL("/metadata.desktop")); plugin.pluginSpec = Plugins::createSpec(desktopFile); - QString entryPoint = desktopFile.value(QSL("X-Falkon-EntryPoint")).toString(); - plugin.data = QVariant::fromValue(new QmlPluginLoader(plugin.pluginSpec.name, fullPath, entryPoint)); + plugin.data = QVariant::fromValue(new QmlPluginLoader(plugin.pluginSpec.name, fullPath)); return plugin; } diff --git a/src/lib/plugins/qml/qmlpluginloader.cpp b/src/lib/plugins/qml/qmlpluginloader.cpp index 2f393ff51..e036cdf86 100644 --- a/src/lib/plugins/qml/qmlpluginloader.cpp +++ b/src/lib/plugins/qml/qmlpluginloader.cpp @@ -25,11 +25,10 @@ #include "qml/api/i18n/qmli18n.h" #endif -QmlPluginLoader::QmlPluginLoader(const QString &name, const QString &path, const QString &entryPoint) +QmlPluginLoader::QmlPluginLoader(const QString &name, const QString &path) { m_name = name; m_path = path; - m_entryPoint = entryPoint; initEngineAndComponent(); } @@ -63,7 +62,7 @@ QmlPluginInterface *QmlPluginLoader::instance() const void QmlPluginLoader::initEngineAndComponent() { m_engine = new QmlEngine(); - m_component = new QQmlComponent(m_engine, QDir(m_path).filePath(m_entryPoint)); + m_component = new QQmlComponent(m_engine, QDir(m_path).filePath(QStringLiteral("main.qml"))); m_engine->setExtensionPath(m_path); m_engine->setExtensionName(m_name); #if HAVE_LIBINTL diff --git a/src/lib/plugins/qml/qmlpluginloader.h b/src/lib/plugins/qml/qmlpluginloader.h index 33fe713c4..881ab1e02 100644 --- a/src/lib/plugins/qml/qmlpluginloader.h +++ b/src/lib/plugins/qml/qmlpluginloader.h @@ -29,14 +29,13 @@ class QmlPluginLoader : public QObject { Q_OBJECT public: - explicit QmlPluginLoader(const QString &name, const QString &path, const QString &entryPoint); + explicit QmlPluginLoader(const QString &name, const QString &path); void createComponent(); QQmlComponent *component() const; QmlPluginInterface *instance() const; private: QString m_path; QString m_name; - QString m_entryPoint; QmlEngine *m_engine = nullptr; QQmlComponent *m_component = nullptr; QmlPluginInterface *m_interface = nullptr; diff --git a/src/scripts/helloqml/helloqml.qml b/src/scripts/helloqml/main.qml similarity index 100% rename from src/scripts/helloqml/helloqml.qml rename to src/scripts/helloqml/main.qml diff --git a/src/scripts/helloqml/metadata.desktop b/src/scripts/helloqml/metadata.desktop index 3a6405d3f..c18ea3d4c 100644 --- a/src/scripts/helloqml/metadata.desktop +++ b/src/scripts/helloqml/metadata.desktop @@ -49,4 +49,3 @@ X-Falkon-Author=Anmol Gautam X-Falkon-Email=tarptaeya@gmail.com X-Falkon-Version=0.1.0 X-Falkon-Settings=true -X-Falkon-EntryPoint=helloqml.qml