summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/input/evdevtablet
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-10-13 15:32:29 +0200
committerLaszlo Agocs <laszlo.agocs@digia.com>2014-10-16 13:08:14 +0200
commitdae22ebfe48ea769fe55f5330411ca71e0a98542 (patch)
tree72b58d9965305d891fb01ac4efbce56805db4a9c /src/platformsupport/input/evdevtablet
parentcf046ccec0e9a2f174e6dc47f23cc8c4d5c1a935 (diff)
Switch to categorized logging in all the input handlers
Use the rule qt.qpa.input (similarly to xcb). In addition, evdevkeyboard supports qt.qpa.input.keymap to enable keymap debug messages. For compatibility, evdevtouch retains the QT_QPA_EVDEV_DEBUG environment variable, this will simply turn on the associated logging rule. Change-Id: Ia038beb827346d2573ca9a2b69b8dcc53adcf0eb Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Risto Avila <risto.avila@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/platformsupport/input/evdevtablet')
-rw-r--r--src/platformsupport/input/evdevtablet/qevdevtablet.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/platformsupport/input/evdevtablet/qevdevtablet.cpp b/src/platformsupport/input/evdevtablet/qevdevtablet.cpp
index 8d91c49488..8dbf5832d9 100644
--- a/src/platformsupport/input/evdevtablet/qevdevtablet.cpp
+++ b/src/platformsupport/input/evdevtablet/qevdevtablet.cpp
@@ -36,13 +36,15 @@
#include <QStringList>
#include <QSocketNotifier>
#include <QGuiApplication>
-#include <QDebug>
+#include <QLoggingCategory>
#include <QtCore/private/qcore_unix_p.h>
#include <QtPlatformSupport/private/qdevicediscovery_p.h>
#include <linux/input.h>
QT_BEGIN_NAMESPACE
+Q_LOGGING_CATEGORY(qLcEvdevTablet, "qt.qpa.input")
+
class QEvdevTabletData
{
public:
@@ -87,28 +89,28 @@ bool QEvdevTabletData::queryLimits()
if (ok) {
minValues.x = absInfo.minimum;
maxValues.x = absInfo.maximum;
- qDebug("evdevtablet: min X: %d max X: %d", minValues.x, maxValues.x);
+ qCDebug(qLcEvdevTablet, "evdevtablet: min X: %d max X: %d", minValues.x, maxValues.x);
}
ok &= ioctl(fd, EVIOCGABS(ABS_Y), &absInfo) >= 0;
if (ok) {
minValues.y = absInfo.minimum;
maxValues.y = absInfo.maximum;
- qDebug("evdevtablet: min Y: %d max Y: %d", minValues.y, maxValues.y);
+ qCDebug(qLcEvdevTablet, "evdevtablet: min Y: %d max Y: %d", minValues.y, maxValues.y);
}
if (ioctl(fd, EVIOCGABS(ABS_PRESSURE), &absInfo) >= 0) {
minValues.p = absInfo.minimum;
maxValues.p = absInfo.maximum;
- qDebug("evdevtablet: min pressure: %d max pressure: %d", minValues.p, maxValues.p);
+ qCDebug(qLcEvdevTablet, "evdevtablet: min pressure: %d max pressure: %d", minValues.p, maxValues.p);
}
if (ioctl(fd, EVIOCGABS(ABS_DISTANCE), &absInfo) >= 0) {
minValues.d = absInfo.minimum;
maxValues.d = absInfo.maximum;
- qDebug("evdevtablet: min distance: %d max distance: %d", minValues.d, maxValues.d);
+ qCDebug(qLcEvdevTablet, "evdevtablet: min distance: %d max distance: %d", minValues.d, maxValues.d);
}
char name[128];
if (ioctl(fd, EVIOCGNAME(sizeof(name) - 1), name) >= 0) {
devName = QString::fromLocal8Bit(name);
- qDebug("evdevtablet: device name: %s", name);
+ qCDebug(qLcEvdevTablet, "evdevtablet: device name: %s", name);
}
return ok;
}
@@ -232,7 +234,7 @@ QEvdevTabletHandler::QEvdevTabletHandler(const QString &spec, QObject *parent)
}
}
if (!dev.isEmpty()) {
- qDebug("evdevtablet: using %s", qPrintable(dev));
+ qCDebug(qLcEvdevTablet, "evdevtablet: using %s", qPrintable(dev));
d->fd = QT_OPEN(dev.toLocal8Bit().constData(), O_RDONLY | O_NDELAY, 0);
if (d->fd >= 0) {
d->testGrab();