1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Fix page sharing via Purpose

Purpose expects a list of URLs, not a single URL
This commit is contained in:
Nicolas Fella 2020-08-26 01:20:45 +02:00
parent 501678d0d8
commit 5ed4e01ce0

View File

@ -35,6 +35,7 @@
#include <QWebEngineProfile>
#include <QMenu>
#include <QJsonArray>
KDEFrameworksIntegrationPlugin::KDEFrameworksIntegrationPlugin()
: QObject()
@ -96,7 +97,7 @@ void KDEFrameworksIntegrationPlugin::populateWebViewMenu(QMenu *menu, WebView *v
Q_UNUSED(r)
m_sharePageMenu->model()->setInputData(QJsonObject{
{ QStringLiteral("urls"), QJsonValue(view->url().toString()) },
{ QStringLiteral("urls"), QJsonArray {QJsonValue(view->url().toString())} },
{ QStringLiteral("title"), QJsonValue(view->title()) }
});
m_sharePageMenu->reload();