summaryrefslogtreecommitdiffstats
path: root/src/plugins/generic
diff options
context:
space:
mode:
authorRomain Pokrzywka <romain.pokrzywka@bluescape.com>2015-09-02 15:15:58 -0700
committerRomain Pokrzywka <romain.pokrzywka@gmail.com>2015-09-03 17:01:39 +0000
commit352c357e6f0785c0775a85151d6716b47aea1006 (patch)
tree7832108242289458c809521720d9d258699e5197 /src/plugins/generic
parent916909f8a9683b2d6006602e419231d5f3b66b88 (diff)
Improve evdevtablet plugin with support for multiple tablet devices
Migrated the evdevtablet code to use the same Manager/Handler model used by the other evdev plugins. The input event parsing code remains the same, it has just been merged into the new handler class, and hardcoded device ids have been replaced by proper per-device ids to support multiple tablet devices as detected by udev. Also added tablet count reporting to QInputDeviceManager. Change-Id: Ibd72db568646da4f32e7680dd51698a0a86dca99 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/plugins/generic')
-rw-r--r--src/plugins/generic/evdevtablet/main.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/plugins/generic/evdevtablet/main.cpp b/src/plugins/generic/evdevtablet/main.cpp
index 62524e8f33..3a9fd4f1dd 100644
--- a/src/plugins/generic/evdevtablet/main.cpp
+++ b/src/plugins/generic/evdevtablet/main.cpp
@@ -32,7 +32,7 @@
****************************************************************************/
#include <QtGui/qgenericplugin.h>
-#include <QtPlatformSupport/private/qevdevtablet_p.h>
+#include <QtPlatformSupport/private/qevdevtabletmanager_p.h>
QT_BEGIN_NAMESPACE
@@ -44,7 +44,6 @@ class QEvdevTabletPlugin : public QGenericPlugin
public:
QEvdevTabletPlugin();
- QStringList keys() const;
QObject* create(const QString &key, const QString &specification) Q_DECL_OVERRIDE;
};
@@ -52,16 +51,11 @@ QEvdevTabletPlugin::QEvdevTabletPlugin()
{
}
-QStringList QEvdevTabletPlugin::keys() const
-{
- return QStringList() << "EvdevTablet";
-}
-
-QObject *QEvdevTabletPlugin::create(const QString &key,
+QObject* QEvdevTabletPlugin::create(const QString &key,
const QString &spec)
{
if (!key.compare(QLatin1String("EvdevTablet"), Qt::CaseInsensitive))
- return new QEvdevTabletHandlerThread(spec);
+ return new QEvdevTabletManager(key, spec);
return 0;
}