LeechCraft
0.6.70-19214-g121e5318a7
Modular cross-platform feature rich live environment.
Toggle main menu visibility
Loading...
Searching...
No Matches
asdomdocument.cpp
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#include "
asdomdocument.h
"
10
#include <QtDebug>
11
#include <
util/sll/debugprinters.h
>
12
#include <
util/sll/logging.h
>
13
14
namespace
LC::Util
15
{
16
AsDomDocument::AsDomDocument
(
const
QByteArray& data,
const
QString& errorMessage,
const
std::source_location& loc)
17
: ErrorMessage_ { errorMessage }
18
{
19
if
(
const
auto
result = Doc_.setContent (data);
20
!result)
21
LogAt
(loc).warning () <<
"failed to parse"
<< result << data;
22
}
23
24
bool
AsDomDocument::await_ready
()
const
25
{
26
return
!Doc_.isNull ();
27
}
28
29
QDomDocument
AsDomDocument::await_resume
()
const
30
{
31
return
Doc_;
32
}
33
}
asdomdocument.h
LC::Util::AsDomDocument::AsDomDocument
AsDomDocument(const QByteArray &data, const QString &errorMessage, const std::source_location &loc=std::source_location::current())
Definition
asdomdocument.cpp:16
LC::Util::AsDomDocument::await_resume
QDomDocument await_resume() const
Definition
asdomdocument.cpp:29
LC::Util::AsDomDocument::await_ready
bool await_ready() const
Definition
asdomdocument.cpp:24
debugprinters.h
logging.h
LC::Util
Definition
icoreproxy.h:34
LC::Util::LogAt
QMessageLogger LogAt(std::source_location loc)
Definition
logging.cpp:14
src
util
threads
coro
asdomdocument.cpp
Generated by
1.18.0