QHeaderView test: Remove unused variables

Silence warnings such as:
variable 'sum_lookup_visual' set but not used [-Wunused-but-set-variable]

Change-Id: If38515d9753cf7b79a250985890a139e96e92329
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Volker Hilsheimer 2022-12-12 10:09:46 +01:00
parent 82b1f4b90d
commit f89c948c0c

View File

@ -2842,10 +2842,6 @@ void tst_QHeaderView::calculateAndCheck(int cppline, const int precalced_compare
int sum_visual = 0;
int sum_logical = 0;
int sum_size = 0;
int sum_hidden_size = 0;
int sum_lookup_visual = 0;
int sum_lookup_logical = 0;
int chk_visual = 1;
int chk_logical = 1;
@ -2865,7 +2861,6 @@ void tst_QHeaderView::calculateAndCheck(int cppline, const int precalced_compare
sum_visual += visual;
sum_logical += logical;
sum_size += ssize;
if (visual >= 0) {
chk_visual %= p2;
@ -2885,7 +2880,6 @@ void tst_QHeaderView::calculateAndCheck(int cppline, const int precalced_compare
if (view->isSectionHidden(i)) {
view->showSection(i);
int hiddensize = view->sectionSize(i);
sum_hidden_size += hiddensize;
chk_hidden_size %= p2;
chk_hidden_size += ( (hiddensize + 1) * (i + 1) * p1);
// (hiddensize + 1) in the above to differ between hidden and size 0
@ -2904,8 +2898,6 @@ void tst_QHeaderView::calculateAndCheck(int cppline, const int precalced_compare
for (int u = 0; u < max_lookup_count; ++u) {
int visu = view->visualIndexAt(u);
int logi = view->logicalIndexAt(u);
sum_lookup_visual += logi;
sum_lookup_logical += visu;
chk_lookup_visual %= p2;
chk_lookup_visual *= ( (u + 1) * p1 * (visu + 2));
chk_lookup_logical %= p2;