Attica

buildservicejoboutputparser.cpp
1/*
2 This file is part of KDE.
3
4 SPDX-FileCopyrightText: 2010 Dan Leinir Turthra Jensen <admin@leinir.dk>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#include "buildservicejoboutputparser.h"
10#include "qdebug.h"
11
12using namespace Attica;
13
14BuildServiceJobOutput BuildServiceJobOutput::Parser::parseXml(QXmlStreamReader &xml)
15{
16 BuildServiceJobOutput buildservicejoboutput;
17
18 // For specs about the XML provided, see here:
19 // http://www.freedesktop.org/wiki/Specifications/open-collaboration-services-draft#BuildServiceJobs
20 while (!xml.atEnd()) {
21 if (xml.isStartElement()) {
22 if (xml.name() == QLatin1String("output")) {
23 buildservicejoboutput.setOutput(xml.readElementText());
24 }
25 } else if (xml.isEndElement() && xml.name() == QLatin1String("output")) {
26 break;
27 }
28 xml.readNext();
29 }
30 return buildservicejoboutput;
31}
32
33QStringList BuildServiceJobOutput::Parser::xmlElement() const
34{
35 return QStringList(QStringLiteral("output"));
36}
Represents the ouput of a build service job.
The Attica namespace,.
bool atEnd() const const
bool isEndElement() const const
bool isStartElement() const const
QStringView name() const const
QString readElementText(ReadElementTextBehaviour behaviour)
TokenType readNext()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:18 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.