1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
diff --git a/src/desktop/utils/qtguicompat.h b/src/desktop/utils/qtguicompat.h
index 589c07e73..62bf3671e 100644
--- a/src/desktop/utils/qtguicompat.h
+++ b/src/desktop/utils/qtguicompat.h
@@ -115,6 +115,12 @@ using CheckBoxState = int;
# define COMPAT_CHECKBOX_STATE_CHANGED_SIGNAL(CLS) &CLS::stateChanged
#endif
+#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
+# define COMPAT_FLAGS_ARG(F) (F).toInt()
+#else
+# define COMPAT_FLAGS_ARG(F) (F)
+#endif
+
}
#endif
diff --git a/src/desktop/widgets/tablettest.cpp b/src/desktop/widgets/tablettest.cpp
index e01d2474f..fc57a2484 100644
--- a/src/desktop/widgets/tablettest.cpp
+++ b/src/desktop/widgets/tablettest.cpp
@@ -66,7 +66,7 @@ void TabletTester::mouseMoveEvent(QMouseEvent *e)
emit eventReport(QString("Mouse move X=%1 Y=%2 B=%3")
.arg(mousePos.x())
.arg(mousePos.y())
- .arg(e->buttons()));
+ .arg(COMPAT_FLAGS_ARG(e->buttons())));
m_mousePath << e->pos();
update();
}
@@ -118,7 +118,7 @@ void TabletTester::tabletEvent(QTabletEvent *e)
msg += QString(" X=%1 Y=%2 B=%3 P=%4% XT=%5° YT=%6° R=%7° T=%8 %9")
.arg(posF.x(), 0, 'f', 2)
.arg(posF.y(), 0, 'f', 2)
- .arg(e->buttons())
+ .arg(COMPAT_FLAGS_ARG(e->buttons()))
.arg(e->pressure() * 100, 0, 'f', 1)
.arg(e->xTilt())
.arg(e->yTilt())
|