summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel/qwidget
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/kernel/qwidget')
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index 10ae2944d9..37a395194d 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -2716,7 +2716,7 @@ void tst_QWidget::resizePropagation()
{
// Capture count of latest async signals
if (!checkCountIncrement)
- count = spy.count();
+ count = spy.size();
// Resize if required
if (size.isValid())
@@ -2727,12 +2727,12 @@ void tst_QWidget::resizePropagation()
// Check signal count and qDebug output for fail analysis
if (checkCountIncrement) {
- QTRY_VERIFY(spy.count() > count);
- qDebug() << "spy count:" << spy.count() << "previous count:" << count;
- count = spy.count();
+ QTRY_VERIFY(spy.size() > count);
+ qDebug() << "spy count:" << spy.size() << "previous count:" << count;
+ count = spy.size();
} else {
qDebug() << spy << widget.windowState() << window->windowState();
- QCOMPARE(spy.count(), count);
+ QCOMPARE(spy.size(), count);
}
// QTRY necessary because state changes are propagated async
@@ -3625,7 +3625,7 @@ void tst_QWidget::raise()
QObjectList list1{child1, child2, child3, child4};
QCOMPARE(parentPtr->children(), list1);
- QCOMPARE(allChildren.size(), list1.count());
+ QCOMPARE(allChildren.size(), list1.size());
for (UpdateWidget *child : std::as_const(allChildren)) {
int expectedPaintEvents = child == child4 ? 1 : 0;
@@ -3724,7 +3724,7 @@ void tst_QWidget::lower()
QObjectList list1{child1, child2, child3, child4};
QCOMPARE(parent->children(), list1);
- QCOMPARE(allChildren.size(), list1.count());
+ QCOMPARE(allChildren.size(), list1.size());
for (UpdateWidget *child : std::as_const(allChildren)) {
int expectedPaintEvents = child == child4 ? 1 : 0;
@@ -6812,7 +6812,7 @@ void tst_QWidget::testWindowIconChangeEventPropagation()
QWidgetList widgets;
widgets << &topLevelWidget << &topLevelChild
<< &dialog << &dialogChild;
- QCOMPARE(widgets.count(), 4);
+ QCOMPARE(widgets.size(), 4);
topLevelWidget.show();
dialog.show();
@@ -6841,7 +6841,7 @@ void tst_QWidget::testWindowIconChangeEventPropagation()
const QIcon windowIcon = qApp->style()->standardIcon(QStyle::SP_TitleBarMenuButton);
qApp->setWindowIcon(windowIcon);
- for (int i = 0; i < widgets.count(); ++i) {
+ for (int i = 0; i < widgets.size(); ++i) {
// Check QEvent::ApplicationWindowIconChange
EventSpyPtr spy = applicationEventSpies.at(i);
QWidget *widget = spy->widget();
@@ -6858,7 +6858,7 @@ void tst_QWidget::testWindowIconChangeEventPropagation()
QCOMPARE(spy->count(), 1);
spy->clear();
}
- for (int i = 0; i < windows.count(); ++i) {
+ for (int i = 0; i < windows.size(); ++i) {
// Check QEvent::ApplicationWindowIconChange (sent to QWindow)
// QWidgetWindows don't get this event, since the widget takes care of changing the icon
WindowEventSpyPtr spy = appWindowEventSpies.at(i);
@@ -6876,7 +6876,7 @@ void tst_QWidget::testWindowIconChangeEventPropagation()
// Set icon on a top-level widget.
topLevelWidget.setWindowIcon(QIcon());
- for (int i = 0; i < widgets.count(); ++i) {
+ for (int i = 0; i < widgets.size(); ++i) {
// Check QEvent::ApplicationWindowIconChange
EventSpyPtr spy = applicationEventSpies.at(i);
QCOMPARE(spy->count(), 0);
@@ -12775,7 +12775,7 @@ void tst_QWidget::deleteWindowInCloseEvent()
QApplication::exec();
// It should still result in a single lastWindowClosed emit
- QCOMPARE(quitSpy.count(), 1);
+ QCOMPARE(quitSpy.size(), 1);
}
/*!
@@ -12796,7 +12796,7 @@ void tst_QWidget::quitOnClose()
widget->close();
});
QApplication::exec();
- QCOMPARE(quitSpy.count(), 1);
+ QCOMPARE(quitSpy.size(), 1);
widget->show();
QVERIFY(QTest::qWaitForWindowExposed(widget.get()));
@@ -12804,7 +12804,7 @@ void tst_QWidget::quitOnClose()
widget.reset();
});
QApplication::exec();
- QCOMPARE(quitSpy.count(), 2);
+ QCOMPARE(quitSpy.size(), 2);
}
void tst_QWidget::setParentChangesFocus_data()