Commit db3a8029 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Create applet plugins without json metadata, name library like plugin id

This way we do not embed the json metadata in the plugins
and can avoid the parsing of it at runtime.

Counterpart of frameworks/plasma-framework!458

Task: https://phabricator.kde.org/T14757
parent 3bd7e1d0
Pipeline #154148 passed with stage
in 5 minutes and 40 seconds
kcoreaddons_add_plugin(plasma_applet_appmenu SOURCES appmenuapplet.cpp INSTALL_NAMESPACE "plasma/applets")
kcoreaddons_add_plugin(org.kde.plasma.appmenu SOURCES appmenuapplet.cpp INSTALL_NAMESPACE "plasma/applets")
target_link_libraries(plasma_applet_appmenu
target_link_libraries(org.kde.plasma.appmenu
Qt::Widgets
Qt::Quick
Qt::DBus
......
......@@ -287,7 +287,7 @@ bool AppMenuApplet::eventFilter(QObject *watched, QEvent *event)
return false;
}
K_PLUGIN_CLASS_WITH_JSON(AppMenuApplet, "../package/metadata.json")
K_PLUGIN_CLASS(AppMenuApplet)
#include "appmenuapplet.moc"
#include "moc_appmenuapplet.cpp"
kcoreaddons_add_plugin(plasma_applet_calendar SOURCES calendarapplet.cpp calendarapplet.h INSTALL_NAMESPACE "plasma/applets")
kcoreaddons_add_plugin(org.kde.plasma.calendar SOURCES calendarapplet.cpp calendarapplet.h INSTALL_NAMESPACE "plasma/applets")
target_link_libraries(plasma_applet_calendar
target_link_libraries(org.kde.plasma.calendar
KF5::Plasma)
plasma_install_package(package org.kde.plasma.calendar)
......@@ -22,6 +22,6 @@ int CalendarApplet::weekNumber(const QDateTime &dateTime) const
return dateTime.date().weekNumber();
}
K_PLUGIN_CLASS_WITH_JSON(CalendarApplet, "package/metadata.json")
K_PLUGIN_CLASS(CalendarApplet)
#include "calendarapplet.moc"
add_definitions(-DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.plasma.icon\")
kcoreaddons_add_plugin(plasma_applet_icon SOURCES iconapplet.cpp iconapplet.h INSTALL_NAMESPACE "plasma/applets")
kcoreaddons_add_plugin(org.kde.plasma.icon SOURCES iconapplet.cpp iconapplet.h INSTALL_NAMESPACE "plasma/applets")
target_link_libraries(plasma_applet_icon
target_link_libraries(org.kde.plasma.icon
KF5::I18n
KF5::KIOCore # for OpenFileManagerWindowJob
KF5::KIOGui # for FavIconRequestJob
......
......@@ -575,6 +575,6 @@ void IconApplet::setLocalPath(const QString &localPath)
config().writeEntry(QStringLiteral("localPath"), localPath);
}
K_PLUGIN_CLASS_WITH_JSON(IconApplet, "package/metadata.json")
K_PLUGIN_CLASS(IconApplet)
#include "iconapplet.moc"
......@@ -19,9 +19,9 @@ set(notificationapplet_SRCS
thumbnailer.h
)
kcoreaddons_add_plugin(plasma_applet_notifications SOURCES ${notificationapplet_SRCS} INSTALL_NAMESPACE "plasma/applets")
kcoreaddons_add_plugin(org.kde.plasma.notifications SOURCES ${notificationapplet_SRCS} INSTALL_NAMESPACE "plasma/applets")
target_link_libraries(plasma_applet_notifications
target_link_libraries(org.kde.plasma.notifications
Qt::Gui
Qt::Quick # for QQmlParserStatus
KF5::ConfigWidgets # for KStandardAction
......@@ -35,7 +35,7 @@ target_link_libraries(plasma_applet_notifications
PW::LibNotificationManager
)
ecm_qt_declare_logging_category(plasma_applet_notifications
ecm_qt_declare_logging_category(org.kde.plasma.notifications
HEADER notifications_debug.h
IDENTIFIER PLASMA_APPLET_NOTIFICATIONS_DEBUG
CATEGORY_NAME org.kde.plasma.notifications)
......
......@@ -103,6 +103,6 @@ void NotificationApplet::forceActivateWindow(QWindow *window)
}
}
K_PLUGIN_CLASS_WITH_JSON(NotificationApplet, "package/metadata.json")
K_PLUGIN_CLASS(NotificationApplet)
#include "notificationapplet.moc"
......@@ -126,6 +126,6 @@ PlasmaQuick::AppletQuickItem *PanelSpacer::containmentGraphicObject() const
return containment()->property("_plasma_graphicObject").value<PlasmaQuick::AppletQuickItem *>();
}
K_PLUGIN_CLASS_WITH_JSON(PanelSpacer, "../package/metadata.json")
K_PLUGIN_CLASS(PanelSpacer)
#include "panelspacer.moc"
kcoreaddons_add_plugin(plasma_applet_systemmonitor SOURCES systemmonitor.cpp systemmonitor.h INSTALL_NAMESPACE "plasma/applets")
kcoreaddons_add_plugin(org.kde.plasma.systemmonitor SOURCES systemmonitor.cpp systemmonitor.h INSTALL_NAMESPACE "plasma/applets")
target_link_libraries(plasma_applet_systemmonitor
target_link_libraries(org.kde.plasma.systemmonitor
Qt::Gui
Qt::Qml
Qt::Quick
......
......@@ -87,6 +87,6 @@ void SystemMonitor::openSystemMonitor()
job->start();
}
K_PLUGIN_CLASS_WITH_JSON(SystemMonitor, "package/metadata.json")
K_PLUGIN_CLASS(SystemMonitor)
#include "systemmonitor.moc"
......@@ -140,6 +140,6 @@ QQuickItem *SystemTrayContainer::internalSystray()
return m_internalSystray;
}
K_PLUGIN_CLASS_WITH_JSON(SystemTrayContainer, "package/metadata.json")
K_PLUGIN_CLASS(SystemTrayContainer)
#include "systemtraycontainer.moc"
......@@ -377,6 +377,6 @@ void SystemTray::stackItemAfter(QQuickItem *newItem, QQuickItem *afterItem)
newItem->stackAfter(afterItem);
}
K_PLUGIN_CLASS_WITH_JSON(SystemTray, "package/metadata.json")
K_PLUGIN_CLASS(SystemTray)
#include "systemtray.moc"
Supports Markdown
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