diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2021-01-01 18:03:02 +0100 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2021-01-10 15:02:47 +0100 |
commit | c34c6af3740052617ee9f0876e2720046f0e6bb7 (patch) | |
tree | 1226e9e7611c606a94ed22f42a44e78ba968a494 /tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | |
parent | b211148e4b4167483e1a78a45ae8fef97e5a4f2d (diff) |
Replace some more erase/remove patterns with removeIf
Change-Id: I6c6f33450fbfd798e5ef71a8ba18f590581dc3a2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp')
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index ebdb3b83c4..e522ec6d05 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -5204,10 +5204,8 @@ void tst_QWidget::setWindowGeometry_data() const bool skipEmptyRects = (m_platform == QStringLiteral("windows")); for (Rects l : qAsConst(rects)) { - if (skipEmptyRects) { - l.erase(std::remove_if(l.begin(), l.end(), [] (const QRect &r) { return r.isEmpty(); }), - l.end()); - } + if (skipEmptyRects) + l.removeIf([] (const QRect &r) { return r.isEmpty(); }); const QRect &rect = l.constFirst(); for (int windowFlag : windowFlags) { QTest::newRow(QString("%1,%2 %3x%4, flags %5") |