Commit f1b66506 authored by Sandro Knauß's avatar Sandro Knauß

move quoteHTML into own file

parent b1696f34
......@@ -163,6 +163,7 @@ set(libmessageviewer_messagepartthemes_default_SRCS
messagepartthemes/default/rendererpluginfactorysingleton.cpp
messagepartthemes/default/plugins/messagepartrenderer.cpp
messagepartthemes/default/plugins/plugins.cpp
messagepartthemes/default/plugins/quotehtml.cpp
messagepartthemes/default/messagepartrenderbase.cpp
messagepartthemes/default/messagepartrendererfactorybase.cpp
)
......
......@@ -22,10 +22,10 @@ add_messageviewer_crypto_unittest(objecttreeparsertest.cpp)
add_messageviewer_crypto_unittest(rendertest.cpp)
add_messageviewer_crypto_unittest(unencryptedmessagetest.cpp)
ecm_add_test(quotehtmltest.cpp setupenv.cpp ../defaultrenderer.cpp ../htmlblock.cpp ../converthtmltoplaintext.cpp ../../../messageviewer_debug.cpp
ecm_add_test(quotehtmltest.cpp setupenv.cpp ../plugins/quotehtml.cpp
TEST_NAME quotehtmltest
NAME_PREFIX "messageviewer-messageparttheme-"
LINK_LIBRARIES Qt5::Test KF5::GrantleeTheme KF5::MessageViewer KF5::MimeTreeParser KF5::MessageCore KF5::IconThemes KF5::Codecs KF5::I18n Grantlee5::TextDocument Grantlee5::Templates
LINK_LIBRARIES Qt5::Test KF5::MessageViewer KF5::IconThemes KF5::Mime
)
ecm_add_test(converthtmltoplaintexttest.cpp ../converthtmltoplaintext.cpp
......
......@@ -17,7 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quotehtmltest.h"
#include "../defaultrenderer.h"
#include "../plugins/quotehtml.h"
#include "util.h"
#include "setupenv.h"
......@@ -119,10 +119,5 @@ void QuoteHtmlTest::testQuoteHtml()
emptySource.setShowExpandQuotesMark(showExpandQuotesMark);
emptySource.setLevelQuote(quotelevel);
MimeTreeParser::ObjectTreeParser otp(&emptySource);
MimeTreeParser::MessagePart::Ptr part(new MimeTreeParser::MessagePart(&otp, data));
DefaultRenderer renderer(part, &testCSSHelper);
//qDebug()<<"renderer.html() "<<renderer.html();
QCOMPARE(renderer.html(), result);
QCOMPARE(quotedHTML(data, &emptySource, &testCSSHelper), result);
}
/*
Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
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 __MESSAGEVIEWER_DEFAULTRENDERER_QUOTEHTML_H__
#define __MESSAGEVIEWER_DEFAULTRENDERER_QUOTEHTML_H__
#include <QString>
namespace MimeTreeParser
{
namespace Interface
{
class ObjectTreeSource;
}
}
namespace MessageViewer
{
class CSSHelperBase;
}
QString quotedHTML(const QString &s, MimeTreeParser::Interface::ObjectTreeSource *source, MessageViewer::CSSHelperBase *cssHelper);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment