Commit 97334d5d authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Port to new KPluginMetaData-based KParts API

parent 003b4a45
......@@ -8,7 +8,7 @@ set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE
project(ark VERSION ${RELEASE_SERVICE_VERSION})
set(QT_MIN_VERSION 5.12.0)
set(KF5_MIN_VERSION 5.71.0)
set(KF5_MIN_VERSION 5.77.0)
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
......
......@@ -152,3 +152,8 @@ X-KDE-ServiceTypes=KParts/ReadOnlyPart,Browser/View
X-KDE-Library=arkpart
Type=Service
MimeType=@SUPPORTED_ARK_MIMETYPES@
X-KDE-PluginInfo-Name=ark
X-KDE-PluginInfo-Version=@ARK_VERSION@
X-KDE-PluginInfo-License=GPL v2+
X-KDE-PluginInfo-Website=https://utils.kde.org/projects/ark
......@@ -26,7 +26,7 @@ QObject *Factory::create(const char *iface, QWidget *parentWidget, QObject *pare
{
Q_UNUSED(keyword)
auto part = new Ark::Part(parentWidget, parent, args);
auto part = new Ark::Part(parentWidget, parent, metaData(), args);
part->setReadWrite(QByteArray(iface) == QByteArray(KParts::ReadWritePart::staticMetaObject.className()));
return part;
......
......@@ -44,7 +44,7 @@
#include "pluginsettingspage.h"
#include "pluginmanager.h"
#include <KAboutData>
#include <KPluginMetaData>
#include <KActionCollection>
#include <KConfigGroup>
#include <KGuiItem>
......@@ -88,17 +88,14 @@ namespace Ark
static quint32 s_instanceCounter = 1;
Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList& args)
Part::Part(QWidget *parentWidget, QObject *parent, const KPluginMetaData &metaData, const QVariantList& args)
: KParts::ReadWritePart(parent),
m_splitter(nullptr),
m_busy(false),
m_jobTracker(nullptr)
{
Q_UNUSED(args)
KAboutData aboutData(QStringLiteral("ark"),
i18n("ArkPart"),
QStringLiteral("3.0"));
setComponentData(aboutData, false);
setMetaData(metaData);
new DndExtractAdaptor(this);
......
......@@ -67,7 +67,7 @@ public:
OpenFileWith
};
Part(QWidget *parentWidget, QObject *parent, const QVariantList &);
Part(QWidget *parentWidget, QObject *parent, const KPluginMetaData &metaData, const QVariantList &);
~Part() override;
bool openFile() override;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment