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
qtestelementattribute.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 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/qtestelementattribute_p.h>
5#include <QtCore/qbytearray.h>
6#include <string.h>
7#include <stdlib.h>
8
10
12
14{
15 delete[] attributeValue;
16}
17
19{
20 return attributeValue;
21}
22
23const char *QTestElementAttribute::name() const
24{
25 const char *AttributeNames[] =
26 {
27 "name",
28 "tests",
29 "failures",
30 "errors",
31 "type",
32 "message",
33 "value",
34 "value",
35 "time",
36 "timestamp",
37 "hostname",
38 "classname",
39 "skipped"
40 };
41
42 if (attributeIndex != QTest::AI_Undefined)
43 return AttributeNames[attributeIndex];
44
45 return nullptr;
46}
47
49{
50 return attributeIndex;
51}
52
54{
55 return attributeIndex == QTest::AI_Undefined;
56}
57
59{
60 if (!value)
61 return false;
62
63 delete[] attributeValue;
64
65 attributeIndex = index;
66 attributeValue = qstrdup(value);
67
68 return attributeValue != nullptr;
69}
70
72
bool setPair(QTest::AttributeIndex attributeIndex, const char *value)
QTest::AttributeIndex index() const
Combined button and popup list for selecting options.
Q_CORE_EXPORT char * qstrdup(const char *)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLuint index
[2]