diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/client/client/tst_client.cpp | 2 | ||||
-rw-r--r-- | tests/auto/client/clientextension/tst_clientextension.cpp | 12 | ||||
-rw-r--r-- | tests/auto/client/datadevicev1/tst_datadevicev1.cpp | 2 | ||||
-rw-r--r-- | tests/auto/client/fullscreenshellv1/tst_fullscreenshellv1.cpp | 2 | ||||
-rw-r--r-- | tests/auto/client/inputcontext/tst_inputcontext.cpp | 8 | ||||
-rw-r--r-- | tests/auto/client/primaryselectionv1/tst_primaryselectionv1.cpp | 2 | ||||
-rw-r--r-- | tests/auto/client/seat/tst_seat.cpp | 26 | ||||
-rw-r--r-- | tests/auto/client/seatv4/tst_seatv4.cpp | 10 | ||||
-rw-r--r-- | tests/auto/client/shared/iviapplication.cpp | 2 | ||||
-rw-r--r-- | tests/auto/client/shared/mockcompositor.cpp | 2 | ||||
-rw-r--r-- | tests/auto/client/surface/tst_surface.cpp | 16 | ||||
-rw-r--r-- | tests/auto/client/xdgshell/tst_xdgshell.cpp | 12 | ||||
-rw-r--r-- | tests/auto/compositor/compositor/tst_compositor.cpp | 52 |
13 files changed, 74 insertions, 74 deletions
diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp index 1c288324..db4eb77e 100644 --- a/tests/auto/client/client/tst_client.cpp +++ b/tests/auto/client/client/tst_client.cpp @@ -590,7 +590,7 @@ void tst_WaylandClient::longWindowTitleWithUtf16Characters() { QWindow window; QString absurdlyLongTitle = QString("δΈ‰").repeated(10000); - Q_ASSERT(absurdlyLongTitle.length() == 10000); // just making sure the test isn't broken + Q_ASSERT(absurdlyLongTitle.size() == 10000); // just making sure the test isn't broken window.setTitle(absurdlyLongTitle); window.show(); QCOMPOSITOR_TRY_VERIFY(surface()); diff --git a/tests/auto/client/clientextension/tst_clientextension.cpp b/tests/auto/client/clientextension/tst_clientextension.cpp index 209afa82..a6e79bd2 100644 --- a/tests/auto/client/clientextension/tst_clientextension.cpp +++ b/tests/auto/client/clientextension/tst_clientextension.cpp @@ -69,10 +69,10 @@ void tst_clientextension::createWithoutGlobal() QSignalSpy spy(&extension, &QWaylandClientExtension::activeChanged); QVERIFY(spy.isValid()); QVERIFY(!extension.isActive()); - QCOMPARE(spy.count(), 0); + QCOMPARE(spy.size(), 0); extension.initialize(); QVERIFY(!extension.isActive()); - QCOMPARE(spy.count(), 0); + QCOMPARE(spy.size(), 0); } void tst_clientextension::createWithGlobalAutomatic() @@ -83,7 +83,7 @@ void tst_clientextension::createWithGlobalAutomatic() QSignalSpy spy(&extension, &QWaylandClientExtension::activeChanged); QVERIFY(spy.isValid()); QTRY_VERIFY(extension.isActive()); - QCOMPARE(spy.count(), 1); + QCOMPARE(spy.size(), 1); } void tst_clientextension::createWithGlobalManual() @@ -96,7 +96,7 @@ void tst_clientextension::createWithGlobalManual() QVERIFY(spy.isValid()); extension.initialize(); QVERIFY(extension.isActive()); - QCOMPARE(spy.count(), 1); + QCOMPARE(spy.size(), 1); } void tst_clientextension::globalBecomesAvailable() @@ -106,7 +106,7 @@ void tst_clientextension::globalBecomesAvailable() QVERIFY(spy.isValid()); exec([this] { add<TestGlobal>(); }); QTRY_VERIFY(extension.isActive()); - QCOMPARE(spy.count(), 1); + QCOMPARE(spy.size(), 1); } void tst_clientextension::globalRemoved() @@ -120,7 +120,7 @@ void tst_clientextension::globalRemoved() exec([this] { removeAll<TestGlobal>(); }); QTRY_VERIFY(!extension.isActive()); - QCOMPARE(spy.count(), 1); + QCOMPARE(spy.size(), 1); } QCOMPOSITOR_TEST_MAIN(tst_clientextension) diff --git a/tests/auto/client/datadevicev1/tst_datadevicev1.cpp b/tests/auto/client/datadevicev1/tst_datadevicev1.cpp index d4dfa2da..d78255e9 100644 --- a/tests/auto/client/datadevicev1/tst_datadevicev1.cpp +++ b/tests/auto/client/datadevicev1/tst_datadevicev1.cpp @@ -213,7 +213,7 @@ void tst_datadevicev1::destroysSelectionOnLeave() keyboard()->sendLeave(surface); }); - QTRY_COMPARE(dataChangedSpy.count(), 1); + QTRY_COMPARE(dataChangedSpy.size(), 1); QVERIFY(!QGuiApplication::clipboard()->mimeData(QClipboard::Clipboard)->hasText()); } diff --git a/tests/auto/client/fullscreenshellv1/tst_fullscreenshellv1.cpp b/tests/auto/client/fullscreenshellv1/tst_fullscreenshellv1.cpp index c48e5532..15613bc0 100644 --- a/tests/auto/client/fullscreenshellv1/tst_fullscreenshellv1.cpp +++ b/tests/auto/client/fullscreenshellv1/tst_fullscreenshellv1.cpp @@ -25,7 +25,7 @@ void tst_WaylandClientFullScreenShellV1::createDestroyWindow() window.resize(800, 600); window.show(); - QCOMPOSITOR_TRY_VERIFY(fullScreenShellV1()->surfaces().count() == 1); + QCOMPOSITOR_TRY_VERIFY(fullScreenShellV1()->surfaces().size() == 1); QCOMPOSITOR_VERIFY(surface(0)); window.destroy(); diff --git a/tests/auto/client/inputcontext/tst_inputcontext.cpp b/tests/auto/client/inputcontext/tst_inputcontext.cpp index 9bcfa9e7..328dc1fb 100644 --- a/tests/auto/client/inputcontext/tst_inputcontext.cpp +++ b/tests/auto/client/inputcontext/tst_inputcontext.cpp @@ -36,9 +36,9 @@ private: { exec([&] { QList<arg_type *> extensions = getAll<arg_type>(); - if (extensions.length() > 1) + if (extensions.size() > 1) QFAIL("Requested type is a singleton, hence there should not be more then one object returned"); - if (extensions.length() == 0) + if (extensions.size() == 0) add<arg_type>(); }); } @@ -48,9 +48,9 @@ private: { exec([&] { QList<arg_type *> extensions = getAll<arg_type>(); - if (extensions.length() > 1) + if (extensions.size() > 1) QFAIL("Requested type is a singleton, hence there should not be more then one object returned"); - if (extensions.length() == 1) + if (extensions.size() == 1) remove(extensions.first()); }); } diff --git a/tests/auto/client/primaryselectionv1/tst_primaryselectionv1.cpp b/tests/auto/client/primaryselectionv1/tst_primaryselectionv1.cpp index d947d300..5ec046d1 100644 --- a/tests/auto/client/primaryselectionv1/tst_primaryselectionv1.cpp +++ b/tests/auto/client/primaryselectionv1/tst_primaryselectionv1.cpp @@ -409,7 +409,7 @@ void tst_primaryselectionv1::destroysSelectionOnLeave() keyboard()->sendLeave(surface); }); - QTRY_COMPARE(selectionChangedSpy.count(), 1); + QTRY_COMPARE(selectionChangedSpy.size(), 1); QVERIFY(!QGuiApplication::clipboard()->mimeData(QClipboard::Selection)->hasText()); } diff --git a/tests/auto/client/seat/tst_seat.cpp b/tests/auto/client/seat/tst_seat.cpp index 0b1e1b2a..68749486 100644 --- a/tests/auto/client/seat/tst_seat.cpp +++ b/tests/auto/client/seat/tst_seat.cpp @@ -94,7 +94,7 @@ void tst_seat::usesEnterSerial() }); QCOMPOSITOR_TRY_VERIFY(pointer()->cursorSurface()); - QTRY_COMPARE(setCursorSpy.count(), 1); + QTRY_COMPARE(setCursorSpy.size(), 1); QCOMPARE(setCursorSpy.takeFirst().at(0).toUInt(), enterSerial); } @@ -438,14 +438,14 @@ void tst_seat::singleTap() auto e = window.m_events.takeFirst(); QCOMPARE(e.type, QEvent::TouchBegin); QCOMPARE(e.touchPointStates, QEventPoint::State::Pressed); - QCOMPARE(e.touchPoints.length(), 1); + QCOMPARE(e.touchPoints.size(), 1); QCOMPARE(e.touchPoints.first().position(), QPointF(32-window.frameMargins().left(), 32-window.frameMargins().top())); } { auto e = window.m_events.takeFirst(); QCOMPARE(e.type, QEvent::TouchEnd); QCOMPARE(e.touchPointStates, QEventPoint::State::Released); - QCOMPARE(e.touchPoints.length(), 1); + QCOMPARE(e.touchPoints.size(), 1); QCOMPARE(e.touchPoints.first().position(), QPointF(32-window.frameMargins().left(), 32-window.frameMargins().top())); } } @@ -469,14 +469,14 @@ void tst_seat::singleTapFloat() auto e = window.m_events.takeFirst(); QCOMPARE(e.type, QEvent::TouchBegin); QCOMPARE(e.touchPointStates, QEventPoint::State::Pressed); - QCOMPARE(e.touchPoints.length(), 1); + QCOMPARE(e.touchPoints.size(), 1); QCOMPARE(e.touchPoints.first().position(), QPointF(32.75-window.frameMargins().left(), 32.25-window.frameMargins().top())); } { auto e = window.m_events.takeFirst(); QCOMPARE(e.type, QEvent::TouchEnd); QCOMPARE(e.touchPointStates, QEventPoint::State::Released); - QCOMPARE(e.touchPoints.length(), 1); + QCOMPARE(e.touchPoints.size(), 1); QCOMPARE(e.touchPoints.first().position(), QPointF(32.75-window.frameMargins().left(), 32.25-window.frameMargins().top())); } } @@ -512,7 +512,7 @@ void tst_seat::multiTouch() auto e = window.m_events.takeFirst(); QCOMPARE(e.type, QEvent::TouchBegin); QCOMPARE(e.touchPointStates, QEventPoint::State::Pressed); - QCOMPARE(e.touchPoints.length(), 2); + QCOMPARE(e.touchPoints.size(), 2); QCOMPARE(e.touchPoints[0].state(), QEventPoint::State::Pressed); QCOMPARE(e.touchPoints[0].position(), QPointF(32-window.frameMargins().left(), 32-window.frameMargins().top())); @@ -523,7 +523,7 @@ void tst_seat::multiTouch() { auto e = window.m_events.takeFirst(); QCOMPARE(e.type, QEvent::TouchUpdate); - QCOMPARE(e.touchPoints.length(), 2); + QCOMPARE(e.touchPoints.size(), 2); QCOMPARE(e.touchPoints[0].state(), QEventPoint::State::Updated); QCOMPARE(e.touchPoints[0].position(), QPointF(33-window.frameMargins().left(), 32-window.frameMargins().top())); @@ -535,7 +535,7 @@ void tst_seat::multiTouch() auto e = window.m_events.takeFirst(); QCOMPARE(e.type, QEvent::TouchUpdate); QCOMPARE(e.touchPointStates, QEventPoint::State::Released | QEventPoint::State::Stationary); - QCOMPARE(e.touchPoints.length(), 2); + QCOMPARE(e.touchPoints.size(), 2); QCOMPARE(e.touchPoints[0].state(), QEventPoint::State::Released); QCOMPARE(e.touchPoints[0].position(), QPointF(33-window.frameMargins().left(), 32-window.frameMargins().top())); @@ -547,7 +547,7 @@ void tst_seat::multiTouch() auto e = window.m_events.takeFirst(); QCOMPARE(e.type, QEvent::TouchEnd); QCOMPARE(e.touchPointStates, QEventPoint::State::Released); - QCOMPARE(e.touchPoints.length(), 1); + QCOMPARE(e.touchPoints.size(), 1); QCOMPARE(e.touchPoints[0].state(), QEventPoint::State::Released); QCOMPARE(e.touchPoints[0].position(), QPointF(49-window.frameMargins().left(), 48-window.frameMargins().top())); } @@ -589,14 +589,14 @@ void tst_seat::multiTouchUpAndMotionFrame() { auto e = window.m_events.takeFirst(); QCOMPARE(e.type, QEvent::TouchUpdate); - QCOMPARE(e.touchPoints.length(), 2); + QCOMPARE(e.touchPoints.size(), 2); QCOMPARE(e.touchPoints[0].state(), QEventPoint::State::Released); QCOMPARE(e.touchPoints[1].state(), QEventPoint::State::Updated); } { auto e = window.m_events.takeFirst(); QCOMPARE(e.type, QEvent::TouchEnd); - QCOMPARE(e.touchPoints.length(), 1); + QCOMPARE(e.touchPoints.size(), 1); QCOMPARE(e.touchPoints[0].state(), QEventPoint::State::Released); } QVERIFY(window.m_events.empty()); @@ -653,13 +653,13 @@ void tst_seat::cancelTouch() auto e = window.m_events.takeFirst(); QCOMPARE(e.type, QEvent::TouchBegin); QCOMPARE(e.touchPointStates, QEventPoint::State::Pressed); - QCOMPARE(e.touchPoints.length(), 1); + QCOMPARE(e.touchPoints.size(), 1); QCOMPARE(e.touchPoints.first().position(), QPointF(32-window.frameMargins().left(), 32-window.frameMargins().top())); } { auto e = window.m_events.takeFirst(); QCOMPARE(e.type, QEvent::TouchCancel); - QCOMPARE(e.touchPoints.length(), 0); + QCOMPARE(e.touchPoints.size(), 0); } } diff --git a/tests/auto/client/seatv4/tst_seatv4.cpp b/tests/auto/client/seatv4/tst_seatv4.cpp index 3a5a479f..873b0ff6 100644 --- a/tests/auto/client/seatv4/tst_seatv4.cpp +++ b/tests/auto/client/seatv4/tst_seatv4.cpp @@ -127,7 +127,7 @@ void tst_seatv4::usesEnterSerial() }); QCOMPOSITOR_TRY_VERIFY(cursorSurface()); - QTRY_COMPARE(setCursorSpy.count(), 1); + QTRY_COMPARE(setCursorSpy.size(), 1); QCOMPARE(setCursorSpy.takeFirst().at(0).toUInt(), enterSerial); } @@ -139,13 +139,13 @@ void tst_seatv4::focusDestruction() window.show(); QCOMPOSITOR_TRY_VERIFY(xdgSurface() && xdgSurface()->m_committedConfigureSerial); // Setting a cursor now is not allowed since there has been no enter event - QCOMPARE(setCursorSpy.count(), 0); + QCOMPARE(setCursorSpy.size(), 0); uint enterSerial = exec([&] { return pointer()->sendEnter(xdgSurface()->m_surface, {32, 32}); }); QCOMPOSITOR_TRY_VERIFY(cursorSurface()); - QTRY_COMPARE(setCursorSpy.count(), 1); + QTRY_COMPARE(setCursorSpy.size(), 1); QCOMPARE(setCursorSpy.takeFirst().at(0).toUInt(), enterSerial); // Destroy the focus @@ -159,7 +159,7 @@ void tst_seatv4::focusDestruction() // Setting a cursor now is not allowed since there has been no enter event xdgPingAndWaitForPong(); - QCOMPARE(setCursorSpy.count(), 0); + QCOMPARE(setCursorSpy.size(), 0); } void tst_seatv4::mousePress() @@ -568,7 +568,7 @@ void tst_seatv4::animatedCursor() }); // Verify that we get a new cursor buffer - QTRY_COMPARE(bufferSpy.count(), 1); + QTRY_COMPARE(bufferSpy.size(), 1); } #endif // QT_CONFIG(cursor) diff --git a/tests/auto/client/shared/iviapplication.cpp b/tests/auto/client/shared/iviapplication.cpp index 7d487d28..978834ca 100644 --- a/tests/auto/client/shared/iviapplication.cpp +++ b/tests/auto/client/shared/iviapplication.cpp @@ -15,7 +15,7 @@ void IviApplication::ivi_application_surface_create(Resource *resource, uint32_t auto *s = fromResource<Surface>(surface); auto *iviSurface = new IviSurface(this, s, ivi_id, resource->client(), id, resource->version()); m_iviSurfaces << iviSurface; - qDebug() << "count is " << m_iviSurfaces.count(); + qDebug() << "count is " << m_iviSurfaces.size(); } IviSurface::IviSurface(IviApplication *iviApplication, Surface *surface, uint32_t ivi_id, wl_client *client, int id, int version) diff --git a/tests/auto/client/shared/mockcompositor.cpp b/tests/auto/client/shared/mockcompositor.cpp index 03d0ffb6..1266f776 100644 --- a/tests/auto/client/shared/mockcompositor.cpp +++ b/tests/auto/client/shared/mockcompositor.cpp @@ -92,7 +92,7 @@ void DefaultCompositor::xdgPingAndWaitForPong() { QSignalSpy pongSpy(exec([=] { return get<XdgWmBase>(); }), &XdgWmBase::pong); uint serial = exec([=] { return sendXdgShellPing(); }); - QTRY_COMPARE(pongSpy.count(), 1); + QTRY_COMPARE(pongSpy.size(), 1); QTRY_COMPARE(pongSpy.first().at(0).toUInt(), serial); } diff --git a/tests/auto/client/surface/tst_surface.cpp b/tests/auto/client/surface/tst_surface.cpp index e8345086..083bc4fa 100644 --- a/tests/auto/client/surface/tst_surface.cpp +++ b/tests/auto/client/surface/tst_surface.cpp @@ -55,7 +55,7 @@ void tst_surface::waitForFrameCallbackRaster() exec([=] { xdgToplevel()->sendCompleteConfigure(); }); // We should get the first buffer without waiting for a frame callback - QTRY_COMPARE(bufferSpy.count(), 1); + QTRY_COMPARE(bufferSpy.size(), 1); bufferSpy.removeFirst(); // Make sure we follow frame callbacks for some frames @@ -66,7 +66,7 @@ void tst_surface::waitForFrameCallbackRaster() QVERIFY(!xdgToplevel()->surface()->m_waitingFrameCallbacks.empty()); xdgToplevel()->surface()->sendFrameCallbacks(); }); - QTRY_COMPARE(bufferSpy.count(), 1); + QTRY_COMPARE(bufferSpy.size(), 1); bufferSpy.removeFirst(); } } @@ -96,14 +96,14 @@ void tst_surface::waitForFrameCallbackGl() exec([=] { xdgToplevel()->sendCompleteConfigure(); }); // We should get the first buffer without waiting for a frame callback - QTRY_COMPARE(bufferSpy.count(), 1); + QTRY_COMPARE(bufferSpy.size(), 1); bufferSpy.removeFirst(); // Make sure we follow frame callbacks for some frames for (int i = 0; i < 5; ++i) { xdgPingAndWaitForPong(); // Make sure things have happened on the client if (!qEnvironmentVariableIntValue("QT_WAYLAND_DISABLE_WINDOWDECORATION") && i == 0) { - QCOMPARE(bufferSpy.count(), 1); + QCOMPARE(bufferSpy.size(), 1); bufferSpy.removeFirst(); } exec([&] { @@ -111,7 +111,7 @@ void tst_surface::waitForFrameCallbackGl() QVERIFY(!xdgToplevel()->surface()->m_waitingFrameCallbacks.empty()); xdgToplevel()->surface()->sendFrameCallbacks(); }); - QTRY_COMPARE(bufferSpy.count(), 1); + QTRY_COMPARE(bufferSpy.size(), 1); bufferSpy.removeFirst(); } } @@ -168,15 +168,15 @@ void tst_surface::createSubsurface() // Move subsurface. The parent should redraw and commit subWindow.setGeometry(100, 100, 64, 64); // the toplevel should commit to indicate the subsurface moved - QCOMPOSITOR_TRY_COMPARE(mainSurfaceCommitSpy.count(), 1); + QCOMPOSITOR_TRY_COMPARE(mainSurfaceCommitSpy.size(), 1); mainSurfaceCommitSpy.clear(); childSurfaceCommitSpy.clear(); // Move and resize the subSurface. The parent should redraw and commit // The child should also redraw subWindow.setGeometry(50, 50, 80, 80); - QCOMPOSITOR_TRY_COMPARE(mainSurfaceCommitSpy.count(), 1); - QCOMPOSITOR_TRY_COMPARE(childSurfaceCommitSpy.count(), 1); + QCOMPOSITOR_TRY_COMPARE(mainSurfaceCommitSpy.size(), 1); + QCOMPOSITOR_TRY_COMPARE(childSurfaceCommitSpy.size(), 1); } diff --git a/tests/auto/client/xdgshell/tst_xdgshell.cpp b/tests/auto/client/xdgshell/tst_xdgshell.cpp index 8d275e1e..e560784e 100644 --- a/tests/auto/client/xdgshell/tst_xdgshell.cpp +++ b/tests/auto/client/xdgshell/tst_xdgshell.cpp @@ -78,7 +78,7 @@ void tst_xdgshell::basicConfigure() QTRY_VERIFY(window.isExposed()); // The client is now going to ack the configure - QTRY_COMPARE(configureSpy.count(), 1); + QTRY_COMPARE(configureSpy.size(), 1); QCOMPARE(configureSpy.takeFirst().at(0).toUInt(), serial); // And attach a buffer @@ -104,7 +104,7 @@ void tst_xdgshell::configureSize() xdgToplevel()->sendCompleteConfigure(configureSize); }); - QTRY_COMPARE(configureSpy.count(), 1); + QTRY_COMPARE(configureSpy.size(), 1); exec([=] { Buffer *buffer = xdgToplevel()->surface()->m_committed.buffer; @@ -192,7 +192,7 @@ void tst_xdgshell::popup() QCOMPOSITOR_TRY_VERIFY(xdgToplevel()); QSignalSpy toplevelConfigureSpy(exec([=] { return xdgSurface(); }), &XdgSurface::configureCommitted); exec([=] { xdgToplevel()->sendCompleteConfigure(); }); - QTRY_COMPARE(toplevelConfigureSpy.count(), 1); + QTRY_COMPARE(toplevelConfigureSpy.size(), 1); uint clickSerial = exec([=] { auto *surface = xdgToplevel()->surface(); @@ -230,7 +230,7 @@ void tst_xdgshell::popup() QTRY_VERIFY(popup->isExposed()); // The client is now going to ack the configure - QTRY_COMPARE(popupConfigureSpy.count(), 1); + QTRY_COMPARE(popupConfigureSpy.size(), 1); QCOMPARE(popupConfigureSpy.takeFirst().at(0).toUInt(), configureSerial); // And attach a buffer @@ -560,7 +560,7 @@ void tst_xdgshell::pongs() wl_resource *resource = base->resourceMap().first()->handle; base->send_ping(resource, serial); }); - QTRY_COMPARE(pongSpy.count(), 1); + QTRY_COMPARE(pongSpy.size(), 1); QCOMPARE(pongSpy.first().at(0).toUInt(), serial); } @@ -626,7 +626,7 @@ void tst_xdgshell::foreignSurface() // the pointer events above are handled. QSignalSpy spy(exec([=] { return surface(newSurfaceIndex); }), &Surface::commit); wl_surface_commit(foreignSurface); - QTRY_COMPARE(spy.count(), 1); + QTRY_COMPARE(spy.size(), 1); wl_surface_destroy(foreignSurface); } diff --git a/tests/auto/compositor/compositor/tst_compositor.cpp b/tests/auto/compositor/compositor/tst_compositor.cpp index 9c70ef84..ed7490b3 100644 --- a/tests/auto/compositor/compositor/tst_compositor.cpp +++ b/tests/auto/compositor/compositor/tst_compositor.cpp @@ -312,14 +312,14 @@ void tst_WaylandCompositor::keyboardGrab() //QSignalSpy grabModifierSpy(grab, SIGNAL(modifiersCalled())); seat->setKeyboardFocus(waylandSurface); - QTRY_COMPARE(grabFocusSpy.count(), 1); + QTRY_COMPARE(grabFocusSpy.size(), 1); QKeyEvent ke(QEvent::KeyPress, Qt::Key_A, Qt::NoModifier, 30, 0, 0); QKeyEvent ke1(QEvent::KeyRelease, Qt::Key_A, Qt::NoModifier, 30, 0, 0); seat->sendFullKeyEvent(&ke); seat->sendFullKeyEvent(&ke1); - QTRY_COMPARE(grabKeyPressSpy.count(), 1); - QTRY_COMPARE(grabKeyReleaseSpy.count(), 1); + QTRY_COMPARE(grabKeyPressSpy.size(), 1); + QTRY_COMPARE(grabKeyReleaseSpy.size(), 1); QKeyEvent ke2(QEvent::KeyPress, Qt::Key_Shift, Qt::NoModifier, 50, 0, 0); QKeyEvent ke3(QEvent::KeyRelease, Qt::Key_Shift, Qt::NoModifier, 50, 0, 0); @@ -327,14 +327,14 @@ void tst_WaylandCompositor::keyboardGrab() seat->sendFullKeyEvent(&ke3); //QTRY_COMPARE(grabModifierSpy.count(), 2); // Modifiers are also keys - QTRY_COMPARE(grabKeyPressSpy.count(), 2); - QTRY_COMPARE(grabKeyReleaseSpy.count(), 2); + QTRY_COMPARE(grabKeyPressSpy.size(), 2); + QTRY_COMPARE(grabKeyReleaseSpy.size(), 2); // Stop grabbing seat->setKeyboardFocus(nullptr); seat->sendFullKeyEvent(&ke); seat->sendFullKeyEvent(&ke1); - QTRY_COMPARE(grabKeyPressSpy.count(), 2); + QTRY_COMPARE(grabKeyPressSpy.size(), 2); } void tst_WaylandCompositor::geometry() @@ -466,7 +466,7 @@ void tst_WaylandCompositor::mapSurface() wl_surface_damage(surface, 0, 0, size.width(), size.height()); wl_surface_commit(surface); - QTRY_COMPARE(hasContentSpy.count(), 1); + QTRY_COMPARE(hasContentSpy.size(), 1); QCOMPARE(waylandSurface->hasContent(), true); QCOMPARE(waylandSurface->bufferSize(), size); QCOMPARE(waylandSurface->destinationSize(), size); @@ -534,21 +534,21 @@ void tst_WaylandCompositor::mapSurfaceHiDpi() QCOMPARE(waylandSurface->destinationSize(), QSize()); QCOMPARE(waylandSurface->hasContent(), false); QCOMPARE(waylandSurface->bufferScale(), 1); - QCOMPARE(offsetSpy.count(), 0); + QCOMPARE(offsetSpy.size(), 0); wl_surface_commit(surface); - QTRY_COMPARE(hasContentSpy.count(), 1); - QTRY_COMPARE(bufferSizeSpy.count(), 1); - QTRY_COMPARE(destinationSizeSpy.count(), 1); - QTRY_COMPARE(bufferScaleSpy.count(), 1); - QTRY_COMPARE(offsetSpy.count(), 1); - QTRY_COMPARE(damagedSpy.count(), 1); + QTRY_COMPARE(hasContentSpy.size(), 1); + QTRY_COMPARE(bufferSizeSpy.size(), 1); + QTRY_COMPARE(destinationSizeSpy.size(), 1); + QTRY_COMPARE(bufferScaleSpy.size(), 1); + QTRY_COMPARE(offsetSpy.size(), 1); + QTRY_COMPARE(damagedSpy.size(), 1); // Now verify that wl_surface_damage_buffer gets mapped properly wl_surface_damage_buffer(surface, 0, 0, bufferSize.width(), bufferSize.height()); wl_surface_commit(surface); - QTRY_COMPARE(damagedSpy.count(), 2); + QTRY_COMPARE(damagedSpy.size(), 2); wl_surface_destroy(surface); } @@ -617,7 +617,7 @@ void tst_WaylandCompositor::frameCallback() wl_surface_commit(surface); QTRY_COMPARE(waylandSurface->hasContent(), true); - QTRY_COMPARE(damagedSpy.count(), i + 1); + QTRY_COMPARE(damagedSpy.size(), i + 1); QCOMPARE(static_cast<BufferView*>(waylandSurface->views().first())->image(), buffer.image); compositor.defaultOutput()->frameStarted(); @@ -673,18 +673,18 @@ void tst_WaylandCompositor::outputs() window.resize(800, 600); auto output = new QWaylandOutput(&compositor, &window); - QTRY_COMPARE(outputAddedSpy.count(), 1); + QTRY_COMPARE(outputAddedSpy.size(), 1); compositor.setDefaultOutput(output); - QTRY_COMPARE(defaultOutputSpy.count(), 2); + QTRY_COMPARE(defaultOutputSpy.size(), 2); MockClient client; QTRY_COMPARE(client.m_outputs.size(), 2); delete output; - QTRY_COMPARE(outputRemovedSpy.count(), 1); + QTRY_COMPARE(outputRemovedSpy.size(), 1); QEXPECT_FAIL("", "FIXME: defaultOutputChanged() is not emitted when the default output is removed", Continue); - QTRY_COMPARE(defaultOutputSpy.count(), 3); + QTRY_COMPARE(defaultOutputSpy.size(), 3); compositor.flushClients(); QTRY_COMPARE(client.m_outputs.size(), 1); } @@ -966,7 +966,7 @@ void tst_WaylandCompositor::createsXdgSurfaces() wl_surface *surface = client.createSurface(); xdg_surface *clientXdgSurface = client.createXdgSurface(surface); - QTRY_COMPARE(xdgSurfaceCreatedSpy.count(), 1); + QTRY_COMPARE(xdgSurfaceCreatedSpy.size(), 1); QTRY_VERIFY(xdgSurface); QTRY_VERIFY(xdgSurface->surface()); @@ -1183,7 +1183,7 @@ void tst_WaylandCompositor::createsIviSurfaces() wl_surface *surface = client.createSurface(); client.createIviSurface(surface, 123); - QTRY_COMPARE(iviSurfaceCreatedSpy.count(), 1); + QTRY_COMPARE(iviSurfaceCreatedSpy.size(), 1); QTRY_VERIFY(iviSurface); QTRY_VERIFY(iviSurface->surface()); QTRY_COMPARE(iviSurface->iviId(), 123u); @@ -1210,7 +1210,7 @@ void tst_WaylandCompositor::emitsErrorOnSameIviId() { MockClient secondClient; QTRY_VERIFY(&secondClient.iviApplication); - QTRY_COMPARE(compositor.clients().count(), 2); + QTRY_COMPARE(compositor.clients().size(), 2); secondClient.createIviSurface(secondClient.createSurface(), 123); compositor.flushClients(); @@ -1218,7 +1218,7 @@ void tst_WaylandCompositor::emitsErrorOnSameIviId() QTRY_COMPARE(secondClient.error, EPROTO); QTRY_COMPARE(secondClient.protocolError.interface, &ivi_application_interface); QTRY_COMPARE(static_cast<ivi_application_error>(secondClient.protocolError.code), IVI_APPLICATION_ERROR_IVI_ID); - QTRY_COMPARE(compositor.clients().count(), 1); + QTRY_COMPARE(compositor.clients().size(), 1); } } @@ -1292,7 +1292,7 @@ void tst_WaylandCompositor::destroysIviSurfaces() QSignalSpy destroySpy(iviSurface, SIGNAL(destroyed())); mockIviSurface.destroy(); - QTRY_VERIFY(destroySpy.count() == 1); + QTRY_VERIFY(destroySpy.size() == 1); } class ViewporterTestCompositor: public TestCompositor { @@ -1728,7 +1728,7 @@ void tst_WaylandCompositor::idleInhibit() QVERIFY(idleInhibitor); QTRY_COMPARE(waylandSurfacePrivate->idleInhibitors.size(), 1); QCOMPARE(waylandSurface->inhibitsIdle(), true); - QTRY_COMPARE(changedSpy.count(), 1); + QTRY_COMPARE(changedSpy.size(), 1); } class XdgOutputCompositor : public TestCompositor |