Tests: Fix clang warnings about unused variables and captures

tst_qline.cpp(170,12):  warning: unused variable 'baseB' [-Wunused-variable]           ^
tst_qline.cpp(169,12):  warning: unused variable 'baseA' [-Wunused-variable]
tst_qheaderview.cpp(3329,14):  warning: lambda capture 'this' is not used [-Wunused-lambda-capture]
    waitFor([this, &header, defaultSectionSize]() { return header.sectionSize(0) == defaultSectionSize; });

qheaderview.cpp(3338,14):  warning: lambda capture 'this' is not used [-Wunused-lambda-capture]
    waitFor([this, &header, defaultSectionSize]() { return header.sectionSize(0) == defaultSectionSize; });

Change-Id: I0245a7b66d15b896e864b488f7a58e8513fbdc6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Friedemann Kleint 2018-04-27 13:47:03 +02:00
parent 9b8fc8dd13
commit 7a1df39010
2 changed files with 2 additions and 5 deletions

View File

@ -166,9 +166,6 @@ void tst_QLine::testIntersection_data()
<< 100.1599256468622
<< 50.0;
QLineF baseA(0, -50, 0, 50);
QLineF baseB(-50, 0, 50, 0);
for (int i = 0; i < 1000; ++i) {
QLineF a = QLineF::fromPolar(50, i);
a.setP1(-a.p2());

View File

@ -3326,7 +3326,7 @@ void tst_QHeaderView::testMinMaxSectionSize(bool stretchLastSection)
header.resizeSection(0, sectionSizeMax);
QCOMPARE(header.sectionSize(0), sectionSizeMax);
header.setMaximumSectionSize(defaultSectionSize);
waitFor([this, &header, defaultSectionSize]() { return header.sectionSize(0) == defaultSectionSize; });
waitFor([&header, defaultSectionSize]() { return header.sectionSize(0) == defaultSectionSize; });
QCOMPARE(header.sectionSize(0), defaultSectionSize);
// change section size on min change
@ -3335,7 +3335,7 @@ void tst_QHeaderView::testMinMaxSectionSize(bool stretchLastSection)
header.resizeSection(0, sectionSizeMin);
QCOMPARE(header.sectionSize(0), sectionSizeMin);
header.setMinimumSectionSize(defaultSectionSize);
waitFor([this, &header, defaultSectionSize]() { return header.sectionSize(0) == defaultSectionSize; });
waitFor([&header, defaultSectionSize]() { return header.sectionSize(0) == defaultSectionSize; });
QCOMPARE(header.sectionSize(0), defaultSectionSize);
}