LeechCraft 0.6.70-19214-g121e5318a7
Modular cross-platform feature rich live environment.
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>
12#include <util/sll/logging.h>
13
14namespace 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
25 {
26 return !Doc_.isNull ();
27 }
28
29 QDomDocument AsDomDocument::await_resume () const
30 {
31 return Doc_;
32 }
33}
AsDomDocument(const QByteArray &data, const QString &errorMessage, const std::source_location &loc=std::source_location::current())
QDomDocument await_resume() const
QMessageLogger LogAt(std::source_location loc)
Definition logging.cpp:14