Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qtestelement.cpp
Go to the documentation of this file.
1
// Copyright (C) 2022 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
#include <QtTest/private/qtestelement_p.h>
5
6
QT_BEGIN_NAMESPACE
7
8
QTestElement::QTestElement
(
QTest::LogElementType
type
)
9
:
QTestCoreElement
<
QTestElement
>(
type
)
10
{
11
}
12
13
QTestElement::~QTestElement
()
14
{
15
for
(
auto
*
child
: listOfChildren)
16
delete
child
;
17
}
18
19
bool
QTestElement::addChild
(
QTestElement
*element)
20
{
21
if
(!element)
22
return
false
;
23
24
if
(element->
elementType
() !=
QTest::LET_Undefined
) {
25
listOfChildren.push_back(element);
26
element->
setParent
(
this
);
27
return
true
;
28
}
29
30
return
false
;
31
}
32
33
const
std::vector<QTestElement*> &
QTestElement::childElements
()
const
34
{
35
return
listOfChildren;
36
}
37
38
const
QTestElement
*
QTestElement::parentElement
()
const
39
{
40
return
parent;
41
}
42
43
void
QTestElement::setParent
(
const
QTestElement
*
p
)
44
{
45
parent =
p
;
46
}
47
48
QT_END_NAMESPACE
49
QTestCoreElement
Definition
qtestcoreelement_p.h:28
QTestCoreElement::elementType
QTest::LogElementType elementType() const
Definition
qtestcoreelement_p.h:121
QTestElement
Definition
qtestelement_p.h:25
QTestElement::childElements
const std::vector< QTestElement * > & childElements() const
Definition
qtestelement.cpp:33
QTestElement::~QTestElement
~QTestElement()
Definition
qtestelement.cpp:13
QTestElement::QTestElement
QTestElement(QTest::LogElementType type=QTest::LET_Undefined)
Definition
qtestelement.cpp:8
QTestElement::parentElement
const QTestElement * parentElement() const
Definition
qtestelement.cpp:38
QTestElement::addChild
bool addChild(QTestElement *element)
Definition
qtestelement.cpp:19
QTestElement::setParent
void setParent(const QTestElement *p)
Definition
qtestelement.cpp:43
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
QTest::LogElementType
LogElementType
Definition
qtestelementattribute_p.h:45
QTest::LET_Undefined
@ LET_Undefined
Definition
qtestelementattribute_p.h:46
type
GLenum type
Definition
qopengles2ext.h:150
p
GLfloat GLfloat p
[1]
Definition
qopenglext.h:12698
child
QLayoutItem * child
[0]
Definition
src_gui_kernel_qlayout.cpp:25
qtbase
src
testlib
qtestelement.cpp
Generated by
1.10.0