From e365e1b35c397e0017803f2edd4b606b5a298ced Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Thu, 18 Nov 2021 11:05:09 +0100 Subject: [PATCH] Port from KPluginSelector to new KPluginWidget class Task: https://phabricator.kde.org/T12265 --- CMakeLists.txt | 1 + kcm/kcm.cpp | 27 +++------ kcm/kcm.ui | 6 +- plugins/findthisdevice/CMakeLists.txt | 9 +-- .../kdeconnect_findthisdevice.json | 3 +- .../kdeconnect_findthisdevice_config.desktop | 47 ---------------- plugins/pausemusic/CMakeLists.txt | 11 ++-- plugins/pausemusic/kdeconnect_pausemusic.json | 3 +- .../kdeconnect_pausemusic_config.desktop | 55 ------------------- plugins/runcommand/CMakeLists.txt | 7 +-- plugins/runcommand/kdeconnect_runcommand.json | 3 +- .../kdeconnect_runcommand_config.desktop | 54 ------------------ plugins/sendnotifications/CMakeLists.txt | 11 ++-- .../kdeconnect_sendnotifications.json.in | 3 +- ...deconnect_sendnotifications_config.desktop | 53 ------------------ plugins/share/CMakeLists.txt | 8 +-- plugins/share/kdeconnect_share.json | 3 +- plugins/share/kdeconnect_share_config.desktop | 55 ------------------- 18 files changed, 38 insertions(+), 321 deletions(-) delete mode 100644 plugins/findthisdevice/kdeconnect_findthisdevice_config.desktop delete mode 100644 plugins/pausemusic/kdeconnect_pausemusic_config.desktop delete mode 100644 plugins/runcommand/kdeconnect_runcommand_config.desktop delete mode 100644 plugins/sendnotifications/kdeconnect_sendnotifications_config.desktop delete mode 100644 plugins/share/kdeconnect_share_config.desktop diff --git a/CMakeLists.txt b/CMakeLists.txt index 4967d6188..1e1ac1804 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,7 @@ else() set(QT_MIN_VERSION "5.10.0") set(KDE_COMPILERSETTINGS_LEVEL "5.84.0") endif() +set(KDE_COMPILERSETTINGS_LEVEL "5.82") set(QCA_MIN_VERSION "2.1.0") find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) diff --git a/kcm/kcm.cpp b/kcm/kcm.cpp index 4fbdd442c..2176a26ad 100644 --- a/kcm/kcm.cpp +++ b/kcm/kcm.cpp @@ -175,9 +175,6 @@ void KdeConnectKcm::deviceSelected(const QModelIndex& current) disconnect(currentDevice, 0, this, 0); } - //Store previous device config - pluginsConfigChanged(); - if (!current.isValid()) { currentDevice = nullptr; kcmUi->deviceInfo->setVisible(false); @@ -225,13 +222,8 @@ void KdeConnectKcm::resetCurrentDevice() void KdeConnectKcm::resetDeviceView() { - //KPluginSelector has no way to remove a list of plugins and load another, so we need to destroy and recreate it each time - delete kcmUi->pluginSelector; - kcmUi->pluginSelector = new KPluginSelector(this); - kcmUi->deviceInfo_layout->addWidget(kcmUi->pluginSelector); kcmUi->verificationKey->setText(i18n("Key: %1", QString::fromUtf8(currentDevice->verificationKey()))); - kcmUi->pluginSelector->setConfigurationArguments(QStringList(currentDevice->id())); kcmUi->name_label->setText(currentDevice->name()); setWhenAvailable(currentDevice->isTrusted(), [this](bool trusted) { @@ -243,20 +235,22 @@ void KdeConnectKcm::resetDeviceView() }, this); }, this); - const QList pluginInfo = KPluginInfo::fromMetaData(KPluginLoader::findPlugins(QStringLiteral("kdeconnect/"))); - QList availablePluginInfo; + const QVector pluginInfo = KPluginMetaData::findPlugins(QStringLiteral("kdeconnect/")); + QVector availablePluginInfo; m_oldSupportedPluginNames = currentDevice->supportedPlugins(); for (auto it = pluginInfo.cbegin(), itEnd = pluginInfo.cend(); it!=itEnd; ++it) { - if (m_oldSupportedPluginNames.contains(it->pluginName())) { + if (m_oldSupportedPluginNames.contains(it->pluginId())) { availablePluginInfo.append(*it); } } KSharedConfigPtr deviceConfig = KSharedConfig::openConfig(currentDevice->pluginsConfigFile()); - kcmUi->pluginSelector->addPlugins(availablePluginInfo, KPluginSelector::ReadConfigFile, i18n("Available plugins"), QString(), deviceConfig); - connect(kcmUi->pluginSelector, &KPluginSelector::changed, this, &KdeConnectKcm::pluginsConfigChanged); - + kcmUi->pluginSelector->clear(); + kcmUi->pluginSelector->setConfigurationArguments(QStringList(currentDevice->id())); + kcmUi->pluginSelector->addPlugins(availablePluginInfo, i18n("Available plugins")); + kcmUi->pluginSelector->setConfig(deviceConfig->group("Plugins")); + connect(kcmUi->pluginSelector, &KPluginWidget::changed, this, &KdeConnectKcm::pluginsConfigChanged); } void KdeConnectKcm::requestPair() @@ -347,17 +341,12 @@ void KdeConnectKcm::pluginsConfigChanged() //Store previous selection if (!currentDevice) return; - DeviceDbusInterface* auxCurrentDevice = currentDevice; - currentDevice = nullptr; //HACK to avoid infinite recursion (for some reason calling save on pluginselector emits changed) kcmUi->pluginSelector->save(); - currentDevice = auxCurrentDevice; - currentDevice->reloadPlugins(); } void KdeConnectKcm::save() { - pluginsConfigChanged(); KCModule::save(); } diff --git a/kcm/kcm.ui b/kcm/kcm.ui index 830af7d95..d2fa528d2 100644 --- a/kcm/kcm.ui +++ b/kcm/kcm.ui @@ -330,7 +330,7 @@ - + 0 @@ -389,9 +389,9 @@ - KPluginSelector + KPluginWidget QWidget -
kpluginselector.h
+
kpluginwidget.h
1
diff --git a/plugins/findthisdevice/CMakeLists.txt b/plugins/findthisdevice/CMakeLists.txt index 5b5e06c56..55deb027e 100644 --- a/plugins/findthisdevice/CMakeLists.txt +++ b/plugins/findthisdevice/CMakeLists.txt @@ -26,10 +26,10 @@ if (NOT WIN32) ) endif() -set(kdeconnect_findthisdevice_config_SRCS findthisdevice_config.cpp) -ki18n_wrap_ui(kdeconnect_findthisdevice_config_SRCS findthisdevice_config.ui) +kcoreaddons_add_plugin(kdeconnect_findthisdevice_config INSTALL_NAMESPACE "kdeconnect/kcms") -add_library(kdeconnect_findthisdevice_config MODULE ${kdeconnect_findthisdevice_config_SRCS} ${debug_file_SRCS}) +ki18n_wrap_ui(kdeconnect_findthisdevice_config findthisdevice_config.ui) +target_sources(kdeconnect_findthisdevice_config PRIVATE findthisdevice_config.cpp ${debug_file_SRCS}) target_link_libraries(kdeconnect_findthisdevice_config kdeconnectpluginkcm Qt5::Multimedia @@ -38,6 +38,3 @@ target_link_libraries(kdeconnect_findthisdevice_config KF5::ConfigWidgets KF5::KIOWidgets # KUrlRequester ) - -install(TARGETS kdeconnect_findthisdevice_config DESTINATION ${KDE_INSTALL_PLUGINDIR}) -install(FILES kdeconnect_findthisdevice_config.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) diff --git a/plugins/findthisdevice/kdeconnect_findthisdevice.json b/plugins/findthisdevice/kdeconnect_findthisdevice.json index 7aaa7e009..430a5faa3 100644 --- a/plugins/findthisdevice/kdeconnect_findthisdevice.json +++ b/plugins/findthisdevice/kdeconnect_findthisdevice.json @@ -128,5 +128,6 @@ }, "X-KdeConnect-SupportedPacketType": [ "kdeconnect.findmyphone.request" - ] + ], + "X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_findthisdevice_config" } diff --git a/plugins/findthisdevice/kdeconnect_findthisdevice_config.desktop b/plugins/findthisdevice/kdeconnect_findthisdevice_config.desktop deleted file mode 100644 index a71d68358..000000000 --- a/plugins/findthisdevice/kdeconnect_findthisdevice_config.desktop +++ /dev/null @@ -1,47 +0,0 @@ -[Desktop Entry] -Type=Service -X-KDE-ServiceTypes=KCModule - -X-KDE-Library=kdeconnect_findthisdevice_config -X-KDE-ParentComponents=kdeconnect_findthisdevice - -Name=Find This Device plugin settings -Name[az]=Bu cihaz qoşması ayarlarını tapmaq -Name[ca]=Configuració del connector Cerca aquest dispositiu -Name[ca@valencia]=Configuració del connector Cerca aquest dispositiu -Name[cs]=Nastavení modulu Najít toto zařízení -Name[da]=Indstilling af find denne enhed-plugin -Name[de]=Modul-Einstellungen dieses Geräts suchen -Name[el]=Εύρεση των ρυθμίσεων αυτής της συσκευής -Name[en_GB]=Find This Device plugin settings -Name[es]=Preferencias del complemento «Encontrar este dispositivo» -Name[et]=Seadme leidmise plugina seadistused -Name[eu]=«Aurkitu gailu hau» pluginaren ezarpenak -Name[fi]=Etsi tämä laite -liitännäisen asetukset -Name[fr]=Paramètres du module « Trouver ce périphérique » -Name[gl]=Configuración do complemento de atopar o dispositivo -Name[hu]=Az Eszköz keresése bővítmény beállításai -Name[ia]=Trova preferentias de lugin de iste dispositivo -Name[id]=Pengesetan plugin Temukan Perangkat Ini -Name[it]=Impostazioni dell'estensione Trova questo dispositivo -Name[ja]=このデバイスのプラグイン設定を探す -Name[ko]=이 장치 플러그인 설정 찾기 -Name[lt]=Rasti šį įrenginį papildinio nuostatos -Name[nl]=Plug-in-instellingen van dit apparaat zoeken -Name[nn]=Innstillingar for einingsfinning -Name[pl]=Ustawienia wtyczki znajdowania tego urządzenia -Name[pt]=Configuração do 'plugin' para Procurar Este Dispositivo -Name[pt_BR]=Configurações do plugin Procurar Este Dispositivo -Name[ro]=Configurări extensie „Găsește acest dispozitiv” -Name[ru]=Настройка модуля поиска устройства -Name[sk]=Nastavenia zásuvného modulu na nájdenie zariadenia -Name[sl]=Najdi nastavitve vtičnika za to napravo -Name[sv]=Inställningar av insticksprogrammet Hitta apparaten -Name[ta]='இந்த சாதனத்தைக் கண்டுபிடி' செருகுநிரலுக்கான அமைப்புகள் -Name[tr]=Bu cihaz eklenti ayarlarını bulun -Name[uk]=Параметри додатка пошуку пристрою -Name[x-test]=xxFind This Device plugin settingsxx -Name[zh_CN]=查找此设备插件设置 -Name[zh_TW]=尋找此裝置的外掛設定 - -Categories=Qt;KDE;X-KDE-settings-kdeconnect; diff --git a/plugins/pausemusic/CMakeLists.txt b/plugins/pausemusic/CMakeLists.txt index b317c49e2..0ced88178 100644 --- a/plugins/pausemusic/CMakeLists.txt +++ b/plugins/pausemusic/CMakeLists.txt @@ -38,16 +38,15 @@ endif() ####################################### # Config -set( kdeconnect_pausemusic_config_SRCS pausemusic_config.cpp ) -ki18n_wrap_ui( kdeconnect_pausemusic_config_SRCS pausemusic_config.ui ) +set( kdeconnect_pausemusic_config_SRCS ) + +kcoreaddons_add_plugin(kdeconnect_pausemusic_config SOURCES pausemusic_config.cpp INSTALL_NAMESPACE "kdeconnect/kcms") + +ki18n_wrap_ui(kdeconnect_pausemusic_config pausemusic_config.ui) -add_library(kdeconnect_pausemusic_config MODULE ${kdeconnect_pausemusic_config_SRCS} ) target_link_libraries( kdeconnect_pausemusic_config kdeconnectcore kdeconnectpluginkcm KF5::I18n KF5::KCMUtils ) - -install( TARGETS kdeconnect_pausemusic_config DESTINATION ${PLUGIN_INSTALL_DIR} ) -install( FILES kdeconnect_pausemusic_config.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) diff --git a/plugins/pausemusic/kdeconnect_pausemusic.json b/plugins/pausemusic/kdeconnect_pausemusic.json index 011011c4d..952c498b8 100644 --- a/plugins/pausemusic/kdeconnect_pausemusic.json +++ b/plugins/pausemusic/kdeconnect_pausemusic.json @@ -144,5 +144,6 @@ }, "X-KdeConnect-SupportedPacketType": [ "kdeconnect.telephony" - ] + ], + "X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_pausemusic_config" } diff --git a/plugins/pausemusic/kdeconnect_pausemusic_config.desktop b/plugins/pausemusic/kdeconnect_pausemusic_config.desktop deleted file mode 100644 index aee712142..000000000 --- a/plugins/pausemusic/kdeconnect_pausemusic_config.desktop +++ /dev/null @@ -1,55 +0,0 @@ -[Desktop Entry] -Type=Service -X-KDE-ServiceTypes=KCModule - -X-KDE-Library=kdeconnect_pausemusic_config -X-KDE-ParentComponents=kdeconnect_pausemusic - -Name=Pause Music plugin settings -Name[ar]=إعدادات ملحقة إلباث الموسيقى -Name[az]=Musiqi qoşması ayarlarına fasilə -Name[bg]=Настройки на приставката за поставяне на пауза -Name[bs]=Zaustavi Muziku postavke dodatka -Name[ca]=Configuració del connector Pausa a la música -Name[ca@valencia]=Configuració del connector Pausa a la música -Name[cs]=Nastavení modulu Pozastavení hudby -Name[da]=Indstilling af plugin til at sætte musik på pause -Name[de]=Modul-Einstellungen für das Anhalten der Musikwiedergabe -Name[el]=Ρυθμίσεις προσθέτου παύσης μουσικής -Name[en_GB]=Pause Music plugin settings -Name[es]=Ajustes del complemento PauseMusic -Name[et]=Muusika peatamise plugina seadistused -Name[eu]=«Pausatu-musika» pluginaren ezarpenak -Name[fi]=Keskeytä musiikki -liitännäisen asetukset -Name[fr]=Paramètres du module de mise en pause -Name[gl]=Configuración do complemento para deter a música -Name[he]=הגדרות התוספת השהיית המוזיקה -Name[hu]=A Zene szüneteltetése bővítmény beállításai -Name[ia]=Preferentias de plugin de Pausa Musica -Name[id]=Pengaturan plugin Pause Music -Name[it]=Impostazioni dell'estensione Sospendi musica -Name[ja]=音楽プラグインの設定を一時停止 -Name[ko]=음악 일시 정지 플러그인 설정 -Name[lt]=Pristabdyti muziką papildinio nuostatos -Name[nl]=Plug-in-instellingen voor muziek pauzeren -Name[nn]=Innstillingar for pausing av musikk -Name[pl]=Ustawienia wtyczki wstrzymywania muzyki -Name[pt]=Configuração do 'plugin' de Pausa da Música -Name[pt_BR]=Pausar as configurações do plugin Músicas -Name[ro]=Configurările extensiei „Întrerupe muzica” -Name[ru]=Настройка модуля приостановки музыки -Name[sk]=Nastavenia zásuvného modulu pozastavenia hudby -Name[sl]=Zaustavite nastavitve glasbenih vtičnikov -Name[sr]=Поставке прикључка паузирања музике -Name[sr@ijekavian]=Поставке прикључка паузирања музике -Name[sr@ijekavianlatin]=Postavke priključka pauziranja muzike -Name[sr@latin]=Postavke priključka pauziranja muzike -Name[sv]=Inställningar av insticksprogram för paus i musik -Name[ta]=பாடல் இடைநிறுத்த செருகுநிரலுக்கான அமைப்புகள் -Name[tr]=Müziği Duraklat eklenti ayarları -Name[uk]=Параметри додатка призупинення відтворення музики -Name[x-test]=xxPause Music plugin settingsxx -Name[zh_CN]=暂停音乐插件设置 -Name[zh_TW]=暫停音樂外掛程式設定 - -Categories=Qt;KDE;X-KDE-settings-kdeconnect; diff --git a/plugins/runcommand/CMakeLists.txt b/plugins/runcommand/CMakeLists.txt index 29dde2b0b..1f0e6a2ab 100644 --- a/plugins/runcommand/CMakeLists.txt +++ b/plugins/runcommand/CMakeLists.txt @@ -20,9 +20,7 @@ target_link_libraries(kdeconnect_runcommand #---------------------- if(NOT SAILFISHOS) - set( kdeconnect_runcommand_config_SRCS runcommand_config.cpp ) - - add_library(kdeconnect_runcommand_config MODULE ${kdeconnect_runcommand_config_SRCS} ) + kcoreaddons_add_plugin(kdeconnect_runcommand_config SOURCES runcommand_config.cpp INSTALL_NAMESPACE "kdeconnect/kcms") target_link_libraries( kdeconnect_runcommand_config kdeconnectcore kdeconnectpluginkcm @@ -31,7 +29,4 @@ if(NOT SAILFISHOS) KF5::ConfigWidgets ) - - install(TARGETS kdeconnect_runcommand_config DESTINATION ${PLUGIN_INSTALL_DIR} ) - install(FILES kdeconnect_runcommand_config.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) endif() diff --git a/plugins/runcommand/kdeconnect_runcommand.json b/plugins/runcommand/kdeconnect_runcommand.json index e277eb3cb..07994c712 100644 --- a/plugins/runcommand/kdeconnect_runcommand.json +++ b/plugins/runcommand/kdeconnect_runcommand.json @@ -194,5 +194,6 @@ ], "X-KdeConnect-SupportedPacketType": [ "kdeconnect.runcommand.request" - ] + ], + "X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_runcommand_config" } diff --git a/plugins/runcommand/kdeconnect_runcommand_config.desktop b/plugins/runcommand/kdeconnect_runcommand_config.desktop deleted file mode 100644 index 7bd4f5ab7..000000000 --- a/plugins/runcommand/kdeconnect_runcommand_config.desktop +++ /dev/null @@ -1,54 +0,0 @@ -[Desktop Entry] -Type=Service -X-KDE-ServiceTypes=KCModule - -X-KDE-Library=kdeconnect_runcommand_config -X-KDE-ParentComponents=kdeconnect_runcommand - -Name=Run Command plugin settings -Name[ar]=إعدادات ملحقة تشغيل الأوامر -Name[ast]=Axustes del comandu Execución de comandos -Name[az]=Əmr qoşması ayarlarını başlatmaq -Name[ca]=Configuració del connector Executa ordres -Name[ca@valencia]=Configuració del connector Executa ordres -Name[cs]=Nastavení modulu Spustit příkaz -Name[da]=Indstilling af kør kommando-plugin -Name[de]=Modul-Einstellungen für Befehlsausführung -Name[el]=Ρυθμίσεις προσθέτου εκτέλεσης εντολής -Name[en_GB]=Run Command plugin settings -Name[es]=Ajustes del complemento de ejecución de órdenes -Name[et]=Käsu käivitamise plugina seadistused -Name[eu]=«Exekutatu komandoa» pluginaren ezarpenak -Name[fi]=Suorita komento -liitännäisen asetukset -Name[fr]=Configuration du module externe d'exécution de commande -Name[gl]=Configuración do complemento de orde de executar -Name[he]=הגדרת התוסף הרץ פקודה -Name[hu]=A Parancs futtatása bővítmény beállításai -Name[ia]=Preferentias de plugin de Executar Commando -Name[id]=Pengaturan plugin Run Command -Name[it]=Impostazioni dell'estensione Esegui comando -Name[ja]=コマンド実行プラグインの設定 -Name[ko]=명령 실행 플러그인 설정 -Name[lt]=Vykdyti komandą papildinio nuostatos -Name[nl]=Plug-in-instellingen van commando Uitvoeren -Name[nn]=Innstillingar for kommandokøyring -Name[pl]=Ustawienia wtyczki wykonywania polecenia -Name[pt]=Configuração do 'plugin' de execução de comandos -Name[pt_BR]=Configurações do plugin de execução de comandos -Name[ro]=Configurările extensiei „Rulează comandă” -Name[ru]=Настройка модуля выполнения команд -Name[sk]=Nastavenia zásuvného modulu spustenia príkazu -Name[sl]=Zaženite nastavitve vtičnika ukazov -Name[sr]=Поставке прикључка извршавања наредбе -Name[sr@ijekavian]=Поставке прикључка извршавања наредбе -Name[sr@ijekavianlatin]=Postavke priključka izvršavanja naredbe -Name[sr@latin]=Postavke priključka izvršavanja naredbe -Name[sv]=Inställningar av insticksprogram för kör kommando -Name[ta]=கட்டளையை இயக்கும் செருகுநிரலுக்கான அமைப்புகள் -Name[tr]=Komut Çalıştır eklenti ayarları -Name[uk]=Параметри додатка запуску команд -Name[x-test]=xxRun Command plugin settingsxx -Name[zh_CN]=执行命令插件设置 -Name[zh_TW]=命令列外掛程式設定 - -Categories=Qt;KDE;X-KDE-settings-kdeconnect; diff --git a/plugins/sendnotifications/CMakeLists.txt b/plugins/sendnotifications/CMakeLists.txt index d1c16fd5e..ac4da2d4c 100644 --- a/plugins/sendnotifications/CMakeLists.txt +++ b/plugins/sendnotifications/CMakeLists.txt @@ -35,21 +35,20 @@ target_link_libraries(kdeconnect_sendnotifications ####################################### # Config if (NOT SAILFISHOS) -set( kdeconnect_sendnotifications_config_SRCS + +kcoreaddons_add_plugin(kdeconnect_sendnotifications_config INSTALL_NAMESPACE "kdeconnect/kcms") + +ki18n_wrap_ui(kdeconnect_sendnotifications_config sendnotifications_config.ui) +target_sources(kdeconnect_sendnotifications_config PRIVATE sendnotifications_config.cpp notifyingapplication.cpp notifyingapplicationmodel.cpp ) -ki18n_wrap_ui( kdeconnect_sendnotifications_config_SRCS sendnotifications_config.ui ) -add_library(kdeconnect_sendnotifications_config MODULE ${kdeconnect_sendnotifications_config_SRCS} ) target_link_libraries( kdeconnect_sendnotifications_config kdeconnectcore kdeconnectpluginkcm KF5::I18n KF5::KCMUtils ) - -install( TARGETS kdeconnect_sendnotifications_config DESTINATION ${PLUGIN_INSTALL_DIR} ) -install( FILES kdeconnect_sendnotifications_config.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) endif() diff --git a/plugins/sendnotifications/kdeconnect_sendnotifications.json.in b/plugins/sendnotifications/kdeconnect_sendnotifications.json.in index 2de23f506..9859b05ac 100644 --- a/plugins/sendnotifications/kdeconnect_sendnotifications.json.in +++ b/plugins/sendnotifications/kdeconnect_sendnotifications.json.in @@ -93,5 +93,6 @@ ], "X-KdeConnect-SupportedPacketType": [ "kdeconnect.notification.request" - ] + ], + "X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_sendnotifications_config" } diff --git a/plugins/sendnotifications/kdeconnect_sendnotifications_config.desktop b/plugins/sendnotifications/kdeconnect_sendnotifications_config.desktop deleted file mode 100644 index d3bc09d53..000000000 --- a/plugins/sendnotifications/kdeconnect_sendnotifications_config.desktop +++ /dev/null @@ -1,53 +0,0 @@ -[Desktop Entry] -Type=Service -X-KDE-ServiceTypes=KCModule - -X-KDE-Library=kdeconnect_sendnotifications_config -X-KDE-ParentComponents=kdeconnect_sendnotifications - -Name=Notification synchronization plugin settings -Name[ar]=إعدادات ملحقة مزامنة الإخطارات -Name[az]=Bildiriş eyniləşdirmə qoşması ayarları -Name[ca]=Configuració del connector Sincronitza les notificacions -Name[ca@valencia]=Configuració del connector Sincronitza les notificacions -Name[cs]=Nastavení modulu synchronizace oznámení -Name[da]=Indstilling af plugin til bekendtgørelsessynkronisering -Name[de]=Einstellungen für Benachrichtigungsabgleich-Modul -Name[el]=Ρυθμίσεις πρόσθετου συγχρονισμού ειδοποιήσεων -Name[en_GB]=Notification synchronisation plugin settings -Name[es]=Preferencias del complemento de sincronización de notificaciones -Name[et]=Märguande sünkroonimise plugina seadistused -Name[eu]=Jakinarazpenak sinkronizatzeko pluginaren ezarpenak -Name[fi]=Ilmoitusten synkronointiliitännäisen asetukset -Name[fr]=Configuration du module externe de synchronisation des notifications -Name[gl]=Configuración do complemento de sincronización de notificacións -Name[he]=הגדרת התוסף סנכרון התראות -Name[hu]=Az Értesítésszinkronizáció bővítmény beállításai -Name[ia]=Preferentias de notification de plugin de synchronisation -Name[id]=Pengaturan plugin sinkronisasi notifikasi -Name[it]=Impostazioni dell'estensione di sincronizzazione delle notifiche -Name[ja]=通知同期プラグインの設定 -Name[ko]=알림 동기화 플러그인 설정 -Name[lt]=Pranešimų sinchronizavimo papildinio nuostatos -Name[nl]=Instellingen van plug-in voor synchronisatie van meldingen -Name[nn]=Innstillingar for synkronisering av varslingar -Name[pl]=Ustawienia wtyczki synchronizującej powiadomienia -Name[pt]=Configuração do 'plugin' de sincronização das notificações -Name[pt_BR]=Configuração do plugin de sincronização das notificações -Name[ro]=Configurările extensiei „Sincronizare notificări” -Name[ru]=Настройка модуля синхронизации уведомлений -Name[sk]=Nastavenia zásuvného modulu synchronizácie upozornení -Name[sl]=Nastavitve vtičnika za usklajevanje obvestil -Name[sr]=Поставке прикључка синхронизације обавештења -Name[sr@ijekavian]=Поставке прикључка синхронизације обавештења -Name[sr@ijekavianlatin]=Postavke priključka sinhronizacije obaveštenja -Name[sr@latin]=Postavke priključka sinhronizacije obaveštenja -Name[sv]=Inställningar av insticksprogram för underrättelsesynkronisering -Name[ta]=அறிவிப்பு ஒத்திசைவு செருகுநிரலலுக்கான அமைப்புகள் -Name[tr]=Bildirim eşitleme eklentisi ayarları -Name[uk]=Параметри додатка синхронізації сповіщень -Name[x-test]=xxNotification synchronization plugin settingsxx -Name[zh_CN]=通知同步插件设置 -Name[zh_TW]=同步通知外掛程式設定 - -Categories=Qt;KDE;X-KDE-settings-kdeconnect; diff --git a/plugins/share/CMakeLists.txt b/plugins/share/CMakeLists.txt index 6f94d2601..b34dd1194 100644 --- a/plugins/share/CMakeLists.txt +++ b/plugins/share/CMakeLists.txt @@ -24,10 +24,9 @@ target_link_libraries(kdeconnect_share ####################################### # Config -set( kdeconnect_share_config_SRCS share_config.cpp ) -ki18n_wrap_ui( kdeconnect_share_config_SRCS share_config.ui ) +kcoreaddons_add_plugin(kdeconnect_share_config SOURCES share_config.cpp INSTALL_NAMESPACE "kdeconnect/kcms") -add_library(kdeconnect_share_config MODULE ${kdeconnect_share_config_SRCS} ) +ki18n_wrap_ui(kdeconnect_share_config share_config.ui) target_link_libraries( kdeconnect_share_config kdeconnectpluginkcm KF5::I18n @@ -36,6 +35,3 @@ target_link_libraries( kdeconnect_share_config KF5::KIOWidgets KF5::Notifications ) - -install(TARGETS kdeconnect_share_config DESTINATION ${PLUGIN_INSTALL_DIR} ) -install(FILES kdeconnect_share_config.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) diff --git a/plugins/share/kdeconnect_share.json b/plugins/share/kdeconnect_share.json index c4214aa4e..7f07d0868 100644 --- a/plugins/share/kdeconnect_share.json +++ b/plugins/share/kdeconnect_share.json @@ -149,5 +149,6 @@ ], "X-KdeConnect-SupportedPacketType": [ "kdeconnect.share.request" - ] + ], + "X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_share_config" } diff --git a/plugins/share/kdeconnect_share_config.desktop b/plugins/share/kdeconnect_share_config.desktop deleted file mode 100644 index 6864402dc..000000000 --- a/plugins/share/kdeconnect_share_config.desktop +++ /dev/null @@ -1,55 +0,0 @@ -[Desktop Entry] -Type=Service -X-KDE-ServiceTypes=KCModule - -X-KDE-Library=kdeconnect_share_config -X-KDE-ParentComponents=kdeconnect_share - -Name=Share plugin settings -Name[ar]=إعدادات ملحقة المشاركة -Name[az]=Qoşma ayarlarını paylaşmaq -Name[bg]=Настройки на приставката за споделяне -Name[bs]=Podijeli postavke dodatka -Name[ca]=Configuració del connector Compartició -Name[ca@valencia]=Configuració del connector Compartició -Name[cs]=Nastavení modulu sdílení -Name[da]=Indstilling af deling-plugin -Name[de]=Modul-Einstellungen für Veröffentlichung -Name[el]=Ρυθμίσεις προσθέτου κοινής χρήσης -Name[en_GB]=Share plugin settings -Name[es]=Ajustes del complemento para compartir -Name[et]=Jagamisplugina seadistused -Name[eu]=Partekatu pluginaren ezarpenak -Name[fi]=Jakoliitännäisen asetukset -Name[fr]=Paramètres du module de partage -Name[gl]=Configuración do complemento de compartir -Name[he]=שתף את הגדרות התוספים -Name[hu]=Megosztás bővítmény beállításai -Name[ia]=Preferentias de plugin de compartir -Name[id]=Pengaturan plugin Share -Name[it]=Impostazioni dell'estensione Condivisione -Name[ja]=共有プラグインの設定 -Name[ko]=공유 플러그인 설정 -Name[lt]=Bendrinimo papildinio nuostatos -Name[nl]=Plug-in-instellingen van delen -Name[nn]=Innstillingar for deling -Name[pl]=Ustawienia wtyczki udostępniania -Name[pt]=Configuração do 'plugin' de partilha -Name[pt_BR]=Compartilhar as configurações do plugin -Name[ro]=Configurările extensiei „Partajare” -Name[ru]=Настройка модуля обмена файлами -Name[sk]=Nastavenia zásuvného modulu zdieľania -Name[sl]=Nastavitve vtičnika za deljenje -Name[sr]=Поставке прикључка дељења -Name[sr@ijekavian]=Поставке прикључка дељења -Name[sr@ijekavianlatin]=Postavke priključka deljenja -Name[sr@latin]=Postavke priključka deljenja -Name[sv]=Inställningar av delningsinsticksprogram -Name[ta]='பகிர்' செருகுநிரலுக்கான அமைப்புகள் -Name[tr]=Paylaşma eklentisi ayarları -Name[uk]=Параметри додатка оприлюднення даних -Name[x-test]=xxShare plugin settingsxx -Name[zh_CN]=分享插件设置 -Name[zh_TW]=共享外掛程式設定 - -Categories=Qt;KDE;X-KDE-settings-kdeconnect;