Remove unused variables
Removing a few unused variables in auto tests that were triggering `-Wunused-but-set-variable`. Change-Id: I74bd0d7335d8bddeb18687b18c8a8be965f9fa20 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit a4168bd5e5ace76639b39d42c2e827f4f0898d43) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
6dc44dd127
commit
9be954062e
@ -1257,7 +1257,6 @@ void tst_QSortFilterProxyModel::filterHierarchy()
|
||||
|
||||
void tst_QSortFilterProxyModel::buildHierarchy(const QStringList &l, QAbstractItemModel *m)
|
||||
{
|
||||
int ind = 0;
|
||||
int row = 0;
|
||||
QStack<int> row_stack;
|
||||
QModelIndex parent;
|
||||
@ -1265,14 +1264,12 @@ void tst_QSortFilterProxyModel::buildHierarchy(const QStringList &l, QAbstractIt
|
||||
for (int i = 0; i < l.size(); ++i) {
|
||||
QString token = l.at(i);
|
||||
if (token == QLatin1String("<")) { // start table
|
||||
++ind;
|
||||
parent_stack.push(parent);
|
||||
row_stack.push(row);
|
||||
parent = m->index(row - 1, 0, parent);
|
||||
row = 0;
|
||||
QVERIFY(m->insertColumns(0, 1, parent)); // add column
|
||||
} else if (token == QLatin1String(">")) { // end table
|
||||
--ind;
|
||||
parent = parent_stack.pop();
|
||||
row = row_stack.pop();
|
||||
} else { // append row
|
||||
@ -1288,21 +1285,18 @@ void tst_QSortFilterProxyModel::buildHierarchy(const QStringList &l, QAbstractIt
|
||||
void tst_QSortFilterProxyModel::checkHierarchy(const QStringList &l, const QAbstractItemModel *m)
|
||||
{
|
||||
int row = 0;
|
||||
int indent = 0;
|
||||
QStack<int> row_stack;
|
||||
QModelIndex parent;
|
||||
QStack<QModelIndex> parent_stack;
|
||||
for (int i = 0; i < l.size(); ++i) {
|
||||
QString token = l.at(i);
|
||||
if (token == QLatin1String("<")) { // start table
|
||||
++indent;
|
||||
parent_stack.push(parent);
|
||||
row_stack.push(row);
|
||||
parent = m->index(row - 1, 0, parent);
|
||||
QVERIFY(parent.isValid());
|
||||
row = 0;
|
||||
} else if (token == QLatin1String(">")) { // end table
|
||||
--indent;
|
||||
parent = parent_stack.pop();
|
||||
row = row_stack.pop();
|
||||
} else { // compare row
|
||||
|
@ -939,13 +939,11 @@ void tst_QSet::javaIterator()
|
||||
QSetIterator<QString> i(set1);
|
||||
QSetIterator<QString> j(set1);
|
||||
|
||||
int n = 0;
|
||||
while (i.hasNext()) {
|
||||
QVERIFY(j.hasNext());
|
||||
set1.remove(i.peekNext());
|
||||
sum1 += toNumber(i.next());
|
||||
sum2 += toNumber(j.next());
|
||||
++n;
|
||||
}
|
||||
QVERIFY(!j.hasNext());
|
||||
QVERIFY(sum1 == 24999 * 25000 / 2);
|
||||
|
@ -693,8 +693,6 @@ public:
|
||||
QNetworkDiskCache cache;
|
||||
cache.setCacheDirectory(cachePath);
|
||||
|
||||
int read = 0;
|
||||
|
||||
int i = 0;
|
||||
for (; i < 5000; ++i) {
|
||||
if (other && other->isFinished())
|
||||
@ -745,7 +743,6 @@ public:
|
||||
}
|
||||
if (gotMetaData.isValid())
|
||||
QVERIFY(x == longString || x == longString2);
|
||||
read++;
|
||||
delete d;
|
||||
}
|
||||
}
|
||||
@ -755,7 +752,6 @@ public:
|
||||
cache.clear();
|
||||
sleep(0);
|
||||
}
|
||||
//qDebug() << "read!" << read << i;
|
||||
}
|
||||
|
||||
QDateTime dt;
|
||||
|
Loading…
x
Reference in New Issue
Block a user