Fix Typo in Surface::inputIsInfitine

- add correctly named method
- forward the wrongly named one
- adjust autotests

REVIEW:125260
This commit is contained in:
Sebastian Kügler 2015-09-16 16:43:58 +02:00
parent 2bd8a8b98a
commit 239e702f0f
3 changed files with 21 additions and 6 deletions

View file

@ -585,7 +585,7 @@ void TestWaylandSurface::testInput()
// by default there should be an empty == infinite input region
QCOMPARE(serverSurface->input(), QRegion());
QCOMPARE(serverSurface->inputIsInfitine(), true);
QCOMPARE(serverSurface->inputIsInfinite(), true);
// let's install an input region
s->setInputRegion(m_compositor->createRegion(QRegion(0, 10, 20, 30)).get());
@ -593,7 +593,7 @@ void TestWaylandSurface::testInput()
wl_display_flush(m_connection->display());
QCoreApplication::processEvents();
QCOMPARE(serverSurface->input(), QRegion());
QCOMPARE(serverSurface->inputIsInfitine(), true);
QCOMPARE(serverSurface->inputIsInfinite(), true);
QCOMPARE(inputRegionChangedSpy.count(), 0);
// so let's commit to get the new region
@ -602,7 +602,7 @@ void TestWaylandSurface::testInput()
QCOMPARE(inputRegionChangedSpy.count(), 1);
QCOMPARE(inputRegionChangedSpy.last().first().value<QRegion>(), QRegion(0, 10, 20, 30));
QCOMPARE(serverSurface->input(), QRegion(0, 10, 20, 30));
QCOMPARE(serverSurface->inputIsInfitine(), false);
QCOMPARE(serverSurface->inputIsInfinite(), false);
// committing without setting a new region shouldn't change
s->commit(Surface::CommitFlag::None);
@ -610,7 +610,7 @@ void TestWaylandSurface::testInput()
QCoreApplication::processEvents();
QCOMPARE(inputRegionChangedSpy.count(), 1);
QCOMPARE(serverSurface->input(), QRegion(0, 10, 20, 30));
QCOMPARE(serverSurface->inputIsInfitine(), false);
QCOMPARE(serverSurface->inputIsInfinite(), false);
// let's change the input region
s->setInputRegion(m_compositor->createRegion(QRegion(10, 20, 30, 40)).get());
@ -619,7 +619,7 @@ void TestWaylandSurface::testInput()
QCOMPARE(inputRegionChangedSpy.count(), 2);
QCOMPARE(inputRegionChangedSpy.last().first().value<QRegion>(), QRegion(10, 20, 30, 40));
QCOMPARE(serverSurface->input(), QRegion(10, 20, 30, 40));
QCOMPARE(serverSurface->inputIsInfitine(), false);
QCOMPARE(serverSurface->inputIsInfinite(), false);
// and let's go back to an empty region
s->setInputRegion();
@ -628,7 +628,7 @@ void TestWaylandSurface::testInput()
QCOMPARE(inputRegionChangedSpy.count(), 3);
QCOMPARE(inputRegionChangedSpy.last().first().value<QRegion>(), QRegion());
QCOMPARE(serverSurface->input(), QRegion());
QCOMPARE(serverSurface->inputIsInfitine(), true);
QCOMPARE(serverSurface->inputIsInfinite(), true);
}
void TestWaylandSurface::testDestroy()

View file

@ -460,6 +460,11 @@ QRegion SurfaceInterface::input() const
}
bool SurfaceInterface::inputIsInfitine() const
{
return inputIsInfinite();
}
bool SurfaceInterface::inputIsInfinite() const
{
Q_D();
return d->current.inputIsInfinite;

View file

@ -95,7 +95,17 @@ public:
QRegion damage() const;
QRegion opaque() const;
QRegion input() const;
/**
* Use Surface::inputIsInfinite instead.
* @deprecated
* @see inputIsInfinite
*/
bool inputIsInfitine() const;
/**
* Replaces Surface::inputIsInfitine instead.
* @since 5.5
*/
bool inputIsInfinite() const;
qint32 scale() const;
OutputInterface::Transform transform() const;
/**