blob: b2bd2000829876e44151a60ea3d97515a999581a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "textbuilder_p.h"
#include "ui4_p.h"
#include <QtCore/qvariant.h>
QT_BEGIN_NAMESPACE
#ifdef QFORMINTERNAL_NAMESPACE
namespace QFormInternal {
#endif
QTextBuilder::QTextBuilder() = default;
QTextBuilder::~QTextBuilder() = default;
QVariant QTextBuilder::loadText(const DomProperty *property) const
{
if (property->kind() == DomProperty::String)
return property->elementString()->text();
return QVariant();
}
QVariant QTextBuilder::toNativeValue(const QVariant &value) const
{
return value;
}
DomProperty *QTextBuilder::saveText(const QVariant &value) const
{
Q_UNUSED(value);
return nullptr;
}
#ifdef QFORMINTERNAL_NAMESPACE
} // namespace QFormInternal
#endif
QT_END_NAMESPACE
|