diff options
| author | Friedrich W. H. Kossebau <[email protected]> | 2020-11-28 11:24:29 +0100 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2020-12-07 22:09:58 +0000 |
| commit | 9826d810340d1f6fe135a300a66d689f37add41e (patch) | |
| tree | a11207624f7c07b726155c1a73e7af092e16957d /src/dolphinpart.cpp | |
| parent | 07b7f76f7c66b3cdf8d5a04dcd3a629e5993b21c (diff) | |
dolphinpart: port to new KPluginMetaData-based KParts API
Diffstat (limited to 'src/dolphinpart.cpp')
| -rw-r--r-- | src/dolphinpart.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index 7aaefa6a0..18b3bbd0c 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -17,7 +17,7 @@ #include "views/dolphinview.h" #include "views/dolphinviewactionhandler.h" -#include <KAboutData> +#include <KPluginMetaData> #include <KActionCollection> #include <KAuthorized> #include <KConfigGroup> @@ -47,13 +47,15 @@ K_PLUGIN_CLASS_WITH_JSON(DolphinPart, "dolphinpart.json") -DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantList& args) +DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, + const KPluginMetaData& metaData, const QVariantList& args) : KParts::ReadOnlyPart(parent) ,m_openTerminalAction(nullptr) ,m_removeAction(nullptr) { Q_UNUSED(args) - setComponentData(*createAboutData(), false); + setMetaData(metaData); + m_extension = new DolphinPartBrowserExtension(this); // make sure that other apps using this part find Dolphin's view-file-columns icons @@ -141,7 +143,7 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL // TODO there was a "always open a new window" (when clicking on a directory) setting in konqueror // (sort of spacial navigation) - loadPlugins(this, this, componentData()); + loadPlugins(this, this, componentName()); } DolphinPart::~DolphinPart() @@ -281,11 +283,6 @@ void DolphinPart::updatePasteAction() Q_EMIT m_extension->setActionText( "paste", pasteInfo.second ); } -KAboutData* DolphinPart::createAboutData() -{ - return new KAboutData(QStringLiteral("dolphinpart"), i18nc("@title", "Dolphin Part"), QStringLiteral("0.1")); -} - bool DolphinPart::openUrl(const QUrl &url) { bool reload = arguments().reload(); |
