From 232eaa54bd370de18f0ccc7fc72a1c2217e0b832 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Wed, 17 Apr 2019 16:28:45 +0200 Subject: [PATCH] KDEFrameworksIntegration: Create Purpose menu in init --- .../kdeframeworksintegrationplugin.cpp | 10 +++++----- .../kdeframeworksintegrationplugin.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/KDEFrameworksIntegration/kdeframeworksintegrationplugin.cpp b/src/plugins/KDEFrameworksIntegration/kdeframeworksintegrationplugin.cpp index 80845806e..d05b41cb5 100644 --- a/src/plugins/KDEFrameworksIntegration/kdeframeworksintegrationplugin.cpp +++ b/src/plugins/KDEFrameworksIntegration/kdeframeworksintegrationplugin.cpp @@ -39,12 +39,7 @@ KDEFrameworksIntegrationPlugin::KDEFrameworksIntegrationPlugin() : QObject() - , m_backend(0) - , m_sharePageMenu(new Purpose::Menu()) { - m_sharePageMenu->setTitle(tr("Share page")); - m_sharePageMenu->setIcon(QIcon::fromTheme(QStringLiteral("document-share"))); - m_sharePageMenu->model()->setPluginType(QStringLiteral("ShareUrl")); } DesktopFile KDEFrameworksIntegrationPlugin::metaData() const @@ -76,6 +71,11 @@ void KDEFrameworksIntegrationPlugin::init(InitState state, const QString &settin WebPage::addSupportedScheme(protocol); } + m_sharePageMenu = new Purpose::Menu(); + m_sharePageMenu->setTitle(tr("Share page")); + m_sharePageMenu->setIcon(QIcon::fromTheme(QStringLiteral("document-share"))); + m_sharePageMenu->model()->setPluginType(QStringLiteral("ShareUrl")); + KAboutData aboutData(QSL("falkon"), QSL("Falkon"), QCoreApplication::applicationVersion()); KAboutData::setApplicationData(aboutData); diff --git a/src/plugins/KDEFrameworksIntegration/kdeframeworksintegrationplugin.h b/src/plugins/KDEFrameworksIntegration/kdeframeworksintegrationplugin.h index b108f9e54..d09038b51 100644 --- a/src/plugins/KDEFrameworksIntegration/kdeframeworksintegrationplugin.h +++ b/src/plugins/KDEFrameworksIntegration/kdeframeworksintegrationplugin.h @@ -40,7 +40,7 @@ public: void populateWebViewMenu(QMenu *menu, WebView *view, const WebHitTestResult &r) override; private: - KWalletPasswordBackend* m_backend; + KWalletPasswordBackend *m_backend = nullptr; QVector m_kioSchemeHandlers; - Purpose::Menu *m_sharePageMenu; + Purpose::Menu *m_sharePageMenu = nullptr; };