Drop Platform::touchPointCount()

It can be accessed directly in the touch input device handler.
This commit is contained in:
Vlad Zahorodnii 2021-10-28 10:55:59 +03:00
parent e83da51844
commit c09a03a927
3 changed files with 4 additions and 13 deletions

View file

@ -271,18 +271,18 @@ void TouchInputTest::testTouchMouseAction()
void TouchInputTest::testTouchPointCount()
{
QCOMPARE(kwinApp()->platform()->touchPointCount(), 0);
QCOMPARE(input()->touch()->touchPointCount(), 0);
quint32 timestamp = 1;
kwinApp()->platform()->touchDown(0, QPointF(125, 125), timestamp++);
kwinApp()->platform()->touchDown(1, QPointF(125, 125), timestamp++);
kwinApp()->platform()->touchDown(2, QPointF(125, 125), timestamp++);
QCOMPARE(kwinApp()->platform()->touchPointCount(), 3);
QCOMPARE(input()->touch()->touchPointCount(), 3);
kwinApp()->platform()->touchUp(1, timestamp++);
QCOMPARE(kwinApp()->platform()->touchPointCount(), 2);
QCOMPARE(input()->touch()->touchPointCount(), 2);
kwinApp()->platform()->cancelTouchSequence();
QCOMPARE(kwinApp()->platform()->touchPointCount(), 0);
QCOMPARE(input()->touch()->touchPointCount(), 0);
}
void TouchInputTest::testUpdateFocusOnDecorationDestroy()

View file

@ -320,14 +320,6 @@ void Platform::pointerButtonReleased(quint32 button, quint32 time)
input()->pointer()->processButton(button, InputRedirection::PointerButtonReleased, time);
}
int Platform::touchPointCount()
{
if (!input()) {
return 0;
}
return input()->touch()->touchPointCount();
}
void Platform::pointerMotion(const QPointF &position, quint32 time)
{
if (!input()) {

View file

@ -414,7 +414,6 @@ public Q_SLOTS:
void cancelTouchSequence();
void touchCancel();
void touchFrame();
int touchPointCount();
void processSwipeGestureBegin(int fingerCount, quint32 time);
void processSwipeGestureUpdate(const QSizeF &delta, quint32 time);