Commit c7cee373 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Port away from KServiceTrader

Uses KPluginLoader+KPluginMetadata instead.
Describes plugins in json instead of desktop files. These desktop files are
then embedded into the .so file. All the plugins will be in a kdeconnect/
directory, and those will be the ones to look for.

Note it doesn't drop the KService dependency as KIOCore is a KDE Connect
dependency as well.

REVIEW: 123042
parent d17c4419
......@@ -26,6 +26,8 @@ include(ECMSetupVersion)
include(ECMInstallIcons)
include(FeatureSummary)
include(KDEConnectMacros.cmake)
include(GenerateExportHeader)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
......
# Copyright 2015 Aleix Pol Gonzalez <aleixpol@kde.org>
# Redistribution and use is allowed according to the terms of the BSD license.
# Thoroughly inspired in kdevplatform_add_plugin
function(kdeconnect_add_plugin plugin)
set(options )
set(oneValueArgs JSON)
set(multiValueArgs SOURCES)
cmake_parse_arguments(KC_ADD_PLUGIN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
get_filename_component(json "${KC_ADD_PLUGIN_JSON}" REALPATH)
# ensure we recompile the corresponding object files when the json file changes
set(dependent_sources )
foreach(source ${KC_ADD_PLUGIN_SOURCES})
get_filename_component(source "${source}" REALPATH)
if(EXISTS "${source}")
file(STRINGS "${source}" match REGEX "K_PLUGIN_FACTORY_WITH_JSON")
if(match)
list(APPEND dependent_sources "${source}")
endif()
endif()
endforeach()
if(NOT dependent_sources)
# fallback to all sources - better safe than sorry...
set(dependent_sources ${KC_ADD_PLUGIN_SOURCES})
endif()
set_property(SOURCE ${dependent_sources} APPEND PROPERTY OBJECT_DEPENDS ${json})
add_library(${plugin} MODULE ${KC_ADD_PLUGIN_SOURCES})
set_property(TARGET ${plugin} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS ${json})
install(TARGETS ${plugin} DESTINATION ${PLUGIN_INSTALL_DIR}/kdeconnect)
endfunction()
......@@ -25,7 +25,6 @@
#include <QSet>
#include <QMap>
#include <KPluginFactory>
#include "kdeconnectcore_export.h"
class DaemonPrivate;
......
......@@ -34,6 +34,7 @@
#include <KLocalizedString>
#include <QIcon>
#include <QDir>
#include <QJsonArray>
#include "core_debug.h"
#include "kdeconnectplugin.h"
......@@ -114,7 +115,7 @@ void Device::reloadPlugins()
QString enabledKey = pluginName + QString::fromLatin1("Enabled");
bool isPluginEnabled = (pluginStates.hasKey(enabledKey) ? pluginStates.readEntry(enabledKey, false)
: loader->getPluginInfo(pluginName).isPluginEnabledByDefault());
: loader->getPluginInfo(pluginName).isEnabledByDefault());
if (isPluginEnabled) {
KdeConnectPlugin* plugin = m_plugins.take(pluginName);
......@@ -123,9 +124,9 @@ void Device::reloadPlugins()
incomingInterfaces = m_pluginsByIncomingInterface.keys(plugin);
outgoingInterfaces = m_pluginsByOutgoingInterface.keys(plugin);
} else {
KService::Ptr service = loader->pluginService(pluginName);
incomingInterfaces = service->property("X-KdeConnect-SupportedPackageType", QVariant::StringList).toStringList();
outgoingInterfaces = service->property("X-KdeConnect-OutgoingPackageType", QVariant::StringList).toStringList();
const KPluginMetaData service = loader->getPluginInfo(pluginName);
incomingInterfaces = KPluginMetaData::readStringList(service.rawData(), "X-KdeConnect-SupportedPackageType");
outgoingInterfaces = KPluginMetaData::readStringList(service.rawData(), "X-KdeConnect-OutgoingPackageType");
}
//If we don't find intersection with the received on one end and the sent on the other, we don't
......
......@@ -20,7 +20,8 @@
#include "pluginloader.h"
#include <KServiceTypeTrader>
#include <KPluginMetaData>
#include <QJsonArray>
#include "core_debug.h"
#include "device.h"
......@@ -34,10 +35,9 @@ PluginLoader* PluginLoader::instance()
PluginLoader::PluginLoader()
{
KService::List offers = KServiceTypeTrader::self()->query("KdeConnect/Plugin");
for(KService::List::const_iterator iter = offers.constBegin(); iter != offers.constEnd(); ++iter) {
KService::Ptr service = *iter;
plugins[service->library()] = service;
QVector<KPluginMetaData> data = KPluginLoader::findPlugins("kdeconnect/");
foreach (const KPluginMetaData& metadata, data) {
plugins[metadata.pluginId()] = metadata;
}
}
......@@ -46,34 +46,29 @@ QStringList PluginLoader::getPluginList() const
return plugins.keys();
}
KPluginInfo PluginLoader::getPluginInfo(const QString& name) const
KPluginMetaData PluginLoader::getPluginInfo(const QString& name) const
{
KService::Ptr service = plugins[name];
if (!service) {
qCDebug(KDECONNECT_CORE) << "Plugin unknown" << name;
return KPluginInfo();
}
return KPluginInfo(service);
return plugins.value(name);
}
KdeConnectPlugin* PluginLoader::instantiatePluginForDevice(const QString& pluginName, Device* device) const
{
KdeConnectPlugin* ret = 0;
KdeConnectPlugin* ret = Q_NULLPTR;
KService::Ptr service = plugins[pluginName];
if (!service) {
KPluginMetaData service = plugins.value(pluginName);
if (!service.isValid()) {
qCDebug(KDECONNECT_CORE) << "Plugin unknown" << pluginName;
return ret;
}
KPluginFactory *factory = KPluginLoader(service->library()).factory();
KPluginLoader loader(service.fileName());
KPluginFactory *factory = loader.factory();
if (!factory) {
qCDebug(KDECONNECT_CORE) << "KPluginFactory could not load the plugin:" << service->library();
qCDebug(KDECONNECT_CORE) << "KPluginFactory could not load the plugin:" << service.pluginId() << loader.errorString();
return ret;
}
QStringList outgoingInterfaces = service->property("X-KdeConnect-OutgoingPackageType", QVariant::StringList).toStringList();
const QStringList outgoingInterfaces = KPluginMetaData::readStringList(service.rawData(), "X-KdeConnect-OutgoingPackageType");
QVariant deviceVariant = QVariant::fromValue<Device*>(device);
......@@ -83,20 +78,15 @@ KdeConnectPlugin* PluginLoader::instantiatePluginForDevice(const QString& plugin
return ret;
}
qCDebug(KDECONNECT_CORE) << "Loaded plugin:" << service->name();
qCDebug(KDECONNECT_CORE) << "Loaded plugin:" << service.pluginId();
return ret;
}
KService::Ptr PluginLoader::pluginService(const QString& pluginName) const
{
return plugins[pluginName];
}
QStringList PluginLoader::incomingInterfaces() const
{
QSet<QString> ret;
foreach(const KService::Ptr& service, plugins) {
ret += service->property("X-KdeConnect-SupportedPackageType", QVariant::StringList).toStringList().toSet();
foreach(const KPluginMetaData& service, plugins) {
ret += KPluginMetaData::readStringList(service.rawData(), "X-KdeConnect-SupportedPackageType").toSet();
}
return ret.toList();
}
......@@ -104,8 +94,8 @@ QStringList PluginLoader::incomingInterfaces() const
QStringList PluginLoader::outgoingInterfaces() const
{
QSet<QString> ret;
foreach(const KService::Ptr& service, plugins) {
ret += service->property("X-KdeConnect-OutgoingPackageType", QVariant::StringList).toStringList().toSet();
foreach(const KPluginMetaData& service, plugins) {
ret += KPluginMetaData::readStringList(service.rawData(), "X-KdeConnect-OutgoingPackageType").toSet();
}
return ret.toList();
}
......@@ -22,11 +22,10 @@
#define PLUGINLOADER_H
#include <QObject>
#include <QMap>
#include <QHash>
#include <QString>
#include <KPluginFactory>
#include <KService>
#include <KPluginMetaData>
#include <KPluginInfo>
class Device;
......@@ -41,13 +40,12 @@ public:
QStringList incomingInterfaces() const;
QStringList outgoingInterfaces() const;
QStringList getPluginList() const;
KPluginInfo getPluginInfo(const QString& name) const;
KService::Ptr pluginService(const QString& pluginName) const;
KPluginMetaData getPluginInfo(const QString& name) const;
KdeConnectPlugin* instantiatePluginForDevice(const QString& name, Device* device) const;
private:
PluginLoader();
QMap<QString,KService::Ptr> plugins;
QHash<QString, KPluginMetaData> plugins;
};
......
......@@ -81,7 +81,6 @@ ecm_setup_version( "${KDECONNECT_VERSION_MAJOR}.${KDECONNECT_VERSION_MINOR}.${KD
SOVERSION ${KDECONNECT_VERSION_MAJOR})
install(TARGETS kdeconnectinterfaces EXPORT kdeconnectLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
message ("INSTALL_TARGETS_DEFAULT_ARGS" ${INSTALL_TARGETS_DEFAULT_ARGS})
## Don't install header files until API/ABI policy is defined
#
......
......@@ -31,6 +31,7 @@
#include <KServiceTypeTrader>
#include <KPluginInfo>
#include <KPluginMetaData>
#include <KPluginFactory>
#include <KAboutData>
#include <KLocalizedString>
......@@ -194,10 +195,9 @@ void KdeConnectKcm::deviceSelected(const QModelIndex& current)
connect(currentDevice,SIGNAL(unpaired()),
this, SLOT(unpaired()));
KService::List offers = KServiceTypeTrader::self()->query("KdeConnect/Plugin");
QList<KPluginInfo> scriptinfos = KPluginInfo::fromServices(offers);
const QList<KPluginInfo> pluginInfo = KPluginInfo::fromMetaData(KPluginLoader::findPlugins("kdeconnect/"));
KSharedConfigPtr deviceConfig = KSharedConfig::openConfig(currentDevice->pluginsConfigFile());
kcmUi->pluginSelector->addPlugins(scriptinfos, KPluginSelector::ReadConfigFile, i18n("Plugins"), QString(), deviceConfig);
kcmUi->pluginSelector->addPlugins(pluginInfo, KPluginSelector::ReadConfigFile, i18n("Plugins"), QString(), deviceConfig);
connect(kcmUi->pluginSelector, SIGNAL(changed(bool)),
this, SLOT(pluginsConfigChanged()));
......
......@@ -3,7 +3,7 @@ set(kdeconnect_battery_SRCS
batterydbusinterface.cpp
)
add_library(kdeconnect_battery MODULE ${kdeconnect_battery_SRCS})
kdeconnect_add_plugin(kdeconnect_battery JSON kdeconnect_battery.json SOURCES ${kdeconnect_battery_SRCS})
target_link_libraries(kdeconnect_battery
kdeconnectcore
......@@ -13,9 +13,6 @@ target_link_libraries(kdeconnect_battery
KF5::Notifications
)
install(TARGETS kdeconnect_battery DESTINATION ${PLUGIN_INSTALL_DIR} )
install(FILES kdeconnect_battery.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
include(DbusInterfaceMacros)
generate_and_install_dbus_interface(
......
......@@ -27,7 +27,7 @@
#include "batterydbusinterface.h"
K_PLUGIN_FACTORY( KdeConnectPluginFactory, registerPlugin< BatteryPlugin >(); )
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_battery.json", registerPlugin< BatteryPlugin >(); )
Q_LOGGING_CATEGORY(KDECONNECT_PLUGING_BATTERY, "kdeconnect.plugin.battery")
......
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=KdeConnect/Plugin
X-KDE-Library=kdeconnect_battery
X-KDE-PluginInfo-Author=Albert Vaca
X-KDE-PluginInfo-Email=albertvaka@gmail.com
X-KDE-PluginInfo-Name=kdeconnect_battery
X-KDE-PluginInfo-Version=0.1
X-KDE-PluginInfo-Website=http://albertvaka.wordpress.com
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
Icon=battery-100
Name=Battery monitor
Name[bg]=Наблюдение на батерията
Name[bs]=Kontrolor baterije
Name[ca]=Monitor de la bateria
Name[cs]=Monitor baterie
Name[da]=Batteriovervågning
Name[de]=Akkuüberwachung
Name[es]=Monitor de la batería
Name[fi]=Akkuvalvonta
Name[fr]=Moniteur de batterie
Name[hu]=Akkumulátorfigyelő
Name[it]=Monitor batteria
Name[ko]=배터리 모니터
Name[nl]=Batterijmonitor
Name[pl]=Monitor baterii
Name[pt]=Monitor da bateria
Name[pt_BR]=Monitor de bateria
Name[ro]=Monitorul acumulatorului
Name[ru]=Индикатор батареи
Name[sk]=Monitor batérie
Name[sv]=Batteriövervakare
Name[tr]=Pil izleyici
Name[uk]=Монітор акумулятора
Name[x-test]=xxBattery monitorxx
Comment=Show your phone battery next to your computer battery
Comment[bg]=Показване на батерията на телефона редом с тази на компютъра
Comment[bs]=Prikažite Vašu bateriju sa mobilnog telefona poted Vaše računarske baterije
Comment[ca]=Mostra la bateria del telèfon al costat de la bateria de l'ordinador
Comment[cs]=Zobrazit baterku vašeho telefonu vedle baterie vašeho notebooku
Comment[da]=Vis dit telefonbatteri ved siden af din computers batteri
Comment[de]=Zeigt den Akku Ihres Telefons neben dem Akku des Rechners
Comment[es]=Muestra la batería de su teléfono junto a la batería de su equipo
Comment[fi]=Näytä puhelimesi akku tietokoneen akun rinnalla
Comment[fr]=Affichez la batterie de votre téléphone près de la batterie de votre ordinateur
Comment[hu]=A telefon akkumulátorának megjelenítése a számítógép akkumulátora mellett
Comment[it]=Mostra il livello batteria del tuo telefono accanto a quella del computer
Comment[ko]=폰 배터리와 컴퓨터 배터리 동시 확인
Comment[nl]=Uw telefoonbatterij naast uw computerbatterij tonen
Comment[pl]=Pokaż baterię swojego telefonu obok baterii komputera
Comment[pt]=Mostra a bateria do seu telemóvel ao lado da do computador
Comment[pt_BR]=Mostra a bateria do seu celular ao lado da bateria do computador
Comment[ru]=Показывать значок батареи устройства рядом со значком батареи компьютера
Comment[sk]=Zobraziť batériu vášho telefónu pri batérii počítača
Comment[sv]=Visa telefonens batteri intill datorbatteriet
Comment[tr]=Bilgisayar pilinizin yanında telefon pil durumunu göster
Comment[uk]=Показ даних щодо рівня заряду акумулятора на телефоні поряд з даними щодо рівня заряду акумулятора комп’ютера
Comment[x-test]=xxShow your phone battery next to your computer batteryxx
X-KdeConnect-SupportedPackageType=kdeconnect.battery
X-KdeConnect-OutgoingPackageType=kdeconnect.battery
{
"Encoding": "UTF-8",
"KPlugin": {
"Authors": [
{
"Email": "albertvaka@gmail.com",
"Name": "Albert Vaca"
}
],
"Description": "Show your phone battery next to your computer battery",
"Description[bg]": "Показване на батерията на телефона редом с тази на компютъра",
"Description[bs]": "Prikažite Vašu bateriju sa mobilnog telefona poted Vaše računarske baterije",
"Description[ca]": "Mostra la bateria del telèfon al costat de la bateria de l'ordinador",
"Description[cs]": "Zobrazit baterku vašeho telefonu vedle baterie vašeho notebooku",
"Description[da]": "Vis dit telefonbatteri ved siden af din computers batteri",
"Description[de]": "Zeigt den Akku Ihres Telefons neben dem Akku des Rechners",
"Description[es]": "Muestra la batería de su teléfono junto a la batería de su equipo",
"Description[fi]": "Näytä puhelimesi akku tietokoneen akun rinnalla",
"Description[fr]": "Affichez la batterie de votre téléphone près de la batterie de votre ordinateur",
"Description[hu]": "A telefon akkumulátorának megjelenítése a számítógép akkumulátora mellett",
"Description[it]": "Mostra il livello batteria del tuo telefono accanto a quella del computer",
"Description[ko]": "폰 배터리와 컴퓨터 배터리 동시 확인",
"Description[nl]": "Uw telefoonbatterij naast uw computerbatterij tonen",
"Description[pl]": "Pokaż baterię swojego telefonu obok baterii komputera",
"Description[pt]": "Mostra a bateria do seu telemóvel ao lado da do computador",
"Description[pt_BR]": "Mostra a bateria do seu celular ao lado da bateria do computador",
"Description[ru]": "Показывать значок батареи устройства рядом со значком батареи компьютера",
"Description[sk]": "Zobraziť batériu vášho telefónu pri batérii počítača",
"Description[sv]": "Visa telefonens batteri intill datorbatteriet",
"Description[tr]": "Bilgisayar pilinizin yanında telefon pil durumunu göster",
"Description[uk]": "Показ даних щодо рівня заряду акумулятора на телефоні поряд з даними щодо рівня заряду акумулятора комп’ютера",
"Description[x-test]": "xxShow your phone battery next to your computer batteryxx",
"EnabledByDefault": true,
"Icon": "battery-100",
"Id": "kdeconnect_battery",
"License": "GPL",
"Name": "Battery monitor",
"Name[bg]": "Наблюдение на батерията",
"Name[bs]": "Kontrolor baterije",
"Name[ca]": "Monitor de la bateria",
"Name[cs]": "Monitor baterie",
"Name[da]": "Batteriovervågning",
"Name[de]": "Akkuüberwachung",
"Name[es]": "Monitor de la batería",
"Name[fi]": "Akkuvalvonta",
"Name[fr]": "Moniteur de batterie",
"Name[hu]": "Akkumulátorfigyelő",
"Name[it]": "Monitor batteria",
"Name[ko]": "배터리 모니터",
"Name[nl]": "Batterijmonitor",
"Name[pl]": "Monitor baterii",
"Name[pt]": "Monitor da bateria",
"Name[pt_BR]": "Monitor de bateria",
"Name[ro]": "Monitorul acumulatorului",
"Name[ru]": "Индикатор батареи",
"Name[sk]": "Monitor batérie",
"Name[sv]": "Batteriövervakare",
"Name[tr]": "Pil izleyici",
"Name[uk]": "Монітор акумулятора",
"Name[x-test]": "xxBattery monitorxx",
"ServiceTypes": [
"KdeConnect/Plugin"
],
"Version": "0.1",
"Website": "http://albertvaka.wordpress.com"
},
"X-KdeConnect-OutgoingPackageType": [ "kdeconnect.battery" ],
"X-KdeConnect-SupportedPackageType": [ "kdeconnect.battery" ]
}
......@@ -2,9 +2,6 @@ set(kdeconnect_clipboard_SRCS
clipboardplugin.cpp
)
add_library(kdeconnect_clipboard MODULE ${kdeconnect_clipboard_SRCS})
kdeconnect_add_plugin(kdeconnect_clipboard JSON kdeconnect_clipboard.json SOURCES ${kdeconnect_clipboard_SRCS})
target_link_libraries(kdeconnect_clipboard kdeconnectcore KF5::Service Qt5::Gui)
install(TARGETS kdeconnect_clipboard DESTINATION ${PLUGIN_INSTALL_DIR} )
install(FILES kdeconnect_clipboard.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
......@@ -25,7 +25,7 @@
#include <KPluginFactory>
K_PLUGIN_FACTORY( KdeConnectPluginFactory, registerPlugin< ClipboardPlugin >(); )
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_clipboard.json", registerPlugin< ClipboardPlugin >(); )
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_CLIPBOARD, "kdeconnect.plugin.clipboard")
......
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=KdeConnect/Plugin
X-KDE-Library=kdeconnect_clipboard
X-KDE-PluginInfo-Author=Albert Vaca
X-KDE-PluginInfo-Email=albertvaka@gmail.com
X-KDE-PluginInfo-Name=kdeconnect_clipboard
X-KDE-PluginInfo-Version=0.1
X-KDE-PluginInfo-Website=http://albertvaka.wordpress.com
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
Icon=edit-paste
Name=Clipboard
Name[bg]=Буфер за обмен
Name[bs]=Clipboard
Name[ca]=Porta-retalls
Name[cs]=Schránka
Name[da]=Udklipsholder
Name[de]=Zwischenablage
Name[es]=Portapapeles
Name[fi]=Leikepöytä
Name[fr]=Presse-papiers
Name[hu]=Vágólap
Name[it]=Appunti
Name[ko]=클립보드
Name[nl]=Klembord
Name[pl]=Schowek
Name[pt]=Área de Transferência
Name[pt_BR]=Área de transferência
Name[ro]=Clipboard
Name[ru]=Буфер обмена
Name[sk]=Schránka
Name[sv]=Klippbord
Name[tr]=Pano
Name[uk]=Буфер обміну
Name[x-test]=xxClipboardxx
Comment=Share the clipboard between devices
Comment[bg]=Споделяне на буфера за обмен между устройства
Comment[bs]=Podijeli Clipboard među uređajima
Comment[ca]=Comparteix el porta-retalls entre els dispositius
Comment[cs]=Sdílejte schránku mezi zařízeními
Comment[da]=Del indholdet af udklipsholderen mellem enheder
Comment[de]=Die Zwischenablage mit Geräten teilen
Comment[es]=Compartir el portapapeles entre dispositivos
Comment[fi]=Jaa leikepöytä laitteiden välillä
Comment[fr]=Partagez le presse-papiers entre périphériques
Comment[hu]=Vágólap megosztása az eszközök között
Comment[it]=Condividi gli appunti tra i dispositivi
Comment[ko]=장치간 클립보드 공유
Comment[nl]=Het klembord tussen apparaten delen
Comment[pl]=Współdziel schowek pomiędzy urządzeniami
Comment[pt]=Partilhar a área de transferência entre dispositivos
Comment[pt_BR]=Compartilhar a área de transferência entre dispositivos
Comment[ro]=Partajează clipboardul între dispozitive
Comment[ru]=Общий буфер обмена для всех устройств
Comment[sk]=Zdieľať schránku medzi zariadeniami
Comment[sv]=Dela klippbordet mellan apparater
Comment[tr]=Aygıtlar arasında panoyu paylaştır
Comment[uk]=Спільне використання буфера обміну даними на пристроях
Comment[x-test]=xxShare the clipboard between devicesxx
X-KdeConnect-SupportedPackageType=kdeconnect.clipboard
X-KdeConnect-OutgoingPackageType=kdeconnect.clipboard
{
"Encoding": "UTF-8",
"KPlugin": {
"Authors": [
{
"Email": "albertvaka@gmail.com",
"Name": "Albert Vaca"
}
],
"Description": "Share the clipboard between devices",
"Description[bg]": "Споделяне на буфера за обмен между устройства",
"Description[bs]": "Podijeli Clipboard među uređajima",
"Description[ca]": "Comparteix el porta-retalls entre els dispositius",
"Description[cs]": "Sdílejte schránku mezi zařízeními",
"Description[da]": "Del indholdet af udklipsholderen mellem enheder",
"Description[de]": "Die Zwischenablage mit Geräten teilen",
"Description[es]": "Compartir el portapapeles entre dispositivos",
"Description[fi]": "Jaa leikepöytä laitteiden välillä",
"Description[fr]": "Partagez le presse-papiers entre périphériques",
"Description[hu]": "Vágólap megosztása az eszközök között",
"Description[it]": "Condividi gli appunti tra i dispositivi",
"Description[ko]": "장치간 클립보드 공유",
"Description[nl]": "Het klembord tussen apparaten delen",
"Description[pl]": "Współdziel schowek pomiędzy urządzeniami",
"Description[pt]": "Partilhar a área de transferência entre dispositivos",
"Description[pt_BR]": "Compartilhar a área de transferência entre dispositivos",
"Description[ro]": "Partajează clipboardul între dispozitive",
"Description[ru]": "Общий буфер обмена для всех устройств",
"Description[sk]": "Zdieľať schránku medzi zariadeniami",
"Description[sv]": "Dela klippbordet mellan apparater",
"Description[tr]": "Aygıtlar arasında panoyu paylaştır",
"Description[uk]": "Спільне використання буфера обміну даними на пристроях",
"Description[x-test]": "xxShare the clipboard between devicesxx",
"EnabledByDefault": true,
"Icon": "edit-paste",
"Id": "kdeconnect_clipboard",
"License": "GPL",
"Name": "Clipboard",
"Name[bg]": "Буфер за обмен",
"Name[bs]": "Clipboard",
"Name[ca]": "Porta-retalls",
"Name[cs]": "Schránka",
"Name[da]": "Udklipsholder",
"Name[de]": "Zwischenablage",
"Name[es]": "Portapapeles",
"Name[fi]": "Leikepöytä",
"Name[fr]": "Presse-papiers",
"Name[hu]": "Vágólap",
"Name[it]": "Appunti",
"Name[ko]": "클립보드",
"Name[nl]": "Klembord",
"Name[pl]": "Schowek",
"Name[pt]": "Área de Transferência",
"Name[pt_BR]": "Área de transferência",
"Name[ro]": "Clipboard",
"Name[ru]": "Буфер обмена",
"Name[sk]": "Schránka",
"Name[sv]": "Klippbord",
"Name[tr]": "Pano",
"Name[uk]": "Буфер обміну",
"Name[x-test]": "xxClipboardxx",
"ServiceTypes": [
"KdeConnect/Plugin"
],
"Version": "0.1",
"Website": "http://albertvaka.wordpress.com"
},
"X-KdeConnect-OutgoingPackageType": [ "kdeconnect.clipboard" ],
"X-KdeConnect-SupportedPackageType": [ "kdeconnect.clipboard" ]
}
......@@ -6,11 +6,8 @@ find_package(XTest REQUIRED)
find_package(X11 REQUIRED)
find_package(LibFakeKey REQUIRED)
add_library(kdeconnect_mousepad MODULE ${kdeconnect_mousepad_SRCS})
kdeconnect_add_plugin(kdeconnect_mousepad JSON kdeconnect_mousepad.json SOURCES ${kdeconnect_mousepad_SRCS})
include_directories(${XTEST_INCLUDE_DIRS} ${X11_INCLUDE_DIR} ${LibFakeKey_INCLUDE_DIRS})
target_link_libraries(kdeconnect_mousepad KF5::Service kdeconnectcore Qt5::Gui ${X11_LIBRARIES} ${XTEST_LIBRARIES} ${LibFakeKey_LIBRARIES})
install(TARGETS kdeconnect_mousepad DESTINATION ${PLUGIN_INSTALL_DIR} )
install(FILES kdeconnect_mousepad.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=KdeConnect/Plugin
X-KDE-Library=kdeconnect_mousepad
X-KDE-PluginInfo-Author=Ahmed I. Khalil
X-KDE-PluginInfo-Email=ahmedibrahimkhali@gmail.com
X-KDE-PluginInfo-Name=kdeconnect_mousepad
X-KDE-PluginInfo-Version=0.1
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
Icon=input-mouse
Name=Touchpad
Name[bs]=Površina osjetljiva na dodir
Name[ca]=Ratolí tàctil
Name[cs]=Touchpad
Name[da]=Touchpad
Name[de]=Touchpad
Name[es]=Cursor del ratón
Name[fi]=Kosketuslevy
Name[fr]=Pavé tactile
Name[hu]=Érintőtábla
Name[ko]=터치패드
Name[nl]=Touchpad
Name[pl]=Gładzik
Name[pt]=Rato por Toque
Name[pt_BR]=Touchpad
Name[sk]=Touchpad
Name[sv]=Tryckplatta
Name[uk]=Сенсорна панель
Name[x-test]=xxTouchpadxx
Comment=Use your phone as a touchpad
Comment[bs]=Koristi pametni telefon kao površinu osjetljivu na dodir
Comment[ca]=Usa el vostre telèfon com un plafó tàctil
Comment[cs]=Používejte svůj telefon jako touchpad
Comment[da]=Brug din telefon som touchpad
Comment[de]=Verwendet Ihr Handy als Touchpad