Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Add debugging for device capabilities for mouse and wheel events
Dmitry Kazakovec5310a4cb6d
diff --git a/libs/ui/input/kis_tablet_debugger.cpp b/libs/ui/input/kis_tablet_debugger.cppindex 242b217266..c3c3380bdd 100644--- a/libs/ui/input/kis_tablet_debugger.cpp+++ b/libs/ui/input/kis_tablet_debugger.cpp@@ -142,7 +142,12 @@ QString KisTabletDebugger::eventToString(const QMouseEvent &ev, const QString &pdumpBaseParams(s, ev, prefix);dumpMouseRelatedParams(s, ev);s << "hires: " << qSetFieldWidth(8) << ev.screenPos().x() << qSetFieldWidth(0) << "," << qSetFieldWidth(8) << ev.screenPos().y() << qSetFieldWidth(0) << " ";- s << "source: " << sourceToString(ev.source());+ s << "source: " << sourceToString(ev.source()) << " ";+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)+ s << "dev. type: " << static_cast<int>(ev.device()->type()) << " ";+ s << "dev. caps: " << static_cast<int>(ev.device()->capabilities()) << " ";+ s << "dev. name: " << ev.device()->name() << " ";+#endifreturn string;}@@ -175,7 +180,9 @@ QString KisTabletDebugger::eventToString(const QWheelEvent &ev, const QString &ps << "delta: x: " << ev.angleDelta().x() << " y: " << ev.angleDelta().y() << " ";s << "source: " << sourceToString(ev.source()) << " ";#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)- s << "dev. type: " << static_cast<int>(ev.device()->type());+ s << "dev. type: " << static_cast<int>(ev.device()->type()) << " ";+ s << "dev. caps: " << static_cast<int>(ev.device()->capabilities()) << " ";+ s << "dev. name: " << ev.device()->name() << " ";#endifreturn string;