Attica

listjob.cpp
1 /*
2  This file is part of KDE.
3 
4  SPDX-FileCopyrightText: 2009 Eckhart W├Ârner <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8 
9 #include "listjob.h"
10 
11 #include <attica_debug.h>
12 #include <QXmlStreamReader>
13 
14 using namespace Attica;
15 
16 template <class T>
17 ListJob<T>::ListJob(PlatformDependent *internals, const QNetworkRequest &request)
18  : GetJob(internals, request)
19 {
20  qCDebug(ATTICA) << "creating list job:" << request.url();
21 }
22 
23 template <class T>
24 typename T::List ListJob<T>::itemList() const
25 {
26  return m_itemList;
27 }
28 
29 template <class T>
30 void ListJob<T>::parse(const QString &xml)
31 {
32  typename T::Parser parser;
33  m_itemList = parser.parseList(xml);
34  setMetadata(parser.metadata());
35  qCDebug(ATTICA) << "received categories:" << m_itemList.size();
36 }
QUrl url() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 25 2021 23:06:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.