1/*
2 This file is part of the syndication library
3 SPDX-FileCopyrightText: 2005 Frank Osterfeld <osterfeld@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#include "textinput.h"
9#include "tools.h"
10
11#include <QString>
12
13namespace Syndication
14{
15namespace RSS2
16{
17TextInput::TextInput()
18 : ElementWrapper()
19{
20}
21
22TextInput::TextInput(const QDomElement &element)
23 : ElementWrapper(element)
24{
25}
26
27QString TextInput::title() const
28{
29 return extractElementTextNS(namespaceURI: QString(), QStringLiteral("title"));
30}
31
32QString TextInput::name() const
33{
34 return extractElementTextNS(namespaceURI: QString(), QStringLiteral("name"));
35}
36
37QString TextInput::description() const
38{
39 return extractElementTextNS(namespaceURI: QString(), QStringLiteral("description"));
40}
41
42QString TextInput::link() const
43{
44 return extractElementTextNS(namespaceURI: QString(), QStringLiteral("link"));
45}
46
47QString TextInput::debugInfo() const
48{
49 QString info = QLatin1String("### TextInput: ###################\n");
50 if (!title().isNull()) {
51 info += QLatin1String("title: #") + title() + QLatin1String("#\n");
52 }
53 if (!link().isNull()) {
54 info += QLatin1String("link: #") + link() + QLatin1String("#\n");
55 }
56 if (!description().isNull()) {
57 info += QLatin1String("description: #") + description() + QLatin1String("#\n");
58 }
59 if (!name().isNull()) {
60 info += QLatin1String("name: #") + name() + QLatin1String("#\n");
61 }
62 info += QLatin1String("### TextInput end ################\n");
63 return info;
64}
65
66} // namespace RSS2
67} // namespace Syndication
68

source code of syndication/src/rss2/textinput.cpp