diff --git a/templateparser/src/templateextracthtmlelementwebengineview.h b/templateparser/src/templateextracthtmlelementwebengineview.h index c379cdee..83116fb5 100644 --- a/templateparser/src/templateextracthtmlelementwebengineview.h +++ b/templateparser/src/templateextracthtmlelementwebengineview.h @@ -1,57 +1,57 @@ /* Copyright (C) 2017-2019 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef TEMPLATEEXTRACTHTMLELEMENTWEBENGINEVIEW_H #define TEMPLATEEXTRACTHTMLELEMENTWEBENGINEVIEW_H #include #include "templateparser_private_export.h" namespace TemplateParser { class TemplateWebEnginePage; class TEMPLATEPARSER_TESTS_EXPORT TemplateExtractHtmlElementWebEngineView : public QObject { Q_OBJECT public: explicit TemplateExtractHtmlElementWebEngineView(QObject *parent = nullptr); ~TemplateExtractHtmlElementWebEngineView(); - QString bodyElement() const; + Q_REQUIRED_RESULT QString bodyElement() const; - QString headerElement() const; + Q_REQUIRED_RESULT QString headerElement() const; - QString htmlElement() const; + Q_REQUIRED_RESULT QString htmlElement() const; void setHtmlContent(const QString &html); Q_SIGNALS: void loadContentDone(bool success); private: void clear(); void slotLoadFinished(bool success); void handleHtmlInfo(const QVariant &result); QString mBodyElement; QString mHeaderElement; QString mHtmlElement; TemplateWebEnginePage *mPage = nullptr; }; } #endif // TEMPLATEEXTRACTHTMLELEMENTWEBENGINEVIEW_H diff --git a/templateparser/src/templatewebengineview.h b/templateparser/src/templatewebengineview.h index 31f8ea82..c72b3818 100644 --- a/templateparser/src/templatewebengineview.h +++ b/templateparser/src/templatewebengineview.h @@ -1,50 +1,50 @@ /* Copyright (C) 2017-2019 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef TEMPLATEWEBENGINEVIEW_H #define TEMPLATEWEBENGINEVIEW_H #include #include "templateparser_export.h" namespace TemplateParser { class TemplateWebEnginePage; class TEMPLATEPARSER_EXPORT TemplateWebEngineView : public QObject { Q_OBJECT public: explicit TemplateWebEngineView(QObject *parent = nullptr); ~TemplateWebEngineView(); void setHtmlContent(const QString &html); - QString plainText() const; + Q_REQUIRED_RESULT QString plainText() const; Q_SIGNALS: void loadContentDone(bool success); private: void slotLoadFinished(bool ok); void setPlainText(const QString &plainText); QString mExtractedPlainText; TemplateWebEnginePage *mPage = nullptr; }; } #endif // TEMPLATEWEBENGINEVIEW_H