[plasma/plasma-desktop] kcms/mouse: kcms/mouse: Drop InputBackend::create

Nicolas Fella <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 4faf3b93feb3d0203ada257d89974dcbea5a0ce6 by Nicolas Fella.
Committed on 16/07/2026 at 14:52.
Pushed by nicolasfella into branch 'master'.

kcms/mouse: Drop InputBackend::create

M  +0    -11   kcms/mouse/inputbackend.cpp
M  +0    -1    kcms/mouse/inputbackend.h
M  +1    -1    kcms/mouse/kcm.cpp
M  +1    -1    kcms/mouse/mousemoduledata.cpp

https://invent.kde.org/plasma/plasma-desktop/-/commit/4faf3b93feb3d0203ada257d89974dcbea5a0ce6

diff --git a/kcms/mouse/inputbackend.cpp b/kcms/mouse/inputbackend.cpp
index 15868bf4cd..417b758e22 100644
--- a/kcms/mouse/inputbackend.cpp
+++ b/kcms/mouse/inputbackend.cpp
@@ -17,17 +17,6 @@
 #include "devicesmodel.h"
 #include "logging.h"
 
-std::unique_ptr<InputBackend> InputBackend::create()
-{
-    if (KWindowSystem::isPlatformWayland()) {
-        qCDebug(KCM_MOUSE) << "Using KWin+Wayland backend";
-        return std::make_unique<InputBackend>();
-    }
-
-    qCCritical(KCM_MOUSE) << "Not able to select appropriate backend.";
-    return nullptr;
-}
-
 void InputBackend::registerImplementationTypes(const char *uri)
 {
     qmlRegisterUncreatableType<InputBackend>(uri, 1, 0, "KWinWaylandBackend", QString());
diff --git a/kcms/mouse/inputbackend.h b/kcms/mouse/inputbackend.h
index 1aa9573520..83da60c9fd 100644
--- a/kcms/mouse/inputbackend.h
+++ b/kcms/mouse/inputbackend.h
@@ -31,7 +31,6 @@ class InputBackend : public QObject
     Q_PROPERTY(int buttonMappingCount READ buttonMappingCount NOTIFY buttonMappingChanged STORED false FINAL)
 
 public:
-    static std::unique_ptr<InputBackend> create();
     static void registerImplementationTypes(const char *uri);
 
     explicit InputBackend();
diff --git a/kcms/mouse/kcm.cpp b/kcms/mouse/kcm.cpp
index 39d3c2c176..762528ed42 100644
--- a/kcms/mouse/kcm.cpp
+++ b/kcms/mouse/kcm.cpp
@@ -56,7 +56,7 @@ KCMMouse::KCMMouse(QObject *parent, const KPluginMetaData &data, [[maybe_unused]
     qmlRegisterUncreatableType<InputDevice>(uri, 1, 0, "InputDevice", QString());
     InputBackend::registerImplementationTypes(uri);
 
-    m_inputBackend = InputBackend::create();
+    m_inputBackend = std::make_unique<InputBackend>();
 
     if (!m_inputBackend) {
         m_initError = true;
diff --git a/kcms/mouse/mousemoduledata.cpp b/kcms/mouse/mousemoduledata.cpp
index 3b07c08676..c508323285 100644
--- a/kcms/mouse/mousemoduledata.cpp
+++ b/kcms/mouse/mousemoduledata.cpp
@@ -11,7 +11,7 @@
 MouseModuleData::MouseModuleData(QObject *parent)
     : KCModuleData(parent)
 {
-    m_backend = InputBackend::create();
+    m_backend = std::make_unique<InputBackend>();
     if (!m_backend) {
         return;
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.