diff options
-rw-r--r-- | src/gui/kernel/qinputdevice.cpp | 9 | ||||
-rw-r--r-- | src/gui/kernel/qpointingdevice.cpp | 12 | ||||
-rw-r--r-- | tests/auto/gui/kernel/qinputdevice/tst_qinputdevice.cpp | 4 |
3 files changed, 12 insertions, 13 deletions
diff --git a/src/gui/kernel/qinputdevice.cpp b/src/gui/kernel/qinputdevice.cpp index 3027c733e7..e70b0d61be 100644 --- a/src/gui/kernel/qinputdevice.cpp +++ b/src/gui/kernel/qinputdevice.cpp @@ -41,11 +41,14 @@ #include "qinputdevice_p.h" #include <QCoreApplication> #include <QDebug> +#include <QLoggingCategory> #include <QMutex> #include <QScreen> QT_BEGIN_NAMESPACE +Q_DECLARE_LOGGING_CATEGORY(lcQpaInputDevices) + /*! \class QInputDevice \brief The QInputDevice class describes a device from which a QInputEvent originates. @@ -208,9 +211,9 @@ const QInputDevice *QInputDevice::primaryKeyboard(const QString& seatName) } } if (!ret) { - qWarning() << "no keyboards registered for seat" << seatName - << "The platform plugin should have provided one via " - "QWindowSystemInterface::registerInputDevice(). Creating a default one for now."; + qCDebug(lcQpaInputDevices) << "no keyboards registered for seat" << seatName + << "The platform plugin should have provided one via " + "QWindowSystemInterface::registerInputDevice(). Creating a default one for now."; ret = new QInputDevice(QLatin1String("core keyboard"), 0, DeviceType::Keyboard, seatName); QInputDevicePrivate::registerDevice(ret); return ret; diff --git a/src/gui/kernel/qpointingdevice.cpp b/src/gui/kernel/qpointingdevice.cpp index 5f4b6e0fd8..29423f9c0d 100644 --- a/src/gui/kernel/qpointingdevice.cpp +++ b/src/gui/kernel/qpointingdevice.cpp @@ -328,9 +328,9 @@ const QPointingDevice *QPointingDevice::primaryPointingDevice(const QString& sea } } if (!mouse && !touchpad) { - qWarning() << "no mouse-like devices registered for seat" << seatName - << "The platform plugin should have provided one via " - "QWindowSystemInterface::registerInputDevice(). Creating a default mouse for now."; + qCDebug(lcQpaInputDevices) << "no mouse-like devices registered for seat" << seatName + << "The platform plugin should have provided one via " + "QWindowSystemInterface::registerInputDevice(). Creating a default mouse for now."; mouse = new QPointingDevice(QLatin1String("core pointer"), 1, DeviceType::Mouse, PointerType::Generic, Capability::Position, 1, 3, seatName); QInputDevicePrivate::registerDevice(mouse); @@ -372,9 +372,9 @@ const QPointingDevice *QPointingDevice::tabletDevice(QInputDevice::DeviceType de return pdev; } } - qWarning() << "failed to find registered tablet device" << deviceType << pointerType << Qt::hex << uniqueId.numericId() - << "The platform plugin should have provided one via " - "QWindowSystemInterface::registerInputDevice(). Creating a default one for now."; + qCDebug(lcQpaInputDevices) << "failed to find registered tablet device" << deviceType << pointerType << Qt::hex << uniqueId.numericId() + << "The platform plugin should have provided one via " + "QWindowSystemInterface::registerInputDevice(). Creating a default one for now."; QPointingDevice *dev = new QPointingDevice(QLatin1String("fake tablet"), 2, deviceType, pointerType, QInputDevice::Capability::Position | QInputDevice::Capability::Pressure, 1, 1, QString(), uniqueId); diff --git a/tests/auto/gui/kernel/qinputdevice/tst_qinputdevice.cpp b/tests/auto/gui/kernel/qinputdevice/tst_qinputdevice.cpp index a46a72532a..6b05bf787c 100644 --- a/tests/auto/gui/kernel/qinputdevice/tst_qinputdevice.cpp +++ b/tests/auto/gui/kernel/qinputdevice/tst_qinputdevice.cpp @@ -64,10 +64,6 @@ void tst_QInputDevice::multiSeatDevices() QVERIFY(QInputDevicePrivate::fromId(1010)->hasCapability(QInputDevice::Capability::Scroll)); QVERIFY(QInputDevicePrivate::fromId(2010)); QVERIFY(!QInputDevicePrivate::fromId(2010)->hasCapability(QInputDevice::Capability::Scroll)); - QTest::ignoreMessage(QtWarningMsg, "no keyboards registered for seat \"\" The platform plugin should have provided one via " - "QWindowSystemInterface::registerInputDevice(). Creating a default one for now."); - QTest::ignoreMessage(QtWarningMsg, "no mouse-like devices registered for seat \"\" The platform plugin should have provided one via " - "QWindowSystemInterface::registerInputDevice(). Creating a default mouse for now."); QVERIFY(QInputDevice::primaryKeyboard()); QCOMPARE(QInputDevice::primaryKeyboard()->id(), 0); QVERIFY(QPointingDevice::primaryPointingDevice()); |