~ubuntu-branches/ubuntu/vivid/qtdeclarative-opensource-src-gles/vivid

« back to all changes in this revision

Viewing changes to tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2015-03-11 16:51:45 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20150311165145-7653iqap3mau92gy
Tags: 5.4.1-0ubuntu1
Sync package with qtdeclarative-opensource-src - 5.4.1-1ubuntu3

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
        } \
60
60
    } while (0)
61
61
 
62
 
static int verifyHierarchy(QAccessibleInterface *iface)
63
 
{
64
 
    int errorAt = 0;
65
 
    static int treelevel = 0;   // for error diagnostics
66
 
    QAccessibleInterface *if2;
67
 
    ++treelevel;
68
 
    int middle = iface->childCount()/2 + 1;
69
 
    for (int i = 0; i < iface->childCount() && !errorAt; ++i) {
70
 
        if2 = iface->child(i);
71
 
        EXPECT(if2 != 0);
72
 
        // navigate Ancestor...
73
 
        QAccessibleInterface *parent = if2->parent();
74
 
        EXPECT(iface->object() == parent->object());
75
 
 
76
 
        // verify children...
77
 
        if (!errorAt)
78
 
            errorAt = verifyHierarchy(if2);
79
 
    }
80
 
 
81
 
    --treelevel;
82
 
    return errorAt;
83
 
}
84
 
 
85
62
 
86
63
//TESTED_FILES=
87
64