From dae22ebfe48ea769fe55f5330411ca71e0a98542 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 13 Oct 2014 15:32:29 +0200 Subject: Switch to categorized logging in all the input handlers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Risto Avila Reviewed-by: Jørgen Lind --- src/platformsupport/input/evdevtablet/qevdevtablet.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/platformsupport/input/evdevtablet') 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 #include #include -#include +#include #include #include #include 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(); -- cgit v1.2.3