Drop Platform::touchPointCount()
It can be accessed directly in the touch input device handler.
This commit is contained in:
parent
e83da51844
commit
c09a03a927
3 changed files with 4 additions and 13 deletions
|
@ -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()
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue