summaryrefslogtreecommitdiffstats
path: root/src/plugins/generic/vxmouse/main.cpp
diff options
context:
space:
mode:
authorMichał Łoś <[email protected]>2024-10-03 10:40:28 +0200
committerMichał Łoś <[email protected]>2024-10-22 17:03:44 +0200
commit6d49bd766f32c357d959b7827706ff053829f9eb (patch)
tree613e69f4504cede48aa7f4918d6cab36978d9e69 /src/plugins/generic/vxmouse/main.cpp
parent3bd189ab7b6cda5ee9f7b91178a8ad41fa7badc5 (diff)
Introduce QVxMousePlugin
Since VxWorks evdev implementation should be treated as a separate entity, extract current code for handling evdev mouse and create a separate plugin which will use VxWorks version of evdev. This will allow to separate evolution of actual evdev from VxWorks. This is a preparatory change, no mouse detection will be added with this patch yet. Task-number: QTBUG-115777 Change-Id: Icb62aeca8f091f58efd3c731eb35d6a0695a591d Reviewed-by: Karim Pinter <[email protected]> Reviewed-by: Laszlo Agocs <[email protected]>
Diffstat (limited to 'src/plugins/generic/vxmouse/main.cpp')
-rw-r--r--src/plugins/generic/vxmouse/main.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/plugins/generic/vxmouse/main.cpp b/src/plugins/generic/vxmouse/main.cpp
new file mode 100644
index 00000000000..2ed9b8f0d5c
--- /dev/null
+++ b/src/plugins/generic/vxmouse/main.cpp
@@ -0,0 +1,36 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#include <QtGui/qgenericplugin.h>
+#include <QtInputSupport/private/qvxmousemanager_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QVxMousePlugin : public QGenericPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QGenericPluginFactoryInterface_iid FILE "vxmouse.json")
+
+public:
+ QVxMousePlugin();
+
+ QObject* create(const QString &key, const QString &specification) override;
+};
+
+QVxMousePlugin::QVxMousePlugin()
+ : QGenericPlugin()
+{
+}
+
+QObject* QVxMousePlugin::create(const QString &key,
+ const QString &specification)
+{
+ if (!key.compare(QLatin1String("VxMouse"), Qt::CaseInsensitive))
+ return new QVxMouseManager(key, specification);
+
+ return nullptr;
+}
+
+QT_END_NAMESPACE
+
+#include "main.moc"