[network/kdeconnect-kde] /: Remove KCM
Albert Vaca Cintora
null at kde.org
Tue Jun 24 22:07:42 BST 2025
Git commit c8ab0738927d0b544813e91a7f5a2eabd42fce3c by Albert Vaca Cintora.
Committed on 24/06/2025 at 21:07.
Pushed by albertvaka into branch 'master'.
Remove KCM
The KDE Connect QML app has reached the point where it has almost 100% feature parity with the KCM (two features missing only: exporting/importing commands lists for the runcommand plugin, and configuring the applications for the receive notifications plugin). So I think it's time we kill the KCM module and replace it with the nicer looking QML app, removing in the process a whole lot of code duplication.
I originally wrote the KCM module 12 years ago now and it has served us well all this years, but it's time for it to go :smile:
M +1 -15 CMakeLists.txt
M +0 -4 KDEConnectMacros.cmake
M +1 -1 app/CMakeLists.txt
M +11 -7 core/openconfig.cpp
M +0 -4 data/org.kde.kdeconnect.metainfo.xml
D +0 -1 doc/CMakeLists.txt
D +0 -55 doc/index.docbook
M +1 -1 indicator/CMakeLists.txt
M +0 -1 indicator/indicatorhelper.h
M +0 -1 indicator/indicatorhelper_win.cpp
M +8 -20 indicator/main.cpp
D +0 -19 kcm/CMakeLists.txt
D +0 -10 kcm/Messages.sh
D +0 -7 kcm/assets.qrc
D +0 -444 kcm/kcm.cpp
D +0 -60 kcm/kcm.h
D +0 -452 kcm/kcm.ui
D +0 -129 kcm/kcm_kdeconnect.json
D +0 -88 kcm/list.qml
D +0 -23 kcmplugin/CMakeLists.txt
D +0 -18 kcmplugin/kdeconnectpluginkcm.cpp
D +0 -47 kcmplugin/kdeconnectpluginkcm.h
M +2 -3 plasmoid/package/contents/ui/FullRepresentation.qml
M +1 -5 plasmoid/package/contents/ui/main.qml
M +0 -3 plasmoid/package/metadata.json
M +1 -8 plugins/clipboard/CMakeLists.txt
D +0 -68 plugins/clipboard/clipboard_config.cpp
D +0 -27 plugins/clipboard/clipboard_config.h
D +0 -93 plugins/clipboard/clipboard_config.ui
M +0 -1 plugins/clipboard/kdeconnect_clipboard.json
M +0 -15 plugins/findthisdevice/CMakeLists.txt
D +0 -75 plugins/findthisdevice/findthisdevice_config.cpp
D +0 -25 plugins/findthisdevice/findthisdevice_config.h
D +0 -72 plugins/findthisdevice/findthisdevice_config.ui
M +0 -1 plugins/findthisdevice/kdeconnect_findthisdevice.json
M +0 -4 plugins/kdeconnect.schema.json
M +1 -12 plugins/pausemusic/CMakeLists.txt
M +0 -1 plugins/pausemusic/kdeconnect_pausemusic.json
D +0 -62 plugins/pausemusic/pausemusic_config.cpp
D +0 -24 plugins/pausemusic/pausemusic_config.h
D +0 -105 plugins/pausemusic/pausemusic_config.ui
M +1 -11 plugins/runcommand/CMakeLists.txt
M +0 -1 plugins/runcommand/kdeconnect_runcommand.json
D +0 -254 plugins/runcommand/runcommand_config.cpp
D +0 -34 plugins/runcommand/runcommand_config.h
M +0 -1 plugins/runcommand/runcommandplugin.cpp
M +1 -16 plugins/sendnotifications/CMakeLists.txt
M +0 -1 plugins/sendnotifications/kdeconnect_sendnotifications.json
D +0 -97 plugins/sendnotifications/sendnotifications_config.cpp
D +0 -28 plugins/sendnotifications/sendnotifications_config.h
D +0 -204 plugins/sendnotifications/sendnotifications_config.ui
M +1 -10 plugins/share/CMakeLists.txt
M +0 -1 plugins/share/kdeconnect_share.json
D +0 -51 plugins/share/share_config.cpp
D +0 -24 plugins/share/share_config.h
D +0 -80 plugins/share/share_config.ui
M +1 -0 plugins/sms/CMakeLists.txt
D +0 -20 settings/CMakeLists.txt
D +0 -10 settings/Messages.sh
D +0 -86 settings/main.cpp
D +0 -136 settings/org.kde.kdeconnect-settings.desktop
M +1 -1 smsapp/CMakeLists.txt
https://invent.kde.org/network/kdeconnect-kde/-/commit/c8ab0738927d0b544813e91a7f5a2eabd42fce3c
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fa614d66b..e7fcba8cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -102,13 +102,7 @@ if (Qt6Gui_VERSION VERSION_GREATER_EQUAL "6.10.0")
endif()
find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS I18n ConfigWidgets DBusAddons IconThemes Notifications
- KIO KCMUtils Service Solid Kirigami People WindowSystem GuiAddons Crash ItemModels)
-
-find_package(KF6DocTools ${KF_MIN_VERSION})
-set_package_properties(KF6DocTools PROPERTIES DESCRIPTION
- "Tools to generate documentation"
- TYPE OPTIONAL
-)
+ KIO ColorScheme Service Solid Kirigami People WindowSystem GuiAddons Crash ItemModels)
if (WIN32)
get_filename_component(WINDOWS_KITS_DIR
@@ -130,9 +124,6 @@ add_subdirectory(icons)
add_subdirectory(data)
add_subdirectory(cli)
add_subdirectory(declarativeplugin)
-
-add_subdirectory(kcm)
-add_subdirectory(kcmplugin)
add_subdirectory(daemon)
add_subdirectory(app)
add_subdirectory(indicator)
@@ -140,7 +131,6 @@ add_subdirectory(urlhandler)
add_subdirectory(nautilus-extension)
add_subdirectory(fileitemactionplugin)
add_subdirectory(smsapp)
-add_subdirectory(settings)
if(NOT WIN32 AND NOT APPLE)
add_subdirectory(kio)
@@ -148,10 +138,6 @@ if(NOT WIN32 AND NOT APPLE)
endif()
ki18n_install(po)
-if(KF6DocTools_FOUND)
- kdoctools_install(po)
- add_subdirectory(doc)
-endif()
if(BUILD_TESTING)
add_subdirectory(tests)
diff --git a/KDEConnectMacros.cmake b/KDEConnectMacros.cmake
index 8d8c28f44..9ba2db79c 100644
--- a/KDEConnectMacros.cmake
+++ b/KDEConnectMacros.cmake
@@ -14,7 +14,3 @@ function(kdeconnect_add_plugin plugin_name)
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin ${PlUGIN_WITHOUT_PREFIX})")
endfunction()
-function(kdeconnect_add_kcm plugin)
- kcoreaddons_add_plugin(${plugin} ${ARGN} INSTALL_NAMESPACE kdeconnect/kcms)
- install(FILES "${plugin}.qml" DESTINATION ${KDE_INSTALL_DATADIR}/kdeconnect)
-endfunction()
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 7f723adb7..3636be7a4 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -41,7 +41,7 @@ ecm_target_qml_sources(kdeconnect-app SOURCES
qml/WelcomePage.qml
)
-target_link_libraries(kdeconnect-app PRIVATE Qt::Quick Qt::QuickControls2 Qt::Widgets KF6::CoreAddons KF6::I18n KF6::KCMUtils KF6::Crash KF6::ItemModels KF6::DBusAddons KF6::WindowSystem)
+target_link_libraries(kdeconnect-app PRIVATE Qt::Quick Qt::QuickControls2 Qt::Widgets KF6::CoreAddons KF6::I18n KF6::ColorScheme KF6::Crash KF6::ItemModels KF6::DBusAddons KF6::WindowSystem)
install(TARGETS kdeconnect-app ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS org.kde.kdeconnect.app.desktop DESTINATION ${KDE_INSTALL_APPDIR})
diff --git a/core/openconfig.cpp b/core/openconfig.cpp
index 496f5f5db..0185ceb4a 100644
--- a/core/openconfig.cpp
+++ b/core/openconfig.cpp
@@ -7,6 +7,7 @@
#include "openconfig.h"
#include <QDebug>
+#include <QProcess>
#include <KIO/CommandLauncherJob>
@@ -22,22 +23,25 @@ void OpenConfig::openConfiguration(const QString &deviceId, const QString &plugi
QString argument;
if (!deviceId.isEmpty()) {
- args << QStringLiteral("--args");
- argument = deviceId;
+ args << QStringLiteral("--device");
+ args << deviceId;
if (!pluginId.isEmpty()) {
- argument += QLatin1Char(':') + pluginId;
+ args << QStringLiteral("--plugin-config");
+ args << pluginId;
}
-
- args << argument;
}
- auto job = new KIO::CommandLauncherJob(QStringLiteral("kdeconnect-settings"), args);
- job->setDesktopName(QStringLiteral("org.kde.kdeconnect-settings"));
+#ifdef Q_OS_WIN
+ QProcess::startDetached(QStringLiteral("kdeconnect-app.exe"), args);
+#else
+ auto job = new KIO::CommandLauncherJob(QStringLiteral("kdeconnect-app"), args);
+ job->setDesktopName(QStringLiteral("org.kde.kdeconnect.app"));
job->setStartupId(m_currentToken.toUtf8());
job->start();
m_currentToken = QString();
+#endif
}
#include "moc_openconfig.cpp"
diff --git a/data/org.kde.kdeconnect.metainfo.xml b/data/org.kde.kdeconnect.metainfo.xml
index 0c9608327..d95e29cbd 100644
--- a/data/org.kde.kdeconnect.metainfo.xml
+++ b/data/org.kde.kdeconnect.metainfo.xml
@@ -164,17 +164,13 @@
<content_rating type="oars-1.1"/>
<project_group>KDE</project_group>
<launchable type="desktop-id">org.kde.kdeconnect.app.desktop</launchable>
- <launchable type="desktop-id">org.kde.kdeconnect-settings.desktop</launchable>
<provides>
<binary>kdeconnectd</binary>
<binary>kdeconnect-cli</binary>
<binary>kdeconnect-app</binary>
<binary>kdeconnect-indicator</binary>
- <binary>kdeconnect-settings</binary>
<binary>kdeconnect-sms</binary>
<binary>kdeconnect-handler</binary>
- <binary>kdeconnect-handler</binary>
- <id>org.kde.kdeconnect.kcm.desktop</id>
<dbus>org.kde.kdeconnect</dbus>
</provides>
<categories>
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
deleted file mode 100644
index e9dcf11eb..000000000
--- a/doc/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR kdeconnect)
diff --git a/doc/index.docbook b/doc/index.docbook
deleted file mode 100644
index c75a139c1..000000000
--- a/doc/index.docbook
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE article PUBLIC "-//KDE//DTD DocBook XML V4.5-Based Variant V1.1//EN"
-"dtd/kdedbx45.dtd" [
-<!ENTITY % addindex "IGNORE">
-<!ENTITY % English "INCLUDE" > <!-- change language only here -->
-]>
-
-<article id="kdeconnect" lang="&language;">
-<articleinfo>
-<title>KDE Connect</title>
-<authorgroup>
-<author>&Aleix.Pol;</author>
-<!-- TRANS:ROLES_OF_TRANSLATORS -->
-</authorgroup>
-
-<date>2015-10-19</date>
-<releaseinfo>0.9</releaseinfo>
-
-<keywordset>
-<keyword>KDE</keyword>
-<keyword>Connect</keyword>
-<keyword>phone</keyword>
-<keyword>remote</keyword>
-<keyword>device</keyword>
-<keyword>pair</keyword>
-</keywordset>
-</articleinfo>
-
-<sect1 id="kdeconnect-kcm">
-
-<title>KDE Connect</title>
-
-<para>You can use this dialog to configure which devices we're paired to and what we're sharing. The UI is divided in 2 main parts:</para>
-
-<sect2>
-<title>Devices List</title>
-
-<para>It contains a list of devices separated between paired and unpaired. Select one to pair it and when it's paired, configure it.</para>
-</sect2>
-
-<sect2>
-<title>Device Configuration</title>
-
-<para>It offers a list of the available plugins related to the device. These plugins will correspond to the different features available for the device. This is useful mainly for knowing what plugins are available and, in case there's some information that should not be shared with a device, explicitly disable it.</para>
-</sect2>
-
-<sect2>
-<title>General interaction with the devices</title>
-
-<para>KDE Connect doesn't offer a central place to interact with your devices. It's designed to integrate properly with your operating system, making it possible to share files from the different applications or integrating with the notification system to display information.</para>
-</sect2>
-
-</sect1>
-
-</article>
diff --git a/indicator/CMakeLists.txt b/indicator/CMakeLists.txt
index ba592b171..ca806b51f 100644
--- a/indicator/CMakeLists.txt
+++ b/indicator/CMakeLists.txt
@@ -40,7 +40,7 @@ ecm_qt_declare_logging_category(kdeconnect-indicator
target_include_directories(kdeconnect-indicator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/systray_actions)
-target_link_libraries(kdeconnect-indicator Qt::Widgets Qt::QuickControls2 KF6::CoreAddons KF6::I18n KF6::Notifications KF6::DBusAddons KF6::KCMUtils KF6::Crash kdeconnectinterfaces kdeconnectcore kdeconnectversion)
+target_link_libraries(kdeconnect-indicator Qt::Widgets Qt::QuickControls2 KF6::CoreAddons KF6::I18n KF6::Notifications KF6::DBusAddons KF6::ColorScheme KF6::Crash kdeconnectinterfaces kdeconnectcore kdeconnectversion)
if (WIN32)
target_link_libraries(kdeconnect-indicator windowsapp)
diff --git a/indicator/indicatorhelper.h b/indicator/indicatorhelper.h
index 6e9e614fb..b6e065295 100644
--- a/indicator/indicatorhelper.h
+++ b/indicator/indicatorhelper.h
@@ -22,7 +22,6 @@ const QString dbus_daemon = QStringLiteral("dbus-daemon.exe");
const QString kdeconnect_daemon = QStringLiteral("kdeconnectd.exe");
const QString kdeconnect_app = QStringLiteral("kdeconnect-app.exe");
const QString kdeconnect_handler = QStringLiteral("kdeconnect-handler.exe");
-const QString kdeconnect_settings = QStringLiteral("kdeconnect-settings.exe");
const QString kdeconnect_sms = QStringLiteral("kdeconnect-sms.exe");
};
#endif
diff --git a/indicator/indicatorhelper_win.cpp b/indicator/indicatorhelper_win.cpp
index 2e737143e..910320fae 100644
--- a/indicator/indicatorhelper_win.cpp
+++ b/indicator/indicatorhelper_win.cpp
@@ -33,7 +33,6 @@ IndicatorHelper::~IndicatorHelper()
this->terminateProcess(processes::dbus_daemon, m_indicatorUrl);
this->terminateProcess(processes::kdeconnect_app, m_indicatorUrl);
this->terminateProcess(processes::kdeconnect_handler, m_indicatorUrl);
- this->terminateProcess(processes::kdeconnect_settings, m_indicatorUrl);
this->terminateProcess(processes::kdeconnect_sms, m_indicatorUrl);
this->terminateProcess(processes::kdeconnect_daemon, m_indicatorUrl);
}
diff --git a/indicator/main.cpp b/indicator/main.cpp
index 11accb882..4feacfb1a 100644
--- a/indicator/main.cpp
+++ b/indicator/main.cpp
@@ -22,7 +22,6 @@
#endif
#include <KAboutData>
-#include <KCMultiDialog>
#include <KColorSchemeManager>
#include <KCrash>
#include <KDBusService>
@@ -37,6 +36,7 @@
#include <dbushelper.h>
#include "indicatorhelper.h"
+#include "openconfig.h"
int main(int argc, char **argv)
{
@@ -93,11 +93,9 @@ int main(int argc, char **argv)
proxyModel.setSourceModel(&model);
QMenu *menu = new QMenu;
- QPointer<KCMultiDialog> dialog;
-
DaemonDbusInterface iface;
- auto refreshMenu = [&iface, &proxyModel, &menu, &dialog]() {
+ auto refreshMenu = [&iface, &proxyModel, &menu]() {
menu->clear();
#if defined Q_OS_MAC
// On macOS, a single click on the icon doesn't open the app like on other platforms.
@@ -106,18 +104,10 @@ int main(int argc, char **argv)
QProcess::startDetached(appPath);
});
#endif
- auto configure = menu->addAction(QIcon::fromTheme(QStringLiteral("configure")), i18n("Configure…"));
- QObject::connect(configure, &QAction::triggered, configure, [&dialog]() {
- if (dialog == nullptr) {
- dialog = new KCMultiDialog;
- dialog->addModule(KPluginMetaData(QStringLiteral("plasma/kcms/systemsettings_qwidgets/kcm_kdeconnect")));
- dialog->setAttribute(Qt::WA_DeleteOnClose);
- dialog->show();
- dialog->raise();
- } else {
- dialog->raise();
- dialog->activateWindow();
- }
+ auto configure = menu->addAction(QIcon::fromTheme(QStringLiteral("configure")), i18n("Configure..."));
+ QObject::connect(configure, &QAction::triggered, configure, []() {
+ OpenConfig oc;
+ oc.openConfiguration();
});
for (int i = 0, count = proxyModel.rowCount(); i < count; ++i) {
QObject *deviceObject = proxyModel.data(proxyModel.index(i, 0), DevicesModel::DeviceRole).value<QObject *>();
@@ -175,10 +165,8 @@ int main(int argc, char **argv)
});
QObject::connect(&systray, &QSystemTrayIcon::activated, [](QSystemTrayIcon::ActivationReason reason) {
if (reason == QSystemTrayIcon::Trigger) {
- const QString kdeconnectAppExecutable = QStandardPaths::findExecutable(QStringLiteral("kdeconnect-app"), {QCoreApplication::applicationDirPath()});
- if (!kdeconnectAppExecutable.isEmpty()) {
- QProcess::startDetached(kdeconnectAppExecutable, {});
- }
+ OpenConfig oc;
+ oc.openConfiguration();
}
});
diff --git a/kcm/CMakeLists.txt b/kcm/CMakeLists.txt
deleted file mode 100644
index 85419c0ef..000000000
--- a/kcm/CMakeLists.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-qt_add_resources(kcm_SRCS assets.qrc)
-
-add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-kcm")
-
-kcoreaddons_add_plugin(kcm_kdeconnect SOURCES kcm.cpp ${kcm_SRCS} INSTALL_NAMESPACE plasma/kcms/systemsettings_qwidgets)
-kcmutils_generate_desktop_file(kcm_kdeconnect)
-
-ki18n_wrap_ui(kcm_kdeconnect kcm.ui)
-
-target_link_libraries(kcm_kdeconnect
- Qt::Core
- Qt::Gui
- Qt::QuickWidgets
- Qt::QuickControls2
- KF6::I18n
- KF6::KCMUtils
- kdeconnectinterfaces
- kdeconnectversion
-)
diff --git a/kcm/Messages.sh b/kcm/Messages.sh
deleted file mode 100755
index 814dba6df..000000000
--- a/kcm/Messages.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-
-$EXTRACTRC `find -name '*.ui' -o -name '*.rc'` >> rc.cpp
-$XGETTEXT rc.cpp -o $podir/kdeconnect-kcm.pot
-rm -f rc.cpp
-
-#.cpp (-j passed to merge into existing file)
-$XGETTEXT `find . -name '*.qml'` -j -o $podir/kdeconnect-kcm.pot
-$XGETTEXT `find . -name '*.cpp'` -j -o $podir/kdeconnect-kcm.pot
-
diff --git a/kcm/assets.qrc b/kcm/assets.qrc
deleted file mode 100644
index daf779c30..000000000
--- a/kcm/assets.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE RCC>
-
-<RCC version="1.0">
-<qresource prefix="/kdeconnectkcm">
- <file>list.qml</file>
-</qresource>
-</RCC>
diff --git a/kcm/kcm.cpp b/kcm/kcm.cpp
deleted file mode 100644
index eaf687108..000000000
--- a/kcm/kcm.cpp
+++ /dev/null
@@ -1,444 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka at gmail.com>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#include "kcm.h"
-
-#include <KColorSchemeManager>
-#include <KConfigGroup>
-#include <KLocalizedString>
-#include <KPluginFactory>
-#include <KPluginMetaData>
-#include <QMessageBox>
-#include <QtWidgets/QListView>
-#include <kcmutils_version.h>
-
-#include <QQmlContext>
-#include <QQuickItem>
-#include <QQuickStyle>
-#include <qassert.h>
-
-#include "dbushelpers.h"
-#include "dbusinterfaces.h"
-#include "devicesmodel.h"
-#include "devicessortproxymodel.h"
-#include "kdeconnect-version.h"
-
-K_PLUGIN_CLASS_WITH_JSON(KdeConnectKcm, "kcm_kdeconnect.json")
-
-class QQuickWidgetPaleteChangeWatcher : public QObject
-{
- using QObject::QObject;
-
- bool eventFilter(QObject *watched, QEvent *event) override
- {
- if (event->type() == QEvent::PaletteChange || event->type() == QEvent::ApplicationPaletteChange) {
- // We know that watched is a QQuickWidget
- QQuickWidget *w = static_cast<QQuickWidget *>(watched);
- w->setClearColor(w->palette().color(QPalette::Window));
- }
- return QObject::eventFilter(watched, event);
- }
-};
-
-void adjustListWidgetHeight(QListWidget *listWidget)
-{
- int totalHeight = 0;
- for (int i = 0; i < listWidget->count(); ++i) {
- totalHeight += listWidget->sizeHintForRow(i);
- }
- totalHeight += 2 * listWidget->frameWidth();
- listWidget->setFixedHeight(totalHeight);
-}
-
-KdeConnectKcm::KdeConnectKcm(QObject *parent, const KPluginMetaData &md, const QVariantList &args)
- : KCModule(parent, md)
- , daemon(new DaemonDbusInterface(this))
- , devicesModel(new DevicesModel(this))
- , currentDevice(nullptr)
-{
-#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
- // Ensure we have a suitable color theme set for light/dark mode. KColorSchemeManager implicitly applies
- // a suitable default theme.
- KColorSchemeManager::instance();
- // Force breeze style to ensure coloring works consistently in dark mode. Specifically tab colors have
- // troubles on windows.
- QApplication::setStyle(QStringLiteral("breeze"));
- // Force breeze icon theme to ensure we can correctly adapt icons to color changes WRT dark/light mode.
- // Without this we may end up with hicolor and fail to support icon recoloring.
- QIcon::setThemeName(QStringLiteral("breeze"));
-#else
- QIcon::setFallbackThemeName(QStringLiteral("breeze"));
-#endif
-
- // Default to org.kde.desktop style unless the user forces another style
- if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) {
- QQuickStyle::setStyle(QStringLiteral("org.kde.desktop"));
- }
-
- kcmUi.setupUi(widget());
-
- sortProxyModel = new DevicesSortProxyModel(devicesModel);
-
- kcmUi.list_quick_widget->setMinimumWidth(250);
- kcmUi.list_quick_widget->rootContext()->setContextObject(new KLocalizedContext(kcmUi.list_quick_widget));
- kcmUi.list_quick_widget->setClearColor(kcmUi.list_quick_widget->palette().color(QPalette::Window));
- kcmUi.list_quick_widget->setSource(QUrl(QStringLiteral("qrc:/kdeconnectkcm/list.qml")));
- kcmUi.list_quick_widget->rootObject()->setProperty("model", QVariant::fromValue(sortProxyModel));
- connect(kcmUi.list_quick_widget->rootObject(), SIGNAL(clicked(QString)), this, SLOT(deviceSelected(QString)));
-
- kcmUi.list_quick_widget->installEventFilter(new QQuickWidgetPaleteChangeWatcher(kcmUi.list_quick_widget));
-
- kcmUi.deviceInfo->setVisible(false);
- kcmUi.progressBar->setVisible(false);
- kcmUi.messages->setVisible(false);
-
- // Workaround: If we set this directly (or if we set it in the .ui file), the layout breaks
- kcmUi.noDeviceLinks->setWordWrap(false);
- QTimer::singleShot(0, this, [this] {
- kcmUi.noDeviceLinks->setWordWrap(true);
- });
-
- setWhenAvailable(
- daemon->announcedName(),
- [this](bool error, const QString &announcedName) {
- kcmUi.renameShow_button->setEnabled(!error);
- if (error) {
- kcmUi.rename_label->setText(i18n("Error: KDE Connect is not running"));
- } else {
- kcmUi.rename_label->setText(announcedName);
- kcmUi.rename_edit->setText(announcedName);
- }
- },
- this);
-
- setWhenAvailable(
- daemon->linkProviders(),
- [this](bool error, const QStringList &linkProviders) {
- if (error) {
- return;
- }
- kcmUi.linkProviders_list->clear();
- if (linkProviders.size() <= 1) {
- kcmUi.linkProviders_list->hide();
- kcmUi.linkProviders_label->hide();
- } else {
- for (int i = 0; i < linkProviders.size(); ++i) {
- const QStringList linkProvider = linkProviders.at(i).split(QStringLiteral("|"));
- const QString providerId = linkProvider.at(0);
- QString displayName;
- if (providerId == QLatin1StringView("BluetoothLinkProvider")) {
- displayName = i18nc("@info KDE Connect provider name", "Bluetooth");
- } else if (providerId == QLatin1StringView("LoopbackLinkProvider")) {
- displayName = i18nc("@info KDE Connect provider name", "Loopback");
- } else if (providerId == QLatin1StringView("LanLinkProvider")) {
- displayName = i18nc("@info KDE Connect provider name", "Network");
- } else {
- Q_ASSERT_X(false, Q_FUNC_INFO, "Unknow provider given");
- displayName = i18nc("@info KDE Connect provider name", "Unknown");
- }
- QString providerStatus = linkProvider.at(1);
-
- QListWidgetItem *linkProviderItem = new QListWidgetItem(displayName, kcmUi.linkProviders_list);
- linkProviderItem->setData(Qt::UserRole, providerId);
-
- if (providerStatus.compare(QStringLiteral("enabled")) == 0) {
- linkProviderItem->setCheckState(Qt::Checked);
- } else {
- linkProviderItem->setCheckState(Qt::Unchecked);
- }
-
- kcmUi.linkProviders_list->addItem(linkProviderItem);
- }
- // Hack to make the list widget resize to fit the contents
- adjustListWidgetHeight(kcmUi.linkProviders_list);
- }
-
- connect(kcmUi.linkProviders_list, &QListWidget::itemChanged, this, [this](const QListWidgetItem *item) {
- bool checked = item->checkState() == Qt::Checked;
- daemon->setLinkProviderState(item->data(Qt::UserRole).toString(), checked);
- });
- },
- this);
-
- connect(daemon, &DaemonDbusInterface::announcedNameChanged, kcmUi.rename_edit, &QLineEdit::setText);
- connect(daemon, &DaemonDbusInterface::announcedNameChanged, kcmUi.rename_label, &QLabel::setText);
-
- connect(daemon, &DaemonDbusInterface::linkProvidersChanged, this, [this](const QStringList &providers) {
- if (kcmUi.linkProviders_list->count() == 0) {
- return; // not yet setup
- }
- for (auto i = 0, count = kcmUi.linkProviders_list->count(); i < count; i++) {
- const auto item = kcmUi.linkProviders_list->item(i);
- const auto id = item->data(Qt::UserRole).toString();
-
- bool found = false;
- for (const auto &provider : providers) {
- if (provider.startsWith(id)) {
- const auto status = provider.split(QStringLiteral("|")).at(1);
- if (status.compare(QStringLiteral("enabled")) == 0) {
- item->setCheckState(Qt::Checked);
- } else {
- item->setCheckState(Qt::Unchecked);
- }
- found = true;
- break;
- }
- }
-
- Q_ASSERT_X(found, Q_FUNC_INFO, "A new backend appeared, this should not happen as the list of backends is static");
- }
- });
-
- setRenameMode(false);
-
- setButtons(KCModule::Help | KCModule::NoAdditionalButton);
-
- connect(devicesModel, &QAbstractItemModel::rowsRemoved, this, &KdeConnectKcm::devicesRemoved);
- connect(kcmUi.accept_button, &QAbstractButton::clicked, this, &KdeConnectKcm::acceptPairing);
- connect(kcmUi.reject_button, &QAbstractButton::clicked, this, &KdeConnectKcm::cancelPairing);
- connect(kcmUi.cancel_button, &QAbstractButton::clicked, this, &KdeConnectKcm::cancelPairing);
- connect(kcmUi.pair_button, &QAbstractButton::clicked, this, &KdeConnectKcm::requestPairing);
- connect(kcmUi.unpair_button, &QAbstractButton::clicked, this, &KdeConnectKcm::unpair);
- connect(kcmUi.ping_button, &QAbstractButton::clicked, this, &KdeConnectKcm::sendPing);
- connect(kcmUi.refresh_button, &QAbstractButton::clicked, this, &KdeConnectKcm::refresh);
- connect(kcmUi.rename_edit, &QLineEdit::returnPressed, this, &KdeConnectKcm::renameDone);
- connect(kcmUi.renameDone_button, &QAbstractButton::clicked, this, &KdeConnectKcm::renameDone);
- connect(kcmUi.renameShow_button, &QAbstractButton::clicked, this, &KdeConnectKcm::renameShow);
- connect(kcmUi.pluginSelector, &KPluginWidget::changed, this, &KdeConnectKcm::pluginsConfigChanged);
-
- if (!args.isEmpty() && !args.first().isNull() && args.first().canConvert<QString>()) {
- const QString input = args.first().toString();
- const auto colonIdx = input.indexOf(QLatin1Char(':'));
- const QString deviceId = input.left(colonIdx);
- const QString pluginCM = colonIdx < 0 ? QString() : input.mid(colonIdx + 1);
-
- connect(devicesModel, &DevicesModel::rowsInserted, this, [this, deviceId, pluginCM]() {
- kcmUi.list_quick_widget->rootObject()->setProperty("currentDeviceId", deviceId);
- deviceSelected(deviceId);
- if (!pluginCM.isEmpty()) {
- kcmUi.pluginSelector->showConfiguration(pluginCM);
- }
- disconnect(devicesModel, &DevicesModel::rowsInserted, this, nullptr);
- });
- }
-}
-
-void KdeConnectKcm::devicesRemoved()
-{
- if (!currentDevice) {
- return;
- }
- // If current device no longer exists, unselect it
- if (devicesModel->rowForDevice(currentDevice->id()) == -1) {
- delete currentDevice;
- currentDevice = nullptr;
- kcmUi.deviceInfo->setVisible(false);
- }
-}
-
-void KdeConnectKcm::renameShow()
-{
- setRenameMode(true);
-}
-
-void KdeConnectKcm::renameDone()
-{
- QString newName = kcmUi.rename_edit->text();
- if (newName.isEmpty()) {
- // Rollback changes
- kcmUi.rename_edit->setText(kcmUi.rename_label->text());
- } else {
- kcmUi.rename_label->setText(newName);
- daemon->setAnnouncedName(newName);
- }
- setRenameMode(false);
-}
-
-void KdeConnectKcm::setRenameMode(bool b)
-{
- kcmUi.renameDone_button->setVisible(b);
- kcmUi.rename_edit->setVisible(b);
- kcmUi.renameShow_button->setVisible(!b);
- kcmUi.rename_label->setVisible(!b);
-}
-
-KdeConnectKcm::~KdeConnectKcm()
-{
-}
-
-void KdeConnectKcm::refresh()
-{
- daemon->forceOnNetworkChange();
-}
-
-void KdeConnectKcm::deviceSelected(const QString &deviceId)
-{
- if (currentDevice) {
- disconnect(currentDevice, nullptr, this, nullptr);
- }
-
- currentDevice = devicesModel->getDevice(devicesModel->rowForDevice(deviceId));
- if (!currentDevice) {
- currentDevice = nullptr;
- kcmUi.deviceInfo->setVisible(false);
- return;
- }
-
- kcmUi.noDevicePlaceholder->setVisible(false);
- bool valid = (currentDevice != nullptr && currentDevice->isValid());
- kcmUi.deviceInfo->setVisible(valid);
- if (!valid) {
- return;
- }
-
- kcmUi.messages->setVisible(false);
- resetDeviceView();
-
- connect(currentDevice, &DeviceDbusInterface::pluginsChanged, this, &KdeConnectKcm::resetCurrentDevice);
- connect(currentDevice, &DeviceDbusInterface::pairingFailed, this, &KdeConnectKcm::pairingFailed);
- connect(currentDevice, &DeviceDbusInterface::pairStateChanged, this, &KdeConnectKcm::setCurrentDevicePairState);
-}
-
-void KdeConnectKcm::resetCurrentDevice()
-{
- const QStringList supportedPluginNames = currentDevice->supportedPlugins();
-
- if (m_oldSupportedPluginNames != supportedPluginNames) {
- resetDeviceView();
- }
-}
-
-void KdeConnectKcm::resetDeviceView()
-{
- kcmUi.name_label->setText(currentDevice->name());
- setWhenAvailable(
- currentDevice->pairStateAsInt(),
- [this](bool error, int pairStateAsInt) {
- if (!error) {
- setCurrentDevicePairState(pairStateAsInt);
- }
- },
- this);
-
- const QVector<KPluginMetaData> pluginInfo = KPluginMetaData::findPlugins(QStringLiteral("kdeconnect"));
- QVector<KPluginMetaData> availablePluginInfo;
-
- m_oldSupportedPluginNames = currentDevice->supportedPlugins();
- for (auto it = pluginInfo.cbegin(), itEnd = pluginInfo.cend(); it != itEnd; ++it) {
- if (m_oldSupportedPluginNames.contains(it->pluginId())) {
- availablePluginInfo.append(*it);
- }
- }
-
- KSharedConfigPtr deviceConfig = KSharedConfig::openConfig(currentDevice->pluginsConfigFile());
- kcmUi.pluginSelector->clear();
- kcmUi.pluginSelector->setConfigurationArguments({currentDevice->id()});
- kcmUi.pluginSelector->addPlugins(availablePluginInfo, i18n("Available plugins"));
- kcmUi.pluginSelector->setConfig(deviceConfig->group(QStringLiteral("Plugins")));
-}
-
-void KdeConnectKcm::requestPairing()
-{
- if (!currentDevice) {
- return;
- }
-
- kcmUi.messages->hide();
-
- currentDevice->requestPairing();
-}
-
-void KdeConnectKcm::unpair()
-{
- if (!currentDevice) {
- return;
- }
-
- currentDevice->unpair();
-}
-
-void KdeConnectKcm::acceptPairing()
-{
- if (!currentDevice) {
- return;
- }
-
- currentDevice->acceptPairing();
-}
-
-void KdeConnectKcm::cancelPairing()
-{
- if (!currentDevice) {
- return;
- }
-
- currentDevice->cancelPairing();
-}
-
-void KdeConnectKcm::pairingFailed(const QString &error)
-{
- if (sender() != currentDevice)
- return;
-
- kcmUi.messages->setText(i18n("Error trying to pair: %1", error));
- kcmUi.messages->animatedShow();
-}
-
-void KdeConnectKcm::setCurrentDevicePairState(int pairStateAsInt)
-{
- PairState state = (PairState)pairStateAsInt; // Hack because qdbus doesn't like enums
- kcmUi.accept_button->setVisible(state == PairState::RequestedByPeer);
- kcmUi.reject_button->setVisible(state == PairState::RequestedByPeer);
- kcmUi.cancel_button->setVisible(state == PairState::Requested);
- kcmUi.pair_button->setVisible(state == PairState::NotPaired);
- kcmUi.unpair_button->setVisible(state == PairState::Paired);
- kcmUi.progressBar->setVisible(state == PairState::Requested);
- kcmUi.ping_button->setVisible(state == PairState::Paired);
- kcmUi.verificationKey->setVisible(state == PairState::Requested || state == PairState::RequestedByPeer);
- switch (state) {
- case PairState::Paired:
- kcmUi.status_label->setText(i18n("(paired)"));
- break;
- case PairState::NotPaired:
- kcmUi.status_label->setText(i18n("(not paired)"));
- break;
- case PairState::RequestedByPeer:
- kcmUi.status_label->setText(i18n("(incoming pair request)"));
- kcmUi.verificationKey->setText(i18n("Key: %1", currentDevice->verificationKey()));
- break;
- case PairState::Requested:
- kcmUi.status_label->setText(i18n("(pairing requested)"));
- kcmUi.verificationKey->setText(i18n("Key: %1", currentDevice->verificationKey()));
- break;
- }
-}
-
-void KdeConnectKcm::pluginsConfigChanged(bool changed)
-{
- if (!changed)
- return;
-
- if (!currentDevice)
- return;
-
- kcmUi.pluginSelector->save();
- currentDevice->reloadPlugins();
-}
-
-void KdeConnectKcm::save()
-{
- KCModule::save();
-}
-
-void KdeConnectKcm::sendPing()
-{
- if (!currentDevice)
- return;
- currentDevice->pluginCall(QStringLiteral("ping"), QStringLiteral("sendPing"));
-}
-
-#include "kcm.moc"
-#include "moc_kcm.cpp"
diff --git a/kcm/kcm.h b/kcm/kcm.h
deleted file mode 100644
index 08398b5da..000000000
--- a/kcm/kcm.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka at gmail.com>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#pragma once
-
-#include <KCModule>
-#include <QStandardItemModel>
-#include <kconfigwidgets_version.h>
-
-#include "ui_kcm.h"
-#include <core/pairstate.h>
-
-class QModelIndex;
-class DeviceDbusInterface;
-class DaemonDbusInterface;
-class DevicesModel;
-class DevicesSortProxyModel;
-
-class KdeConnectKcm : public KCModule
-{
- Q_OBJECT
-public:
- KdeConnectKcm(QObject *parent, const KPluginMetaData &md, const QVariantList &args);
- ~KdeConnectKcm() override;
-
-private:
- void save() override;
-
-private Q_SLOTS:
- void deviceSelected(const QString &deviceId);
- void requestPairing();
- void pluginsConfigChanged(bool changed);
- void sendPing();
- void pairingFailed(const QString &error);
- void refresh();
- void renameShow();
- void renameDone();
- void setRenameMode(bool b);
- void resetCurrentDevice();
- void setCurrentDevicePairState(int pairStateAsInt);
- void acceptPairing();
- void cancelPairing();
- void devicesRemoved();
-
-private:
- void resetDeviceView();
-
- Ui::KdeConnectKcmUi kcmUi;
- DaemonDbusInterface *daemon;
- DevicesModel *devicesModel;
- DevicesSortProxyModel *sortProxyModel;
- DeviceDbusInterface *currentDevice;
- QStringList m_oldSupportedPluginNames;
-
-public Q_SLOTS:
- void unpair();
-};
diff --git a/kcm/kcm.ui b/kcm/kcm.ui
deleted file mode 100644
index ab0032eaa..000000000
--- a/kcm/kcm.ui
+++ /dev/null
@@ -1,452 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>KdeConnectKcmUi</class>
- <widget class="QWidget" name="KdeConnectKcmUi">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>1130</width>
- <height>740</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QWidget" name="widget" native="true">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>250</width>
- <height>16777215</height>
- </size>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <layout class="QHBoxLayout" name="rename_group_2">
- <item>
- <widget class="QLabel" name="rename_label">
- <property name="font">
- <font>
- <pointsize>12</pointsize>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>KDE Connect</string>
- </property>
- <property name="textFormat">
- <enum>Qt::TextFormat::PlainText</enum>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Orientation::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QToolButton" name="renameShow_button">
- <property name="text">
- <string>Edit</string>
- </property>
- <property name="icon">
- <iconset theme="edit-rename"/>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="rename_group">
- <item>
- <widget class="QLineEdit" name="rename_edit">
- <property name="maxLength">
- <number>64</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="renameDone_button">
- <property name="text">
- <string>Save</string>
- </property>
- <property name="icon">
- <iconset theme="dialog-ok"/>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QQuickWidget" name="list_quick_widget">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="resizeMode">
- <enum>QQuickWidget::ResizeMode::SizeRootObjectToView</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="refresh_button">
- <property name="text">
- <string>Refresh</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="linkProviders_label">
- <property name="text">
- <string>Backends:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QListWidget" name="linkProviders_list">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="deviceInfoBorder">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <layout class="QVBoxLayout" name="deviceInfoBorder_layout">
- <item>
- <widget class="QWidget" name="deviceInfo" native="true">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <layout class="QVBoxLayout" name="deviceInfo_layout">
- <item>
- <widget class="QWidget" name="header_2" native="true">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <layout class="QHBoxLayout" name="header">
- <property name="sizeConstraint">
- <enum>QLayout::SizeConstraint::SetMaximumSize</enum>
- </property>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QWidget" name="deviceAndStatus" native="true">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <layout class="QHBoxLayout" name="deviceAndStatus_layout">
- <property name="spacing">
- <number>6</number>
- </property>
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QLabel" name="name_label">
- <property name="font">
- <font>
- <pointsize>10</pointsize>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Device</string>
- </property>
- <property name="textFormat">
- <enum>Qt::TextFormat::PlainText</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="status_label">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>(status)</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Orientation::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="KSqueezedTextLabel" name="verificationKey">
- <property name="text">
- <string>KSqueezedTextLabel</string>
- </property>
- <property name="textInteractionFlags">
- <set>Qt::TextInteractionFlag::LinksAccessibleByMouse|Qt::TextInteractionFlag::TextSelectableByMouse</set>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Orientation::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="cancel_button">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Cancel</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QProgressBar" name="progressBar">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimum">
- <number>0</number>
- </property>
- <property name="maximum">
- <number>0</number>
- </property>
- <property name="value">
- <number>-1</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="accept_button">
- <property name="text">
- <string>Accept</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="reject_button">
- <property name="text">
- <string>Reject</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="pair_button">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Request pairing</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="unpair_button">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Unpair</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="ping_button">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Send ping</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="KMessageWidget" name="messages"/>
- </item>
- <item>
- <widget class="KPluginWidget" name="pluginSelector" native="true">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>Qt::FocusPolicy::WheelFocus</enum>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QWidget" name="noDevicePlaceholder" native="true">
- <layout class="QVBoxLayout" name="noDevicePlaceholder_layout">
- <item>
- <widget class="QLabel" name="noDeviceLinks">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
[suppressed due to size limit]
- </property>
- <property name="textFormat">
- <enum>Qt::TextFormat::RichText</enum>
- </property>
- <property name="alignment">
- <set>Qt::AlignmentFlag::AlignCenter</set>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- <property name="margin">
- <number>40</number>
- </property>
- <property name="openExternalLinks">
- <bool>true</bool>
- </property>
- <property name="textInteractionFlags">
- <set>Qt::TextInteractionFlag::LinksAccessibleByKeyboard|Qt::TextInteractionFlag::LinksAccessibleByMouse</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>KMessageWidget</class>
- <extends>QFrame</extends>
- <header>kmessagewidget.h</header>
- <container>1</container>
- </customwidget>
- <customwidget>
- <class>KSqueezedTextLabel</class>
- <extends>QLabel</extends>
- <header>ksqueezedtextlabel.h</header>
- </customwidget>
- <customwidget>
- <class>QQuickWidget</class>
- <extends>QWidget</extends>
- <header location="global">QtQuickWidgets/QQuickWidget</header>
- </customwidget>
- <customwidget>
- <class>KPluginWidget</class>
- <extends>QWidget</extends>
- <header>kpluginwidget.h</header>
- <container>1</container>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/kcm/kcm_kdeconnect.json b/kcm/kcm_kdeconnect.json
deleted file mode 100644
index e67d5c9c8..000000000
--- a/kcm/kcm_kdeconnect.json
+++ /dev/null
@@ -1,129 +0,0 @@
-{
- "KPlugin": {
- "BugReportUrl": "https://bugs.kde.org/enter_bug.cgi?product=systemsettings&component=kcm_kdeconnect",
- "Description": "Configure device synchronization",
- "Description[ar]": "ضبط مزامنة الجهاز",
- "Description[bg]": "Конфигуриране на синхронизирането на устройствата",
- "Description[ca at valencia]": "Configura la sincronització del dispositiu",
- "Description[ca]": "Configura la sincronització del dispositiu",
- "Description[cs]": "Nastavit synchronizaci zařízení...",
- "Description[de]": "Geräteabgleich einrichten",
- "Description[en_GB]": "Configure device synchronisation",
- "Description[eo]": "Agordi aparatan sinkronigon",
- "Description[es]": "Configurar sincronización de dispositivos",
- "Description[eu]": "Konfiguratu gailuaren sinkronizazioa",
- "Description[fi]": "Laitteiden tahdistuksen asetukset",
- "Description[fr]": "Configurer la synchronisation des périphériques",
- "Description[gl]": "Configurar a sincronización de dispositivos.",
- "Description[he]": "הגדרת סנכרון מכשירים",
- "Description[hu]": "Eszközszinkronizáció beállítása",
- "Description[ia]": "Configura Synchronisation de dispositivo",
- "Description[is]": "Grunnstilla samstillingu tækja",
- "Description[it]": "Configura la sincronizzazione del dispositivo",
- "Description[ka]": "მოწყობილობის სინქრონიზაციის მორგება",
- "Description[ko]": "장치 동기화 설정",
- "Description[lt]": "Konfigūruoti įrenginių sinchronizavimą",
- "Description[lv]": "Konfigurēt ierīces sinhronizāciju",
- "Description[nl]": "Synchronisatie van apparaat configureren",
- "Description[nn]": "Set opp einingssynkronisering",
- "Description[pa]": "ਡਿਵਾਈਸ ਸੈਕਰੋਨਾਈਜ਼ੇਸ਼ਨ ਦੀ ਸੰਰਚਨਾ",
- "Description[pl]": "Ustawienia synchronizacji urządzenia",
- "Description[pt_BR]": "Configurar sincronização do dispositivo",
- "Description[ru]": "Настройка синхронизации устройства",
- "Description[sa]": "उपकरणसमन्वयनं विन्यस्यताम्",
- "Description[sl]": "Konfiguriraj sinhronizacijo naprave",
- "Description[sv]": "Anpassa enhetssynkronisering",
- "Description[ta]": "சாதன ஒத்திசைவு அமைப்புகள்",
- "Description[tr]": "Aygıt eşzamanlamayı yapılandırın",
- "Description[uk]": "Налаштовування синхронізації із пристроями",
- "Description[x-test]": "xxConfigure device synchronizationxx",
- "Description[zh_CN]": "配置设备同步",
- "Description[zh_TW]": "設定裝置同步",
- "Icon": "preferences-kde-connect",
- "Name": "KDE Connect",
- "Name[ar]": "جسر كِيدِي",
- "Name[az]": "KDE Connect",
- "Name[bg]": "KDE Connect",
- "Name[ca at valencia]": "KDE Connect",
- "Name[ca]": "KDE Connect",
- "Name[cs]": "KDE Connect",
- "Name[da]": "KDE Connect",
- "Name[de]": "KDE Connect",
- "Name[en_GB]": "KDE Connect",
- "Name[eo]": "KDE Konekti",
- "Name[es]": "KDE Connect",
- "Name[eu]": "KDE Connect",
- "Name[fi]": "KDE Connect",
- "Name[fr]": "KDEConnect",
- "Name[gl]": "KDE Connect",
- "Name[he]": "KDE Connect",
- "Name[hi]": "केडीई कनेक्ट",
- "Name[hu]": "KDE Connect",
- "Name[ia]": "KDE Connect",
- "Name[is]": "KDE Connect",
- "Name[it]": "KDE Connect",
- "Name[ja]": "KDE Connect",
- "Name[ka]": "KDE Connect",
- "Name[ko]": "KDE Connect",
- "Name[lt]": "KDE Connect",
- "Name[lv]": "KDE Connect",
- "Name[nl]": "KDE Connect",
- "Name[nn]": "KDE Connect",
- "Name[pa]": "KDE ਕਨੈਕਟ",
- "Name[pl]": "KDE Connect",
- "Name[pt]": "KDE Connect",
- "Name[pt_BR]": "KDE Connect",
- "Name[ro]": "KDE Connect",
- "Name[ru]": "KDE Connect",
- "Name[sa]": "KDE Connect इति",
- "Name[sk]": "KDE Connect",
- "Name[sl]": "KDE Connect",
- "Name[sv]": "KDE-anslut",
- "Name[ta]": "கே.டீ.யீ. கனெக்ட்",
- "Name[tr]": "KDE Bağlan",
- "Name[uk]": "KDE Connect",
- "Name[x-test]": "xxKDE Connectxx",
- "Name[zh_CN]": "KDE Connect",
- "Name[zh_TW]": "KDE Connect"
- },
- "X-DocPath": "kdeconnect/index.html",
- "X-KDE-Keywords": "network,kde connect,connect,phone,sync,mobile,android,ios,send files,share files,transfer files,receive files,devices,device,synchronization,calls,telephone,smartphone,contacts,sms,phone notifications,control volume,system volume,ringtone,play sound,presentation,take picture,take photo,shared clipboard,conectivity monitor,remote input,remote mouse,remote keyboard,mpris,phone integration,commands,lock device,multimedia control,sftp,browse phone,share",
- "X-KDE-Keywords[ar]": "هاتف,أندرويد,جهاز,تحكم,وسائط,رن,صوت,متصل,شبكة,جوال,متنقل,اتصل,هاتف ذكي,متراسلون,أخذ صورة,لوحة مفاتيح",
[suppressed due to size limit]
[suppressed due to size limit]
[suppressed due to size limit]
[suppressed due to size limit]
- "X-KDE-Keywords[de]": "Netzwerk,KDE verbinden,verbinden,Handy,mobil,Dateien senden,Dateien teilen,Dateien übertragen,Dateien erhalten,Geräte,Gerät,Synchronisieren,Anrufe,Telefon,Kontakte,Telefonbenachrichtigungen,Lautstärke einrichten,Systemlautstärke,Klingelton,Präsentation,Bild aufnehmen,Foto aufnehmen,geteilte Zwischenablage,Verbindungsüberwachung,entfernte Eingabe,entfernte Maus,entfernte Tastatur,Telefoneinbindung,Befehle,Gerät sperren,Multimediasteuerung,Telefon durchsuchen,teilen",
- "X-KDE-Keywords[en_GB]": "network,kde connect,connect,phone,sync,mobile,android,ios,send files,share files,transfer files,receive files,devices,device,synchronization,calls,telephone,smartphone,contacts,sms,phone notifications,control volume,system volume,ringtone,play sound,presentation,take picture,take photo,shared clipboard,conectivity monitor,remote input,remote mouse,remote keyboard,mpris,phone integration,commands,lock device,multimedia control,sftp,browse phone,share",
[suppressed due to size limit]
[suppressed due to size limit]
[suppressed due to size limit]
[suppressed due to size limit]
[suppressed due to size limit]
[suppressed due to size limit]
- "X-KDE-Keywords[he]": "רשת,kde connect,התחברות,קישור,התקשרות,טלפון, סנכרון, שליחת קבצים,שיתוף קבצים,העברת קבצים,התקנים, סנכרון,שיחות,טלפון,טלפון חכם,סלולרי,מסרון,sms,התראות בטלפון,שליטה בעוצמת השמע,ווליום,עוצמת שמע המערכת,צלצול,רינגטון,השמעת צליל,מצגת,צילום תמונה,לוח גזירים משותף,צג חיבור,מד חיבור,קלט מרוחק,עכבר מרוחק,מקלדת מרוחקת,mpris,שילוב עם טלפון,פקודות,נעילת מסך,בקרת מדיה,שליטה על מדיה,sftp,עיון בטלפון,שיתוף",
[suppressed due to size limit]
- "X-KDE-Keywords[ia]": "network,kde connect,connect,phone,sync,mobile,android,ios,send files,share files,transfer files,receive files,devices,device,synchronization,calls,telephone,smartphone,contacts,sms,phone notifications,control volume,system volume,ringtone,play sound,presentation,take picture,take photo,shared clipboard,conectivity monitor,remote input,remote mouse,remote keyboard,mpris,phone integration,commands,lock device,multimedia control,sftp,browse phone,share",
- "X-KDE-Keywords[is]": "net,kde connect,tengja,sími,samstilling,farsími,android,ios,senda skrár,deila skrám,flytja skrár,taka við skrám,tæki,samstilla,hringingar,snjalltæki,tengiliðir,sms,tilkynningar,hljóðstilling,hljóðstyrkur,hringitónn,hljóðspilun,kynning,taka mynd,myndataka,deila klippispjaldi,tengivöktun,fjarinnsláttur,fjartengd mús,fjartengt lyklaborð,mpris,samþætting síma,skipanir,læsa tæki,margmiðlunarstýring,sftp,vafra á síma,deila",
[suppressed due to size limit]
[suppressed due to size limit]
- "X-KDE-Keywords[ko]": "네트워크,연결,폰,휴대폰,동기화,모바일,안드로이드,파일 보내기,파일 전송,파일 공유,파일 받기,파일 수신,장치,동기화,통화,스마트폰,연락처,문자 메시지,알림,휴대폰 알림,음량,볼륨,클립보드,벨소리,프레젠테이션,사진 찍기,클립보드 공유,원격 입력,원격 마우스,원격 키보드,휴대폰 통합,명령,장치 잠금,멀티미디어 제외,휴대폰 탐색,공유",
[suppressed due to size limit]
[suppressed due to size limit]
[suppressed due to size limit]
[suppressed due to size limit]
[suppressed due to size limit]
[suppressed due to size limit]
[suppressed due to size limit]
- "X-KDE-Keywords[sa]": "नेटवर्क,kde कनेक्ट,कनेक्ट,फोन,सिंक,मोबाइल,एंड्रॉयड,ios,सञ्चिकाः प्रेषयन्तु,सञ्चिकाः साझां कुर्वन्तु,सञ्चिकाः स्थानान्तरयन्तु,सञ्चिकाः,उपकरणाः,यन्त्रं,समन्वयन,कॉल,दूरभाष,स्मार्टफोन,संपर्क,sms,फोनसूचना,नियंत्रण मात्रा ,प्रणाली मात्रा,रिंगटोन,वादन ध्वनि,प्रस्तुति,चित्र लेना,फोटो लेना,साझा क्लिपबोर्ड,संपर्कता मॉनिटर,दूरस्थ इनपुट,दूरस्थ माउस,दूरस्थ कीबोर्ड,mpris,फोन एकीकरण,आदेश,लॉक उपकरण,मल्टीमीडिया नियंत्रण,sftp,फोन ब्राउज़ करें,साझा करें",
[suppressed due to size limit]
- "X-KDE-Keywords[sv]": "nätverk,kde anslut,anslut,telefon,synkronisera,mobil,android,ios,skicka filer,dela filer,överför filer,ta emot filer,apparater,apparat,synkronisering,samtal,telefon,smart telefon,kontakter,sms,telefonunderrättelser,kontrollera volym,systemvolym,rington,spela ljud,presentation,ta bild,ta foto,delat klippbord,anslutningsövervakare,fjärrinmatning,fjärrmus,fjärrtangentbord,mpris,telefonintegrering,kommandon,lås apparat,multimediastyrning,sftp,bläddra på telefon,dela",
[suppressed due to size limit]
[suppressed due to size limit]
[suppressed due to size limit]
[suppressed due to size limit]
[suppressed due to size limit]
- "X-KDE-Keywords[zh_TW]": "網路,網絡,kde 連線,連線,連接,同步,手機,傳送檔案,分享檔案,傳輸檔案,接收檔案,裝置,電話,打電話,聯絡人,簡訊,手機通知,控制音量,系統音量,鈴聲,播放聲音,簡報,拍照,分享剪貼簿,連線狀態監控,遠端輸入,遠端滑鼠,遠端鍵盤,手機整合,指令,命令,鎖定裝置,多媒體控制,瀏覽手機,分享,kde connect",
- "X-KDE-System-Settings-Parent-Category": "hardware",
- "X-KDE-Weight": 60
-}
diff --git a/kcm/list.qml b/kcm/list.qml
deleted file mode 100644
index fe660f8cb..000000000
--- a/kcm/list.qml
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2016 Aleix Pol Gonzalez <aleixpol at kde.org>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-import QtQuick
-import QtQuick.Controls
-import QtQuick.Layouts
-import org.kde.kirigami as Kirigami
-import org.kde.kdeconnect
-
-ScrollView {
- id: root
-
- focus: true
-
- signal clicked(string device)
-
- property string currentDeviceId
-
- property alias model: devices.model
-
- Kirigami.Theme.colorSet: Kirigami.Theme.View
- Kirigami.Theme.inherit: false
-
- background: Rectangle {
- color: Kirigami.Theme.backgroundColor
- radius: Kirigami.Units.cornerRadius
-
- border.color: Kirigami.ColorUtils.linearInterpolation(
- Kirigami.Theme.backgroundColor,
- Kirigami.Theme.textColor,
- Kirigami.Theme.frameContrast
- )
- }
-
- ListView {
- id: devices
-
- focus: true
-
- section {
- property: "status"
- delegate: Kirigami.ListSectionHeader {
-
- width: ListView.view.width
-
- text: switch (parseInt(section))
- {
- case DevicesModel.Paired:
- return i18nd("kdeconnect-kcm", "Remembered")
- case DevicesModel.Reachable:
- return i18nd("kdeconnect-kcm", "Available")
- case (DevicesModel.Reachable | DevicesModel.Paired):
- return i18nd("kdeconnect-kcm", "Connected")
- }
- }
- }
- Kirigami.PlaceholderMessage {
- text: i18nd("kdeconnect-kcm", "No devices found")
- icon.name: 'edit-none-symbolic'
- anchors.centerIn: parent
- width: parent.width - (Kirigami.Units.largeSpacing * 4)
- visible: devices.count === 0
- }
-
- delegate: ItemDelegate {
- id: delegate
- icon.name: iconName
- text: model.name
- width: ListView.view.width
-
- focus: true
-
- contentItem: Kirigami.IconTitleSubtitle {
- title: delegate.text
- subtitle: toolTip
- icon: icon.fromControlsIcon(delegate.icon)
- }
-
- onClicked: {
- root.currentDeviceId = deviceId
- root.clicked(deviceId)
- }
- }
- }
-}
diff --git a/kcmplugin/CMakeLists.txt b/kcmplugin/CMakeLists.txt
deleted file mode 100644
index cac362b27..000000000
--- a/kcmplugin/CMakeLists.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-add_definitions(-DTRANSLATION_DOMAIN=\"kdeconnect-core\")
-
-add_library(kdeconnectpluginkcm kdeconnectpluginkcm.cpp)
-target_link_libraries(kdeconnectpluginkcm
-PUBLIC
- kdeconnectcore
- KF6::KCMUtils
-PRIVATE
- Qt::DBus
- Qt::Gui
- KF6::I18n
- KF6::ConfigCore
-)
-
-set_target_properties(kdeconnectpluginkcm PROPERTIES
- VERSION ${KDECONNECT_VERSION}
- SOVERSION ${KDECONNECT_VERSION_MAJOR}
-)
-
-generate_export_header(kdeconnectpluginkcm EXPORT_FILE_NAME kdeconnectpluginkcm_export.h BASE_NAME kdeconnectpluginkcm)
-
-# Remove NAMELINK_SKIP if/when headers are being installed and the library becomes public.
-install(TARGETS kdeconnectpluginkcm EXPORT kdeconnectLibraryTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
diff --git a/kcmplugin/kdeconnectpluginkcm.cpp b/kcmplugin/kdeconnectpluginkcm.cpp
deleted file mode 100644
index 049f7a539..000000000
--- a/kcmplugin/kdeconnectpluginkcm.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka at gmail.com>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#include "kdeconnectpluginkcm.h"
-
-KdeConnectPluginKcm::KdeConnectPluginKcm(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
- : KCModule(parent)
- , m_deviceId(args.at(0).toString())
- // The plugin name is the KCMs ID with the postfix removed
- , m_config(new KdeConnectPluginConfig(m_deviceId, data.pluginId().remove(QLatin1String("_config")), this))
-{
- Q_ASSERT(data.isValid()); // Even if we have empty metadata, it should be valid!
-}
-
-#include "moc_kdeconnectpluginkcm.cpp"
diff --git a/kcmplugin/kdeconnectpluginkcm.h b/kcmplugin/kdeconnectpluginkcm.h
deleted file mode 100644
index 6f6bb1120..000000000
--- a/kcmplugin/kdeconnectpluginkcm.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2015 Albert Vaca <albertvaka at gmail.com>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#pragma once
-
-#include <KCModule>
-#include <KPluginMetaData> // Not in KCModule header of older KF5 versions
-#include <kconfigwidgets_version.h>
-
-#include "core/kdeconnectpluginconfig.h"
-#include "kdeconnectpluginkcm_export.h"
-
-/**
- * Inheriting your plugin's KCM from this class gets you a easy way to share
- * configuration values between the KCM and the plugin.
- */
-class KDECONNECTPLUGINKCM_EXPORT KdeConnectPluginKcm : public KCModule
-{
- Q_OBJECT
-
-public:
- explicit KdeConnectPluginKcm(QObject *parent, const KPluginMetaData &data, const QVariantList &args);
-
- /**
- * The device this kcm is instantiated for
- */
- QString deviceId() const
- {
- return m_deviceId;
- }
-
- /**
- * The object where to save the config, so the plugin can access it
- */
- KdeConnectPluginConfig *config() const
- {
- return m_config;
- }
-
-private:
- const QString m_deviceId;
- const QString m_pluginName;
- KdeConnectPluginConfig *const m_config;
-};
diff --git a/plasmoid/package/contents/ui/FullRepresentation.qml b/plasmoid/package/contents/ui/FullRepresentation.qml
index b4efce81d..d10833201 100644
--- a/plasmoid/package/contents/ui/FullRepresentation.qml
+++ b/plasmoid/package/contents/ui/FullRepresentation.qml
@@ -12,7 +12,6 @@ import QtQuick.Controls as QQC2
import QtQuick.Layouts
import org.kde.config as KConfig
-import org.kde.kcmutils as KCMUtils
import org.kde.kdeconnect as KDEConnect
import org.kde.kirigami as Kirigami
import org.kde.plasma.components as PlasmaComponents3
@@ -70,8 +69,8 @@ PlasmaExtras.Representation {
helpfulAction: QQC2.Action {
text: i18n("Pair a Device…")
icon.name: "list-add"
- onTriggered: KCMUtils.KCMLauncher.openSystemSettings("kcm_kdeconnect")
- enabled: pairedDevicesModel.count === 0 && KConfig.KAuthorized.authorizeControlModule("kcm_kdeconnect")
+ onTriggered: KDEConnect.OpenConfig.openConfiguration()
+ enabled: pairedDevicesModel.count === 0
}
PlasmaComponents3.Button {
diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml
index 8ac2d87cf..a1e930cea 100644
--- a/plasmoid/package/contents/ui/main.qml
+++ b/plasmoid/package/contents/ui/main.qml
@@ -10,7 +10,6 @@ pragma ComponentBehavior: Bound
import QtQuick
import org.kde.config as KConfig
-import org.kde.kcmutils as KCMUtils
import org.kde.kdeconnect as KDEConnect
import org.kde.kquickcontrolsaddons as KQuickControlsAddons
import org.kde.plasma.core as PlasmaCore
@@ -54,10 +53,7 @@ PlasmoidItem {
id: configureAction
text: i18n("KDE Connect Settings…")
icon.name: "configure"
- visible: KConfig.KAuthorized.authorizeControlModule("kcm_kdeconnect")
- onTriggered: checked => {
- KCMUtils.KCMLauncher.openSystemSettings("kcm_kdeconnect");
- }
+ onTriggered: KDEConnect.OpenConfig.openConfiguration()
}
Component.onCompleted: {
diff --git a/plasmoid/package/metadata.json b/plasmoid/package/metadata.json
index 76b70e002..ad8914d29 100644
--- a/plasmoid/package/metadata.json
+++ b/plasmoid/package/metadata.json
@@ -142,9 +142,6 @@
},
"X-Plasma-API": "declarativeappletscript",
"X-Plasma-API-Minimum-Version": "6.0",
- "X-Plasma-ConfigPlugins": [
- "kcm_kdeconnect"
- ],
"X-Plasma-MainScript": "ui/main.qml",
"X-Plasma-NotificationArea": "true",
"X-Plasma-NotificationAreaCategory": "Hardware"
diff --git a/plugins/clipboard/CMakeLists.txt b/plugins/clipboard/CMakeLists.txt
index 55db55764..4bde38fd7 100644
--- a/plugins/clipboard/CMakeLists.txt
+++ b/plugins/clipboard/CMakeLists.txt
@@ -6,11 +6,4 @@ target_link_libraries(kdeconnect_clipboard kdeconnectcore
${kdeconnect_clipboard_WL_LINK_LIBS}
)
-kdeconnect_add_kcm(kdeconnect_clipboard_config SOURCES clipboard_config.cpp)
-ki18n_wrap_ui(kdeconnect_clipboard_config clipboard_config.ui)
-target_link_libraries(kdeconnect_clipboard_config
- kdeconnectcore
- kdeconnectpluginkcm
- KF6::I18n
- KF6::KCMUtils
-)
+install(FILES "kdeconnect_clipboard_config.qml" DESTINATION ${KDE_INSTALL_DATADIR}/kdeconnect)
diff --git a/plugins/clipboard/clipboard_config.cpp b/plugins/clipboard/clipboard_config.cpp
deleted file mode 100644
index 84c9e50b1..000000000
--- a/plugins/clipboard/clipboard_config.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2022 Yuchen Shi <bolshaya_schists at mail.gravitide.co>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#include "clipboard_config.h"
-
-#include <KPluginFactory>
-#include <QSpinBox>
-#include <QStringLiteral>
-
-K_PLUGIN_CLASS(ClipboardConfig)
-
-ClipboardConfig::ClipboardConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
- : KdeConnectPluginKcm(parent, data, args)
-{
- m_ui.setupUi(widget());
-
- connect(m_ui.check_autoshare, &QCheckBox::toggled, this, &ClipboardConfig::autoShareChanged);
- connect(m_ui.check_password, &QCheckBox::toggled, this, &ClipboardConfig::markAsChanged);
- connect(m_ui.spinBox_max_clipboard_size, &QSpinBox::valueChanged, this, &ClipboardConfig::maxClipboardSizeChanged);
-}
-
-void ClipboardConfig::autoShareChanged()
-{
- m_ui.check_password->setEnabled(m_ui.check_autoshare->isChecked());
- markAsChanged();
-}
-
-void ClipboardConfig::maxClipboardSizeChanged(int value)
-{
- m_ui.spinBox_max_clipboard_size->setValue(value);
- markAsChanged();
-}
-
-void ClipboardConfig::defaults()
-{
- KCModule::defaults();
- m_ui.check_autoshare->setChecked(true);
- m_ui.check_password->setChecked(true);
- m_ui.spinBox_max_clipboard_size->setValue(50);
- markAsChanged();
-}
-
-void ClipboardConfig::load()
-{
- KCModule::load();
- // "sendUnknown" is the legacy name for this setting
- bool autoShare = config()->getBool(QStringLiteral("autoShare"), config()->getBool(QStringLiteral("sendUnknown"), true));
- bool password = config()->getBool(QStringLiteral("sendPassword"), true);
- int maxClipboardFileSizeMB = config()->getInt(QStringLiteral("maxClipboardFileSizeMB"), 50);
- m_ui.check_autoshare->setChecked(autoShare);
- m_ui.check_password->setChecked(password);
- m_ui.spinBox_max_clipboard_size->setValue(maxClipboardFileSizeMB);
- autoShareChanged();
-}
-
-void ClipboardConfig::save()
-{
- config()->set(QStringLiteral("autoShare"), m_ui.check_autoshare->isChecked());
- config()->set(QStringLiteral("sendPassword"), m_ui.check_password->isChecked());
- config()->set(QStringLiteral("maxClipboardFileSizeMB"), m_ui.spinBox_max_clipboard_size->value());
- KCModule::save();
-}
-
-#include "clipboard_config.moc"
-#include "moc_clipboard_config.cpp"
diff --git a/plugins/clipboard/clipboard_config.h b/plugins/clipboard/clipboard_config.h
deleted file mode 100644
index 062528e95..000000000
--- a/plugins/clipboard/clipboard_config.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2022 Yuchen Shi <bolshaya_schists at mail.gravitide.co>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#pragma once
-
-#include "kcmplugin/kdeconnectpluginkcm.h"
-#include "ui_clipboard_config.h"
-
-class ClipboardConfig : public KdeConnectPluginKcm
-{
- Q_OBJECT
-public:
- ClipboardConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &);
-
- void save() override;
- void load() override;
- void defaults() override;
-
-private:
- void autoShareChanged();
- void maxClipboardSizeChanged(int value);
-
- Ui::ClipboardConfigUi m_ui;
-};
diff --git a/plugins/clipboard/clipboard_config.ui b/plugins/clipboard/clipboard_config.ui
deleted file mode 100644
index 91ca391a4..000000000
--- a/plugins/clipboard/clipboard_config.ui
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>ClipboardConfigUi</class>
- <widget class="QWidget" name="ClipboardConfigUi">
- <property name="windowModality">
- <enum>Qt::WindowModal</enum>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>368</width>
- <height>241</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Clipboard plugin</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_1">
- <property name="spacing">
- <number>20</number>
- </property>
- <item>
- <widget class="QGroupBox" name="groupBox_1">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title">
- <string>Automatic synchronization</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QCheckBox" name="check_autoshare">
- <property name="text">
- <string>Automatically share the clipboard from this device</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="check_password">
- <property name="text">
- <string>Including passwords (as marked by password managers)</string>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_clipboard_size">
- <item>
- <widget class="QSpinBox" name="spinBox_max_clipboard_size">
- <property name="minimum">
- <number>0</number>
- </property>
- <property name="maximum">
- <number>1000000</number>
- </property>
- <property name="value">
- <number>50</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_max_clipboard_size">
- <property name="text">
- <string>Max Clipboard File Size (MB)</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <resources />
- <connections />
-</ui>
diff --git a/plugins/clipboard/kdeconnect_clipboard.json b/plugins/clipboard/kdeconnect_clipboard.json
index e2dbde06a..71d3fccab 100644
--- a/plugins/clipboard/kdeconnect_clipboard.json
+++ b/plugins/clipboard/kdeconnect_clipboard.json
@@ -158,7 +158,6 @@
"Name[zh_CN]": "剪切板",
"Name[zh_TW]": "剪貼簿"
},
- "X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_clipboard_config",
"X-KdeConnect-OutgoingPacketType": [
"kdeconnect.clipboard",
"kdeconnect.clipboard.connect",
diff --git a/plugins/findthisdevice/CMakeLists.txt b/plugins/findthisdevice/CMakeLists.txt
index b5fa1abd8..c15eb089a 100644
--- a/plugins/findthisdevice/CMakeLists.txt
+++ b/plugins/findthisdevice/CMakeLists.txt
@@ -30,18 +30,3 @@ if (NOT WIN32)
KF6::PulseAudioQt
)
endif()
-
-# Target kdeconnect_findthisdevice_config
-
-kdeconnect_add_kcm(kdeconnect_findthisdevice_config SOURCES findthisdevice_config.cpp findthisdevicehelper.cpp)
-
-ki18n_wrap_ui(kdeconnect_findthisdevice_config findthisdevice_config.ui)
-target_link_libraries(kdeconnect_findthisdevice_config
- kdeconnectpluginkcm
- Qt::Multimedia
- Qt::Qml
- KF6::I18n
- KF6::CoreAddons
- KF6::ConfigWidgets
- KF6::KIOWidgets # KUrlRequester
-)
diff --git a/plugins/findthisdevice/findthisdevice_config.cpp b/plugins/findthisdevice/findthisdevice_config.cpp
deleted file mode 100644
index 7bdf38988..000000000
--- a/plugins/findthisdevice/findthisdevice_config.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2018 Friedrich W. H. Kossebau <kossebau at kde.org>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#include "findthisdevice_config.h"
-#include "findthisdevicehelper.h"
-#include "findthisdeviceplugin.h"
-
-// KF
-#include <KLocalizedString>
-#include <KPluginFactory>
-// Qt
-#include <QMediaPlayer>
-#include <QStandardPaths>
-
-#include <QAudioOutput>
-
-K_PLUGIN_CLASS(FindThisDeviceConfig)
-
-FindThisDeviceConfig::FindThisDeviceConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
- : KdeConnectPluginKcm(parent, data, args)
-{
- m_ui.setupUi(widget());
-
- const QStringList soundDirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("sounds"), QStandardPaths::LocateDirectory);
- if (!soundDirs.isEmpty()) {
- m_ui.soundFileRequester->setStartDir(QUrl::fromLocalFile(soundDirs.last()));
- }
-
- connect(m_ui.playSoundButton, &QToolButton::clicked, this, [this]() {
- if (const QUrl soundUrl = m_ui.soundFileRequester->url(); soundUrl.isValid()) {
- playSound(soundUrl);
- }
- });
- connect(m_ui.soundFileRequester, &KUrlRequester::textChanged, this, &FindThisDeviceConfig::markAsChanged);
-}
-
-void FindThisDeviceConfig::defaults()
-{
- KCModule::defaults();
-
- m_ui.soundFileRequester->setText(FindThisDeviceHelper::defaultSound());
- markAsChanged();
-}
-
-void FindThisDeviceConfig::load()
-{
- KCModule::load();
-
- const QString ringTone = config()->getString(QStringLiteral("ringtone"), FindThisDeviceHelper::defaultSound());
- m_ui.soundFileRequester->setText(ringTone);
-}
-
-void FindThisDeviceConfig::save()
-{
- config()->set(QStringLiteral("ringtone"), m_ui.soundFileRequester->text());
-
- KCModule::save();
-}
-
-void FindThisDeviceConfig::playSound(const QUrl &soundUrl)
-{
- QMediaPlayer *player = new QMediaPlayer;
- auto audioOutput = new QAudioOutput();
- audioOutput->setVolume(100);
- player->setSource(soundUrl);
- player->setAudioOutput(audioOutput);
- player->play();
- connect(player, &QMediaPlayer::playingChanged, player, &QObject::deleteLater);
-}
-
-#include "findthisdevice_config.moc"
-#include "moc_findthisdevice_config.cpp"
diff --git a/plugins/findthisdevice/findthisdevice_config.h b/plugins/findthisdevice/findthisdevice_config.h
deleted file mode 100644
index 83aba4a63..000000000
--- a/plugins/findthisdevice/findthisdevice_config.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2018 Friedrich W. H. Kossebau <kossebau at kde.org>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#pragma once
-
-#include "ui_findthisdevice_config.h"
-#include <kcmplugin/kdeconnectpluginkcm.h>
-
-class FindThisDeviceConfig : public KdeConnectPluginKcm
-{
- Q_OBJECT
-public:
- FindThisDeviceConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &);
-
- void save() override;
- void load() override;
- void defaults() override;
-
-private:
- void playSound(const QUrl &soundUrl);
- Ui::FindThisDeviceConfigUi m_ui;
-};
diff --git a/plugins/findthisdevice/findthisdevice_config.ui b/plugins/findthisdevice/findthisdevice_config.ui
deleted file mode 100644
index ef09e9336..000000000
--- a/plugins/findthisdevice/findthisdevice_config.ui
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>FindThisDeviceConfigUi</class>
- <widget class="QWidget" name="FindThisDeviceConfigUi">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>569</width>
- <height>140</height>
- </rect>
- </property>
- <layout class="QVBoxLayout">
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>Discovery Utilities</string>
- </property>
- <layout class="QVBoxLayout">
- <item>
- <layout class="QHBoxLayout">
- <item>
- <widget class="QLabel">
- <property name="text">
- <string>Sound to play:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="playSoundButton">
- <property name="icon">
- <iconset theme="media-playback-start"/>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KUrlRequester" name="soundFileRequester">
- <property name="toolTip">
- <string>Select the sound to play</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>KUrlRequester</class>
- <extends>QWidget</extends>
- <header>kurlrequester.h</header>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/plugins/findthisdevice/kdeconnect_findthisdevice.json b/plugins/findthisdevice/kdeconnect_findthisdevice.json
index 56223a3b2..5576bbab9 100644
--- a/plugins/findthisdevice/kdeconnect_findthisdevice.json
+++ b/plugins/findthisdevice/kdeconnect_findthisdevice.json
@@ -154,7 +154,6 @@
"Name[zh_CN]": "查找此设备",
"Name[zh_TW]": "尋找這個裝置"
},
- "X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_findthisdevice_config",
"X-KdeConnect-OutgoingPacketType": [],
"X-KdeConnect-SupportedPacketType": [
"kdeconnect.findmyphone.request"
diff --git a/plugins/kdeconnect.schema.json b/plugins/kdeconnect.schema.json
index 9a084f893..b3b4780ff 100644
--- a/plugins/kdeconnect.schema.json
+++ b/plugins/kdeconnect.schema.json
@@ -36,10 +36,6 @@
"items": {
"type": "string"
}
- },
- "X-KDE-ConfigModule": {
- "type": "string",
- "pattern": "^kdeconnect/kcms/[^/]+$"
}
}
}
diff --git a/plugins/pausemusic/CMakeLists.txt b/plugins/pausemusic/CMakeLists.txt
index d57829fda..7b124086f 100644
--- a/plugins/pausemusic/CMakeLists.txt
+++ b/plugins/pausemusic/CMakeLists.txt
@@ -18,15 +18,4 @@ else()
target_link_libraries(kdeconnect_pausemusic KF6::PulseAudioQt)
endif()
-#######################################
-# Config
-
-kdeconnect_add_kcm(kdeconnect_pausemusic_config SOURCES pausemusic_config.cpp)
-
-ki18n_wrap_ui(kdeconnect_pausemusic_config pausemusic_config.ui)
-target_link_libraries(kdeconnect_pausemusic_config
- kdeconnectcore
- kdeconnectpluginkcm
- KF6::I18n
- KF6::KCMUtils
-)
+install(FILES "kdeconnect_pausemusic_config.qml" DESTINATION ${KDE_INSTALL_DATADIR}/kdeconnect)
diff --git a/plugins/pausemusic/kdeconnect_pausemusic.json b/plugins/pausemusic/kdeconnect_pausemusic.json
index 04691b132..febf42b0d 100644
--- a/plugins/pausemusic/kdeconnect_pausemusic.json
+++ b/plugins/pausemusic/kdeconnect_pausemusic.json
@@ -157,7 +157,6 @@
"Name[zh_CN]": "来电时暂停媒体",
"Name[zh_TW]": "在通話過程中暫停媒體"
},
- "X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_pausemusic_config",
"X-KdeConnect-OutgoingPacketType": [],
"X-KdeConnect-SupportedPacketType": [
"kdeconnect.telephony"
diff --git a/plugins/pausemusic/pausemusic_config.cpp b/plugins/pausemusic/pausemusic_config.cpp
deleted file mode 100644
index 8c9e54c50..000000000
--- a/plugins/pausemusic/pausemusic_config.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka at gmail.com>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#include "pausemusic_config.h"
-
-#include <KPluginFactory>
-
-K_PLUGIN_CLASS(PauseMusicConfig)
-
-PauseMusicConfig::PauseMusicConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
- : KdeConnectPluginKcm(parent, data, args)
-{
- m_ui.setupUi(widget());
-
- connect(m_ui.rad_ringing, &QCheckBox::toggled, this, &PauseMusicConfig::markAsChanged);
- connect(m_ui.rad_talking, &QCheckBox::toggled, this, &PauseMusicConfig::markAsChanged);
- connect(m_ui.check_pause, &QCheckBox::toggled, this, &PauseMusicConfig::markAsChanged);
- connect(m_ui.check_mute, &QCheckBox::toggled, this, &PauseMusicConfig::markAsChanged);
- connect(m_ui.check_resume, &QCheckBox::toggled, this, &PauseMusicConfig::markAsChanged);
-}
-
-void PauseMusicConfig::defaults()
-{
- KCModule::defaults();
- m_ui.rad_talking->setChecked(false);
- m_ui.rad_ringing->setChecked(true);
- m_ui.check_pause->setChecked(true);
- m_ui.check_mute->setChecked(false);
- m_ui.check_resume->setChecked(true);
- markAsChanged();
-}
-
-void PauseMusicConfig::load()
-{
- KCModule::load();
- bool talking = config()->getBool(QStringLiteral("conditionTalking"), false);
- m_ui.rad_talking->setChecked(talking);
- m_ui.rad_ringing->setChecked(!talking);
-
- bool pause = config()->getBool(QStringLiteral("actionPause"), true);
- bool mute = config()->getBool(QStringLiteral("actionMute"), false);
- m_ui.check_pause->setChecked(pause);
- m_ui.check_mute->setChecked(mute);
-
- const bool autoResume = config()->getBool(QStringLiteral("actionResume"), true);
- m_ui.check_resume->setChecked(autoResume);
-}
-
-void PauseMusicConfig::save()
-{
- config()->set(QStringLiteral("conditionTalking"), m_ui.rad_talking->isChecked());
- config()->set(QStringLiteral("actionPause"), m_ui.check_pause->isChecked());
- config()->set(QStringLiteral("actionMute"), m_ui.check_mute->isChecked());
- config()->set(QStringLiteral("actionResume"), m_ui.check_resume->isChecked());
- KCModule::save();
-}
-
-#include "moc_pausemusic_config.cpp"
-#include "pausemusic_config.moc"
diff --git a/plugins/pausemusic/pausemusic_config.h b/plugins/pausemusic/pausemusic_config.h
deleted file mode 100644
index 255dd6b99..000000000
--- a/plugins/pausemusic/pausemusic_config.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka at gmail.com>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#pragma once
-
-#include "kcmplugin/kdeconnectpluginkcm.h"
-#include "ui_pausemusic_config.h"
-
-class PauseMusicConfig : public KdeConnectPluginKcm
-{
- Q_OBJECT
-public:
- PauseMusicConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &);
-
- void save() override;
- void load() override;
- void defaults() override;
-
-private:
- Ui::PauseMusicConfigUi m_ui;
-};
diff --git a/plugins/pausemusic/pausemusic_config.ui b/plugins/pausemusic/pausemusic_config.ui
deleted file mode 100644
index 3a999f072..000000000
--- a/plugins/pausemusic/pausemusic_config.ui
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>PauseMusicConfigUi</class>
- <widget class="QWidget" name="PauseMusicConfigUi">
- <property name="windowModality">
- <enum>Qt::WindowModal</enum>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>368</width>
- <height>241</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Pause music plugin</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <property name="spacing">
- <number>20</number>
- </property>
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title">
- <string>Condition</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QRadioButton" name="rad_ringing">
- <property name="text">
- <string>Pause as soon as phone rings</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="rad_talking">
- <property name="text">
- <string>Pause only while talking</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title">
- <string>Actions</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QCheckBox" name="check_pause">
- <property name="text">
- <string>Pause media players</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="check_mute">
- <property name="text">
- <string>Mute system sound</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="check_resume">
- <property name="text">
- <string>Automatically resume media when call has finished</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/plugins/runcommand/CMakeLists.txt b/plugins/runcommand/CMakeLists.txt
index 7fe9e46d2..2a6f47e78 100644
--- a/plugins/runcommand/CMakeLists.txt
+++ b/plugins/runcommand/CMakeLists.txt
@@ -2,16 +2,6 @@ kdeconnect_add_plugin(kdeconnect_runcommand SOURCES runcommandplugin.cpp)
target_link_libraries(kdeconnect_runcommand
kdeconnectcore
Qt::DBus
- KF6::KCMUtils
KF6::I18n)
-#----------------------
-kdeconnect_add_kcm(kdeconnect_runcommand_config SOURCES runcommand_config.cpp)
-target_link_libraries(kdeconnect_runcommand_config
- kdeconnectcore
- kdeconnectpluginkcm
- Qt::DBus
- KF6::I18n
- KF6::CoreAddons
- KF6::ConfigWidgets
-)
+install(FILES "kdeconnect_runcommand_config.qml" DESTINATION ${KDE_INSTALL_DATADIR}/kdeconnect)
diff --git a/plugins/runcommand/kdeconnect_runcommand.json b/plugins/runcommand/kdeconnect_runcommand.json
index a6a3f5fd5..873735901 100644
--- a/plugins/runcommand/kdeconnect_runcommand.json
+++ b/plugins/runcommand/kdeconnect_runcommand.json
@@ -212,7 +212,6 @@
"Name[zh_CN]": "执行命令",
"Name[zh_TW]": "執行命令"
},
- "X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_runcommand_config",
"X-KdeConnect-OutgoingPacketType": [
"kdeconnect.runcommand"
],
diff --git a/plugins/runcommand/runcommand_config.cpp b/plugins/runcommand/runcommand_config.cpp
deleted file mode 100644
index 59fc649be..000000000
--- a/plugins/runcommand/runcommand_config.cpp
+++ /dev/null
@@ -1,254 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2015 David Edmundson <davidedmundson at kde.org>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#include "runcommand_config.h"
-
-#include <QDebug>
-#include <QFileDialog>
-#include <QHBoxLayout>
-#include <QHeaderView>
-#include <QJsonArray>
-#include <QJsonDocument>
-#include <QMenu>
-#include <QPushButton>
-#include <QStandardItemModel>
-#include <QStandardPaths>
-#include <QTableView>
-#include <QUuid>
-
-#include <KLocalizedString>
-#include <KPluginFactory>
-
-#include <dbushelper.h>
-
-K_PLUGIN_CLASS(RunCommandConfig)
-
-RunCommandConfig::RunCommandConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
- : KdeConnectPluginKcm(parent, data, args)
-{
- // The qdbus executable name is different on some systems
- QString qdbusExe = QStringLiteral("qdbus-qt6");
- if (QStandardPaths::findExecutable(qdbusExe).isEmpty()) {
- qdbusExe = QStringLiteral("qdbus");
- }
-
- QMenu *defaultMenu = new QMenu(widget());
-
-#ifdef Q_OS_WIN
- addSuggestedCommand(defaultMenu, i18n("Schedule a shutdown"), QStringLiteral("shutdown /s /t 60"));
- addSuggestedCommand(defaultMenu, i18n("Shutdown now"), QStringLiteral("shutdown /s /t 0"));
- addSuggestedCommand(defaultMenu, i18n("Cancel last shutdown"), QStringLiteral("shutdown /a"));
- addSuggestedCommand(defaultMenu, i18n("Schedule a reboot"), QStringLiteral("shutdown /r /t 60"));
- addSuggestedCommand(defaultMenu, i18n("Suspend"), QStringLiteral("rundll32.exe powrprof.dll,SetSuspendState 0,1,0"));
- addSuggestedCommand(defaultMenu, i18n("Lock Screen"), QStringLiteral("rundll32.exe user32.dll,LockWorkStation"));
- addSuggestedCommand(
- defaultMenu,
- i18n("Say Hello"),
- QStringLiteral("PowerShell -Command Add-Type -AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak('hello');"));
-#else
- addSuggestedCommand(defaultMenu, i18n("Shutdown"), QStringLiteral("systemctl poweroff"));
- addSuggestedCommand(defaultMenu, i18n("Reboot"), QStringLiteral("systemctl reboot"));
- addSuggestedCommand(defaultMenu, i18n("Suspend"), QStringLiteral("systemctl suspend"));
- addSuggestedCommand(
- defaultMenu,
- i18n("Maximum Brightness"),
- QStringLiteral("%0 org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl "
- "org.kde.Solid.PowerManagement.Actions.BrightnessControl.setBrightness `%0 org.kde.Solid.PowerManagement "
- "/org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.brightnessMax`")
- .arg(qdbusExe));
- addSuggestedCommand(defaultMenu, i18n("Lock Screen"), QStringLiteral("loginctl lock-session"));
- addSuggestedCommand(defaultMenu, i18n("Unlock Screen"), QStringLiteral("loginctl unlock-session"));
- addSuggestedCommand(defaultMenu, i18n("Close All Vaults"), QStringLiteral("%0 org.kde.kded5 /modules/plasmavault closeAllVaults").arg(qdbusExe));
- addSuggestedCommand(defaultMenu,
- i18n("Forcefully Close All Vaults"),
- QStringLiteral("%0 org.kde.kded5 /modules/plasmavault forceCloseAllVaults").arg(qdbusExe));
-#endif
-
- QTableView *table = new QTableView(widget());
- table->horizontalHeader()->setStretchLastSection(true);
- table->verticalHeader()->setVisible(false);
- QPushButton *button = new QPushButton(QIcon::fromTheme(QStringLiteral("list-add")), i18n("Sample commands"), widget());
- button->setMenu(defaultMenu);
-
- QHBoxLayout *importExportLayout = new QHBoxLayout();
- QPushButton *exportButton = new QPushButton(i18n("Export"), widget());
- importExportLayout->addWidget(exportButton);
- connect(exportButton, &QPushButton::clicked, this, &RunCommandConfig::exportCommands);
- QPushButton *importButton = new QPushButton(i18n("Import"), widget());
- importExportLayout->addWidget(importButton);
- connect(importButton, &QPushButton::clicked, this, &RunCommandConfig::importCommands);
-
- QVBoxLayout *layout = new QVBoxLayout();
- layout->addWidget(table);
- layout->addLayout(importExportLayout);
- layout->addWidget(button);
- widget()->setLayout(layout);
-
- m_entriesModel = new QStandardItemModel(this);
- table->setModel(m_entriesModel);
-
- m_entriesModel->setHorizontalHeaderLabels(QStringList{i18n("Name"), i18n("Command")});
-}
-
-void RunCommandConfig::exportCommands()
-{
- QString filePath = QFileDialog::getSaveFileName(widget(), i18n("Export Commands"), QDir::homePath(), QStringLiteral("JSON (*.json)"));
- if (filePath.isEmpty())
- return;
-
- QFile file(filePath);
- if (!file.open(QFile::WriteOnly | QFile::Text)) {
- qWarning() << "Could not write to file:" << filePath;
- return;
- }
-
- QJsonArray jsonArray;
- for (int i = 0; i < m_entriesModel->rowCount(); i++) {
- QJsonObject jsonObj;
- jsonObj[QStringLiteral("name")] = m_entriesModel->index(i, 0).data().toString();
- jsonObj[QStringLiteral("command")] = m_entriesModel->index(i, 1).data().toString();
- jsonArray.append(jsonObj);
- }
-
- QJsonDocument jsonDocument(jsonArray);
- file.write(jsonDocument.toJson());
- file.close();
-}
-
-void RunCommandConfig::importCommands()
-{
- QString filePath = QFileDialog::getOpenFileName(widget(), i18n("Import Commands"), QDir::homePath(), QStringLiteral("JSON (*.json)"));
- if (filePath.isEmpty())
- return;
-
- QFile file(filePath);
- if (!file.open(QFile::ReadOnly | QFile::Text)) {
- qWarning() << "Could not read file:" << filePath;
- return;
- }
-
- QByteArray jsonData = file.readAll();
- file.close();
-
- QJsonDocument jsonDoc = QJsonDocument::fromJson(jsonData);
- if (jsonDoc.isNull() || !jsonDoc.isArray()) {
- qWarning() << "Invalid JSON format.";
- return;
- }
-
- // Clear the current command list
- m_entriesModel->removeRows(0, m_entriesModel->rowCount());
-
- // Populate the model with the imported commands
- QJsonArray jsonArray = jsonDoc.array();
- for (const QJsonValue &jsonValue : jsonArray) {
- QJsonObject jsonObj = jsonValue.toObject();
- QString name = jsonObj.value(QStringLiteral("name")).toString();
- QString command = jsonObj.value(QStringLiteral("command")).toString();
- insertRow(m_entriesModel->rowCount(), name, command);
- }
-
- markAsChanged();
-}
-
-void RunCommandConfig::addSuggestedCommand(QMenu *menu, const QString &name, const QString &command)
-{
- auto action = new QAction(name);
- connect(action, &QAction::triggered, action, [this, name, command]() {
- insertRow(0, name, command);
- markAsChanged();
- });
- menu->addAction(action);
-}
-
-void RunCommandConfig::defaults()
-{
- KCModule::defaults();
- m_entriesModel->removeRows(0, m_entriesModel->rowCount());
-
- markAsChanged();
-}
-
-void RunCommandConfig::load()
-{
- KCModule::load();
-
- QJsonDocument jsonDocument = QJsonDocument::fromJson(config()->getByteArray(QStringLiteral("commands"), "{}"));
- QJsonObject jsonConfig = jsonDocument.object();
- const QStringList keys = jsonConfig.keys();
- for (const QString &key : keys) {
- const QJsonObject entry = jsonConfig[key].toObject();
- const QString name = entry[QStringLiteral("name")].toString();
- const QString command = entry[QStringLiteral("command")].toString();
-
- QStandardItem *newName = new QStandardItem(name);
- newName->setEditable(true);
- newName->setData(key);
- QStandardItem *newCommand = new QStandardItem(command);
- newName->setEditable(true);
-
- m_entriesModel->appendRow(QList<QStandardItem *>() << newName << newCommand);
- }
-
- m_entriesModel->sort(0);
-
- insertEmptyRow();
- connect(m_entriesModel, &QAbstractItemModel::dataChanged, this, &RunCommandConfig::onDataChanged);
-}
-
-void RunCommandConfig::save()
-{
- KCModule::save();
- QJsonObject jsonConfig;
- for (int i = 0; i < m_entriesModel->rowCount(); i++) {
- QString key = m_entriesModel->item(i, 0)->data().toString();
- const QString name = m_entriesModel->item(i, 0)->text();
- const QString command = m_entriesModel->item(i, 1)->text();
-
- if (name.isEmpty() || command.isEmpty()) {
- continue;
- }
-
- if (key.isEmpty()) {
- key = QUuid::createUuid().toString(QUuid::WithoutBraces);
- DBusHelper::filterNonExportableCharacters(key);
- }
- QJsonObject entry;
- entry[QStringLiteral("name")] = name;
- entry[QStringLiteral("command")] = command;
- jsonConfig[key] = entry;
- }
- QJsonDocument document;
- document.setObject(jsonConfig);
- config()->set(QStringLiteral("commands"), document.toJson(QJsonDocument::Compact));
-}
-
-void RunCommandConfig::insertEmptyRow()
-{
- insertRow(m_entriesModel->rowCount(), {}, {});
-}
-
-void RunCommandConfig::insertRow(int i, const QString &name, const QString &command)
-{
- QStandardItem *newName = new QStandardItem(name);
- newName->setEditable(true);
- QStandardItem *newCommand = new QStandardItem(command);
- newName->setEditable(true);
-
- m_entriesModel->insertRow(i, QList<QStandardItem *>() << newName << newCommand);
-}
-
-void RunCommandConfig::onDataChanged(const QModelIndex & /*topLeft*/, const QModelIndex &bottomRight)
-{
- markAsChanged();
- if (bottomRight.row() == m_entriesModel->rowCount() - 1) {
- // TODO check both entries are still empty
- insertEmptyRow();
- }
-}
-
-#include "moc_runcommand_config.cpp"
-#include "runcommand_config.moc"
diff --git a/plugins/runcommand/runcommand_config.h b/plugins/runcommand/runcommand_config.h
deleted file mode 100644
index 735d34b03..000000000
--- a/plugins/runcommand/runcommand_config.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2015 David Edmundson <davidedmundson at kde.org>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#pragma once
-
-#include "kcmplugin/kdeconnectpluginkcm.h"
-
-class QMenu;
-class QStandardItemModel;
-
-class RunCommandConfig : public KdeConnectPluginKcm
-{
- Q_OBJECT
-public:
- RunCommandConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &);
-
- void save() override;
- void load() override;
- void defaults() override;
-
-private:
- void onDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
- void exportCommands();
- void importCommands();
-
- void addSuggestedCommand(QMenu *menu, const QString &name, const QString &command);
- void insertRow(int i, const QString &name, const QString &command);
- void insertEmptyRow();
-
- QStandardItemModel *m_entriesModel;
-};
diff --git a/plugins/runcommand/runcommandplugin.cpp b/plugins/runcommand/runcommandplugin.cpp
index 70b560376..daea8b0a3 100644
--- a/plugins/runcommand/runcommandplugin.cpp
+++ b/plugins/runcommand/runcommandplugin.cpp
@@ -15,7 +15,6 @@
#include <QSettings>
#include <KShell>
-#include <kcmutils_version.h>
#include <core/daemon.h>
#include <core/device.h>
diff --git a/plugins/sendnotifications/CMakeLists.txt b/plugins/sendnotifications/CMakeLists.txt
index 3b80a4725..178533f6c 100644
--- a/plugins/sendnotifications/CMakeLists.txt
+++ b/plugins/sendnotifications/CMakeLists.txt
@@ -23,19 +23,4 @@ target_sources(kdeconnect_sendnotifications PRIVATE dbusnotificationslistener.cp
target_link_libraries(kdeconnect_sendnotifications PkgConfig::DBus)
endif()
-# Config
-kdeconnect_add_kcm(kdeconnect_sendnotifications_config)
-
-ki18n_wrap_ui(kdeconnect_sendnotifications_config sendnotifications_config.ui)
-target_sources(kdeconnect_sendnotifications_config PRIVATE
- sendnotifications_config.cpp
- notifyingapplication.cpp
- notifyingapplicationmodel.cpp
-)
-
-target_link_libraries(kdeconnect_sendnotifications_config
- kdeconnectcore
- kdeconnectpluginkcm
- KF6::I18n
- KF6::KCMUtils
-)
+install(FILES "kdeconnect_sendnotifications_config.qml" DESTINATION ${KDE_INSTALL_DATADIR}/kdeconnect)
diff --git a/plugins/sendnotifications/kdeconnect_sendnotifications.json b/plugins/sendnotifications/kdeconnect_sendnotifications.json
index ad16db290..becf845fd 100644
--- a/plugins/sendnotifications/kdeconnect_sendnotifications.json
+++ b/plugins/sendnotifications/kdeconnect_sendnotifications.json
@@ -152,7 +152,6 @@
"Name[zh_CN]": "发送通知",
"Name[zh_TW]": "傳送通知"
},
- "X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_sendnotifications_config",
"X-KdeConnect-OutgoingPacketType": [
"kdeconnect.notification"
],
diff --git a/plugins/sendnotifications/sendnotifications_config.cpp b/plugins/sendnotifications/sendnotifications_config.cpp
deleted file mode 100644
index 4a7c14592..000000000
--- a/plugins/sendnotifications/sendnotifications_config.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2015 Holger Kaelberer <holger.k at elberer.de>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#include "sendnotifications_config.h"
-#include "notifyingapplicationmodel.h"
-
-#include <KCModule>
-#include <KPluginFactory>
-
-K_PLUGIN_CLASS(SendNotificationsConfig)
-
-SendNotificationsConfig::SendNotificationsConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
- : KdeConnectPluginKcm(parent, data, args)
- , appModel(new NotifyingApplicationModel)
-{
- m_ui.setupUi(widget());
- m_ui.appList->setIconSize(QSize(32, 32));
-
- m_ui.appList->setModel(appModel);
-
- m_ui.appList->horizontalHeader()->setSectionResizeMode(0, QHeaderView::QHeaderView::Fixed);
- m_ui.appList->horizontalHeader()->setSectionResizeMode(1, QHeaderView::QHeaderView::Stretch);
- m_ui.appList->horizontalHeader()->setSectionResizeMode(2, QHeaderView::QHeaderView::Stretch);
- for (int i = 0; i < 3; i++)
- m_ui.appList->resizeColumnToContents(i);
-
- connect(m_ui.appList->horizontalHeader(), &QHeaderView::sortIndicatorChanged, m_ui.appList, &QTableView::sortByColumn);
-
- connect(m_ui.check_persistent, &QCheckBox::toggled, this, &SendNotificationsConfig::markAsChanged);
- connect(m_ui.spin_urgency, &QSpinBox::editingFinished, this, &SendNotificationsConfig::markAsChanged);
- connect(m_ui.check_body, &QCheckBox::toggled, this, &SendNotificationsConfig::markAsChanged);
- connect(m_ui.check_icons, &QCheckBox::toggled, this, &SendNotificationsConfig::markAsChanged);
-
- connect(appModel, &NotifyingApplicationModel::applicationsChanged, this, &SendNotificationsConfig::markAsChanged);
-
- connect(config(), &KdeConnectPluginConfig::configChanged, this, &SendNotificationsConfig::loadApplications);
-}
-
-void SendNotificationsConfig::defaults()
-{
- KCModule::defaults();
- m_ui.check_persistent->setChecked(false);
- m_ui.spin_urgency->setValue(0);
- m_ui.check_body->setChecked(true);
- m_ui.check_icons->setChecked(true);
- markAsChanged();
-}
-
-void SendNotificationsConfig::loadApplications()
-{
- appModel->clearApplications();
- QVariantList list = config()->getList(QStringLiteral("applications"));
- for (const auto &a : list) {
- NotifyingApplication app = a.value<NotifyingApplication>();
- if (!appModel->containsApp(app.name)) {
- appModel->appendApp(app);
- }
- }
-}
-
-void SendNotificationsConfig::load()
-{
- KCModule::load();
- bool persistent = config()->getBool(QStringLiteral("generalPersistent"), false);
- m_ui.check_persistent->setChecked(persistent);
- bool body = config()->getBool(QStringLiteral("generalIncludeBody"), true);
- m_ui.check_body->setChecked(body);
- bool icons = config()->getBool(QStringLiteral("generalSynchronizeIcons"), true);
- m_ui.check_icons->setChecked(icons);
- int urgency = config()->getInt(QStringLiteral("generalUrgency"), 0);
- m_ui.spin_urgency->setValue(urgency);
-
- loadApplications();
-}
-
-void SendNotificationsConfig::save()
-{
- KCModule::save();
- config()->set(QStringLiteral("generalPersistent"), m_ui.check_persistent->isChecked());
- config()->set(QStringLiteral("generalIncludeBody"), m_ui.check_body->isChecked());
- config()->set(QStringLiteral("generalSynchronizeIcons"), m_ui.check_icons->isChecked());
- config()->set(QStringLiteral("generalUrgency"), m_ui.spin_urgency->value());
-
- QVariantList list;
- const auto apps = appModel->apps();
- list.reserve(apps.size());
- for (const auto &a : apps) {
- list.append(QVariant::fromValue<NotifyingApplication>(a));
- }
- config()->setList(QStringLiteral("applications"), list);
-}
-
-#include "moc_sendnotifications_config.cpp"
-#include "sendnotifications_config.moc"
diff --git a/plugins/sendnotifications/sendnotifications_config.h b/plugins/sendnotifications/sendnotifications_config.h
deleted file mode 100644
index 009ab070b..000000000
--- a/plugins/sendnotifications/sendnotifications_config.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2015 Holger Kaelberer <holger.k at elberer.de>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#pragma once
-
-#include "kcmplugin/kdeconnectpluginkcm.h"
-#include "ui_sendnotifications_config.h"
-
-class NotifyingApplicationModel;
-
-class SendNotificationsConfig : public KdeConnectPluginKcm
-{
- Q_OBJECT
-public:
- SendNotificationsConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &);
-
- void save() override;
- void load() override;
- void defaults() override;
-
-private:
- void loadApplications();
- Ui::SendNotificationsConfigUi m_ui;
- NotifyingApplicationModel *appModel;
-};
diff --git a/plugins/sendnotifications/sendnotifications_config.ui b/plugins/sendnotifications/sendnotifications_config.ui
deleted file mode 100644
index cd180a20a..000000000
--- a/plugins/sendnotifications/sendnotifications_config.ui
+++ /dev/null
@@ -1,204 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>SendNotificationsConfigUi</class>
- <widget class="QWidget" name="SendNotificationsConfigUi">
- <property name="windowModality">
- <enum>Qt::WindowModal</enum>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>350</width>
- <height>328</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>350</width>
- <height>0</height>
- </size>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QGroupBox" name="groupBox_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title">
- <string>General</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QCheckBox" name="check_persistent">
- <property name="toolTip">
- <string>Synchronize only notifications with a timeout value of 0?</string>
- </property>
- <property name="text">
- <string>Persistent notifications only</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="check_body">
- <property name="font">
- <font>
- <weight>50</weight>
- <bold>false</bold>
- </font>
- </property>
- <property name="toolTip">
- <string>Append the notification body to the summary when synchronizing notifications?</string>
- </property>
- <property name="text">
- <string>Include body</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="check_icons">
- <property name="font">
- <font>
- <weight>50</weight>
- <bold>false</bold>
- </font>
- </property>
- <property name="toolTip">
- <string>Synchronize icons of notifying applications if possible?</string>
- </property>
- <property name="text">
- <string>Synchronize icons</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QWidget" name="horizontalWidget" native="true">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QSpinBox" name="spin_urgency">
- <property name="maximumSize">
- <size>
- <width>40</width>
- <height>32</height>
- </size>
- </property>
- <property name="font">
- <font>
- <weight>50</weight>
- <bold>false</bold>
- </font>
- </property>
- <property name="toolTip">
- <string><html><head/><body><p>Minimum urgency level of the notifications</p></body></html></string>
- </property>
- <property name="maximum">
- <number>2</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label">
- <property name="font">
- <font>
- <weight>50</weight>
- <bold>false</bold>
- </font>
- </property>
- <property name="toolTip">
- <string>Synchronize only notifications with the given urgency level.</string>
- </property>
- <property name="text">
- <string>Minimum urgency level</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip">
- <string/>
- </property>
- <property name="title">
- <string>Applications</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QTableView" name="appList">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <weight>50</weight>
- <bold>false</bold>
- </font>
- </property>
- <property name="alternatingRowColors">
- <bool>true</bool>
- </property>
- <property name="showGrid">
- <bool>false</bool>
- </property>
- <property name="gridStyle">
- <enum>Qt::NoPen</enum>
- </property>
- <property name="sortingEnabled">
- <bool>true</bool>
- </property>
- <attribute name="horizontalHeaderVisible">
- <bool>true</bool>
- </attribute>
- <attribute name="horizontalHeaderDefaultSectionSize">
- <number>150</number>
- </attribute>
- <attribute name="horizontalHeaderMinimumSectionSize">
- <number>20</number>
- </attribute>
- <attribute name="horizontalHeaderShowSortIndicator" stdset="0">
- <bool>true</bool>
- </attribute>
- <attribute name="horizontalHeaderStretchLastSection">
- <bool>true</bool>
- </attribute>
- <attribute name="verticalHeaderVisible">
- <bool>false</bool>
- </attribute>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/plugins/share/CMakeLists.txt b/plugins/share/CMakeLists.txt
index 622b50197..efcce8c81 100644
--- a/plugins/share/CMakeLists.txt
+++ b/plugins/share/CMakeLists.txt
@@ -9,13 +9,4 @@ target_link_libraries(kdeconnect_share
KF6::Service
)
-kdeconnect_add_kcm(kdeconnect_share_config SOURCES share_config.cpp)
-ki18n_wrap_ui(kdeconnect_share_config share_config.ui)
-target_link_libraries(kdeconnect_share_config
- kdeconnectpluginkcm
- KF6::I18n
- KF6::CoreAddons
- KF6::ConfigWidgets
- KF6::KIOWidgets
- KF6::Notifications
-)
+install(FILES "kdeconnect_share_config.qml" DESTINATION ${KDE_INSTALL_DATADIR}/kdeconnect)
diff --git a/plugins/share/kdeconnect_share.json b/plugins/share/kdeconnect_share.json
index 08436fb51..0eb603e13 100644
--- a/plugins/share/kdeconnect_share.json
+++ b/plugins/share/kdeconnect_share.json
@@ -157,7 +157,6 @@
"Name[zh_CN]": "分享和接收",
"Name[zh_TW]": "分享及接收"
},
- "X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_share_config",
"X-KdeConnect-OutgoingPacketType": [
"kdeconnect.share.request",
"kdeconnect.share.request.update"
diff --git a/plugins/share/share_config.cpp b/plugins/share/share_config.cpp
deleted file mode 100644
index 528fb1678..000000000
--- a/plugins/share/share_config.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka at gmail.com>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#include "share_config.h"
-
-#include <QStandardPaths>
-
-#include <KPluginFactory>
-#include <KUrlRequester>
-
-K_PLUGIN_CLASS(ShareConfig)
-
-ShareConfig::ShareConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
- : KdeConnectPluginKcm(parent, data, args)
-{
- m_ui.setupUi(widget());
- // xgettext:no-c-format
- m_ui.commentLabel->setTextFormat(Qt::RichText);
- m_ui.commentLabel->setText(i18n("%1 in the path will be replaced with the specific device name."));
-
- connect(m_ui.kurlrequester, &KUrlRequester::textChanged, this, &ShareConfig::markAsChanged);
-}
-
-void ShareConfig::defaults()
-{
- KCModule::defaults();
-
- m_ui.kurlrequester->setText(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation));
-
- markAsChanged();
-}
-
-void ShareConfig::load()
-{
- KCModule::load();
-
- const auto standardPath = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
- m_ui.kurlrequester->setText(config()->getString(QStringLiteral("incoming_path"), standardPath));
-}
-
-void ShareConfig::save()
-{
- KCModule::save();
- config()->set(QStringLiteral("incoming_path"), m_ui.kurlrequester->text());
-}
-
-#include "moc_share_config.cpp"
-#include "share_config.moc"
diff --git a/plugins/share/share_config.h b/plugins/share/share_config.h
deleted file mode 100644
index 37bf369b5..000000000
--- a/plugins/share/share_config.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka at gmail.com>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#pragma once
-
-#include "kcmplugin/kdeconnectpluginkcm.h"
-#include "ui_share_config.h"
-
-class ShareConfig : public KdeConnectPluginKcm
-{
- Q_OBJECT
-public:
- ShareConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &args);
-
- void save() override;
- void load() override;
- void defaults() override;
-
-private:
- Ui::ShareConfigUi m_ui;
-};
diff --git a/plugins/share/share_config.ui b/plugins/share/share_config.ui
deleted file mode 100644
index f86aab34d..000000000
--- a/plugins/share/share_config.ui
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>ShareConfigUi</class>
- <widget class="QWidget" name="ShareConfigUi">
- <property name="windowModality">
- <enum>Qt::WindowModal</enum>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>569</width>
- <height>140</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Share plugin settings</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>Receiving</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Save files in:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KUrlRequester" name="kurlrequester">
- <property name="acceptDrops">
- <bool>false</bool>
- </property>
- <property name="mode">
- <set>KFile::Directory|KFile::ExistingOnly|KFile::LocalOnly</set>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QLabel" name="commentLabel"/>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>KUrlRequester</class>
- <extends>QWidget</extends>
- <header>kurlrequester.h</header>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/plugins/sms/CMakeLists.txt b/plugins/sms/CMakeLists.txt
index 0f076b6f8..f8f0d84f7 100644
--- a/plugins/sms/CMakeLists.txt
+++ b/plugins/sms/CMakeLists.txt
@@ -17,5 +17,6 @@ target_link_libraries(kdeconnect_sms
Qt::DBus
KF6::I18n
KF6::Notifications
+ KF6::ColorScheme
Qt::Widgets
)
diff --git a/settings/CMakeLists.txt b/settings/CMakeLists.txt
deleted file mode 100644
index 35341d3a5..000000000
--- a/settings/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-settings")
-
-qt_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc)
-
-add_executable(kdeconnect-settings
- main.cpp
- ${kdeconnect_custom_icons_SRCS}
-)
-
-target_link_libraries(kdeconnect-settings
- kdeconnectversion
- Qt::QuickControls2
- KF6::I18n
- KF6::KCMUtils
- KF6::DBusAddons
- KF6::WindowSystem
- KF6::Crash)
-
-install(TARGETS kdeconnect-settings ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
-install(FILES org.kde.kdeconnect-settings.desktop DESTINATION ${KDE_INSTALL_APPDIR})
diff --git a/settings/Messages.sh b/settings/Messages.sh
deleted file mode 100644
index 539d581eb..000000000
--- a/settings/Messages.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-
-$EXTRACTRC `find -name '*.ui' -o -name '*.rc'` >> rc.cpp
-$XGETTEXT rc.cpp -o $podir/kdeconnect-settings.pot
-rm -f rc.cpp
-
-#.cpp (-j passed to merge into existing file)
-$XGETTEXT `find . -name '*.cpp'` -j -o $podir/kdeconnect-settings.pot
-
-
diff --git a/settings/main.cpp b/settings/main.cpp
deleted file mode 100644
index 4662a3f43..000000000
--- a/settings/main.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2018 Nicolas Fella <nicolas.fella at gmx.de>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#include <QApplication>
-#include <QCommandLineParser>
-#include <QIcon>
-#include <QQuickStyle>
-#include <QStandardPaths>
-
-#include "kdeconnect-version.h"
-#include <KAboutData>
-#include <KCMultiDialog>
-#include <KColorSchemeManager>
-#include <KCrash>
-#include <KDBusService>
-#include <KLocalizedString>
-#include <KWindowSystem>
-
-int main(int argc, char **argv)
-{
- QApplication app(argc, argv);
- app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect")));
- KAboutData aboutData(QStringLiteral("kdeconnect-settings"),
- i18n("KDE Connect Settings"),
- QStringLiteral(KDECONNECT_VERSION_STRING),
- i18n("KDE Connect Settings"),
- KAboutLicense::GPL,
- i18n("© 2018–2025 KDE Connect Team"));
- aboutData.addAuthor(i18n("Nicolas Fella"), {}, QStringLiteral("nicolas.fella at gmx.de"));
- KAboutData::setApplicationData(aboutData);
-
-#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
- // Ensure we have a suitable color theme set for light/dark mode. KColorSchemeManager implicitly applies
- // a suitable default theme.
- KColorSchemeManager::instance();
- // Force breeze style to ensure coloring works consistently in dark mode. Specifically tab colors have
- // troubles on windows.
- QApplication::setStyle(QStringLiteral("breeze"));
- // Force breeze icon theme to ensure we can correctly adapt icons to color changes WRT dark/light mode.
- // Without this we may end up with hicolor and fail to support icon recoloring.
- QIcon::setThemeName(QStringLiteral("breeze"));
-#else
- QIcon::setFallbackThemeName(QStringLiteral("breeze"));
-#endif
-
- // Default to org.kde.desktop style unless the user forces another style
- if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) {
- QQuickStyle::setStyle(QStringLiteral("org.kde.desktop"));
- }
-
- KCrash::initialize();
-
- QCommandLineParser parser;
- parser.addOption(QCommandLineOption(QStringLiteral("args"), i18n("Arguments for the config module"), QStringLiteral("args")));
-
- aboutData.setupCommandLine(&parser);
- parser.process(app);
- aboutData.processCommandLine(&parser);
-
- KDBusService dbusService(KDBusService::Unique);
-
- KCMultiDialog *dialog = new KCMultiDialog;
- dialog->addModule(KPluginMetaData(QStringLiteral("plasma/kcms/systemsettings_qwidgets/kcm_kdeconnect")), {parser.value(QStringLiteral("args"))});
-
- dialog->setAttribute(Qt::WA_DeleteOnClose);
- dialog->show();
-
- QObject::connect(&dbusService, &KDBusService::activateRequested, dialog, [dialog](const QStringList &args, const QString & /*workingDir*/) {
- KWindowSystem::updateStartupId(dialog->windowHandle());
- KWindowSystem::activateWindow(dialog->windowHandle());
-
- QCommandLineParser parser;
- parser.addOption(QCommandLineOption(QStringLiteral("args"), i18n("Arguments for the config module"), QStringLiteral("args")));
- parser.parse(args);
-
- dialog->clear();
- dialog->addModule(KPluginMetaData(QStringLiteral("plasma/kcms/systemsettings_qwidgets/kcm_kdeconnect")), {parser.value(QStringLiteral("args"))});
- });
-
- app.setQuitOnLastWindowClosed(true);
-
- return app.exec();
-}
diff --git a/settings/org.kde.kdeconnect-settings.desktop b/settings/org.kde.kdeconnect-settings.desktop
deleted file mode 100755
index bdeb8097b..000000000
--- a/settings/org.kde.kdeconnect-settings.desktop
+++ /dev/null
@@ -1,136 +0,0 @@
-[Desktop Entry]
-Type=Application
-Icon=kdeconnect
-Terminal=false
-Exec=kdeconnect-settings
-Name=KDE Connect Settings
-Name[ar]=إعدادات جسر كِيدِي
-Name[az]=KDE Connect Ayarları
-Name[bg]=Настройки на KDE Connect
-Name[ca]=Arranjament del KDE Connect
-Name[ca at valencia]=Configureu KDE Connect
-Name[cs]=Nastavení KDE Connect
-Name[da]=Indstilling af KDE Connect
-Name[de]=KDE Connect-Einstellungen
-Name[el]=Ρυθμίσεις KDE Connect
-Name[en_GB]=KDE Connect Settings
-Name[eo]=KDE Connect-Agordojn
-Name[es]=Ajustes de KDE Connect
-Name[et]=KDE Connecti seadistused
-Name[eu]=KDE Connect ezarpenak
-Name[fi]=KDE Connectin asetukset
-Name[fr]=Paramètres de KDEConnect
-Name[gl]=Configuración de KDE Connect
-Name[he]=הגדרות KDE Connect
-Name[hi]=केडीई कनेक्ट सेटिंग्स
-Name[hu]=A KDE Connect beállításai
-Name[ia]=Preferentias de KDE Connect
-Name[id]=Pengaturan KDE Connect
-Name[is]=Stillingar KDE Connect
-Name[it]=Impostazioni di KDE Connect
-Name[ja]=KDE Connect の設定
-Name[ka]=KDE Connect -ის მორგება
-Name[ko]=KDE Connect 설정
-Name[lt]=KDE Connect nuostatos
-Name[lv]=„KDE Connect“ iestatījumi
-Name[nl]=Instellingen van KDE Connect
-Name[nn]=Innstillingar for KDE Connect
-Name[pa]=KDE ਕਨੈਕਟ ਸੈਟਿੰਗਾਂ
-Name[pl]=Ustawienia KDE Connect
-Name[pt]=Configuração do KDE Connect
-Name[pt_BR]=Configurações do KDE Connect
-Name[ro]=Configurări KDE Connect
-Name[ru]=Настройка KDE Connect
-Name[sa]=KDE Connect सेटिंग्स्
-Name[sk]=Nastavenia aplikácie KDE Connect
-Name[sl]=Nastavitve KDE Connect
-Name[sr]=Поставке за КДЕ‑конекцију
-Name[sr at ijekavian]=Поставке за КДЕ‑конекцију
-Name[sr at ijekavianlatin]=Postavke za KDE‑konekciju
-Name[sr at latin]=Postavke za KDE‑konekciju
-Name[sv]=Inställning av KDE-anslut
-Name[ta]=கே.டீ.யீ. கனெக்ட் அமைப்புகள்
-Name[tr]=KDE Bağlan Ayarları
-Name[uk]=Параметри KDE Connect
-Name[x-test]=xxKDE Connect Settingsxx
-Name[zh_CN]=KDE Connect 设置
-Name[zh_TW]=KDE Connect 設定
-GenericName=Device Synchronization Settings
-GenericName[ar]=إعدادات مزامنة الجهاز
-GenericName[bg]=Настройки на синхронизацията на устройство
-GenericName[ca]=Paràmetres de sincronització de dispositius
-GenericName[ca at valencia]=Paràmetres de sincronització de dispositius
-GenericName[cs]=Nastavení synchronizace zařízení
-GenericName[de]=Geräteabgleich-Einstellungen
-GenericName[en_GB]=Device Synchronisation Settings
-GenericName[eo]=Aparat-Sinkroniga Agordo
-GenericName[es]=Preferencias de sincronización de dispositivos
-GenericName[eu]=Gailua sinkronizatzeko ezarpenak
-GenericName[fi]=Laitteiden tahdistuksen asetukset
-GenericName[fr]=Configuration pour la synchronisation de périphériques
-GenericName[gl]=Configuración da sincronización de dispositivos
-GenericName[he]=הגדרות סנכרון מכשירים
-GenericName[hu]=Eszközszinkronizációs beállítások
-GenericName[ia]=Preferentias de Synchronisation de dispositivo
-GenericName[is]=Stilling á samstillingu tækja
-GenericName[it]=Impostazioni di sincronizzazione del dispositivo
-GenericName[ka]=მოწყობილობის სინქრონიზაციის მორგება
-GenericName[ko]=장치 동기화 설정
-GenericName[lt]=Įrenginių sinchronizavimo nuostatos
-GenericName[lv]=Ierīces sinhronizācijas iestatījumi
-GenericName[nl]=Instellingen voor synchronisatie van apparaat
-GenericName[nn]=Innstillingar for einingssynkronisering
-GenericName[pa]=ਡਿਵਾਈਸ ਸੈਕਰੋਨਾਈਜ਼ ਸੈਟਿੰਗਾਂ
-GenericName[pl]=Ustawienia synchronizacji urządzenia
-GenericName[pt_BR]=Configurações da sincronização de dispositivo
-GenericName[ru]=Параметры синхронизации с мобильным устройством
-GenericName[sa]=उपकरण समन्वयन सेटिंग्स्
-GenericName[sl]=Nastavitve sinhronizacijenaprav
-GenericName[sv]=Inställning av enhetssynkronisering
-GenericName[ta]=சாதன ஒத்திசைவு அமைப்புகள்
-GenericName[tr]=Aygıt Eşzamanlama Ayarları
-GenericName[uk]=Параметри синхронізації із пристроями
-GenericName[x-test]=xxDevice Synchronization Settingsxx
-GenericName[zh_CN]=设备同步设置
-GenericName[zh_TW]=裝置同步設定
-Comment=Configure device synchronization
-Comment[ar]=ضبط مزامنة الجهاز
-Comment[bg]=Конфигуриране на синхронизирането на устройството
-Comment[ca]=Configura la sincronització dels dispositius
-Comment[ca at valencia]=Configura la sincronització dels dispositius
-Comment[cs]=Nastavit synchronizaci zařízení...
-Comment[de]=Geräteabgleich einrichten
-Comment[en_GB]=Configure device synchronisation
-Comment[eo]=Agordi aparatan sinkronigon
-Comment[es]=Configurar sincronización de dispositivos
-Comment[eu]=Konfiguratu gailuaren sinkronizazioa
-Comment[fi]=Laitteiden tahdistuksen asetukset
-Comment[fr]=Configurer la synchronisation de périphériques
-Comment[gl]=Configurar a sincronización de dispositivos.
-Comment[he]=הגדרת סנכרון מכשירים
-Comment[hu]=Eszközszinkronizáció beállítása
-Comment[ia]=Configura Synchronisation de dispositivo
-Comment[is]=Grunnstilla samstillingu tækja
-Comment[it]=Configura la sincronizzazione del dispositivo
-Comment[ka]=მოწყობილობის სინქრონიზაციის მორგება
-Comment[ko]=장치 동기화 설정
-Comment[lt]=Konfigūruoti įrenginių sinchronizavimą
-Comment[lv]=Konfigurējiet ierīces sinhronizāciju
-Comment[nl]=Synchronisatie van apparaat configureren
-Comment[nn]=Set opp einingssynkronisering
-Comment[pa]=ਡਿਵਾਈਸ ਸੈਕਰੋਨਾਈਜ਼ੇਸ਼ਨ ਦੀ ਸੰਰਚਨਾ
-Comment[pl]=Ustawienia synchronizacji urządzenia
-Comment[pt_BR]=Configurar sincronização de dispositivo
-Comment[ru]=Настройка синхронизации с мобильным устройством
-Comment[sa]=उपकरणसमन्वयनं विन्यस्यताम्
-Comment[sl]=Konfiguriraj sinhronizacijo naprav
-Comment[sv]=Anpassa enhetssynkronisering
-Comment[ta]=சாதன ஒத்திசைவை அமைக்க விடும்
-Comment[tr]=Aygıt eşzamanlamayı yapılandırın
-Comment[uk]=Налаштовування синхронізації із пристроями
-Comment[x-test]=xxConfigure device synchronizationxx
-Comment[zh_CN]=配置设备同步
-Comment[zh_TW]=設定裝置同步
-Categories=Qt;KDE;Settings;HardwareSettings;
-NotShowIn=KDE;
-SingleMainWindow=true
diff --git a/smsapp/CMakeLists.txt b/smsapp/CMakeLists.txt
index 078d9db8e..6633764d5 100644
--- a/smsapp/CMakeLists.txt
+++ b/smsapp/CMakeLists.txt
@@ -66,7 +66,7 @@ target_link_libraries(kdeconnect-sms PRIVATE
KF6::DBusAddons
KF6::I18n
KF6::People
- KF6::KCMUtils
+ KF6::ColorScheme
KF6::Crash
)
More information about the kde-doc-english
mailing list