aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickaccessible
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-09-30 15:58:05 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-03 08:53:21 +0200
commitffceec08fabdc83de65c3b0d56686618dc19efdf (patch)
tree99c1da09648122b1b437ed57fcada056298fe2db /tests/auto/quick/qquickaccessible
parentb3330685f5a92ec78785a00d26353f6a9c4a0cc1 (diff)
Fix warnings in tst_qquickaccessible.
tst_qquickaccessible.cpp: In function 'int verifyHierarchy(QAccessibleInterface*)': tst_qquickaccessible.cpp:70:27: warning: variable 'middleChild' set but not used tst_qquickaccessible.cpp: In function 'QAccessibleInterface* topLevelChildAt(QAccessibleInterface*, int, int)': tst_qquickaccessible.cpp:325:46: warning: suggest parentheses around assignment used as truth value. Change-Id: I80f9a1e5438279add3671828a3145af2b1f2abf8 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'tests/auto/quick/qquickaccessible')
-rw-r--r--tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp b/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp
index d0bb075f4e..0ff378e86f 100644
--- a/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp
+++ b/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp
@@ -67,13 +67,9 @@ static int verifyHierarchy(QAccessibleInterface *iface)
{
int errorAt = 0;
static int treelevel = 0; // for error diagnostics
- QAccessibleInterface *middleChild, *if2;
- middleChild = 0;
+ QAccessibleInterface *if2;
++treelevel;
int middle = iface->childCount()/2 + 1;
- if (iface->childCount() >= 2) {
- middleChild = iface->child(middle - 1);
- }
for (int i = 0; i < iface->childCount() && !errorAt; ++i) {
if2 = iface->child(i);
EXPECT(if2 != 0);
@@ -322,7 +318,7 @@ QAccessibleInterface *topLevelChildAt(QAccessibleInterface *iface, int x, int y)
return 0;
QAccessibleInterface *childOfChild;
- while (childOfChild = child->childAt(x, y)) {
+ while ( ( childOfChild = child->childAt(x, y)) ) {
child = childOfChild;
}
return child;