Commit 464d94b3 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix typo in class (using c++-rename-class-and-file script for doing it)

parent 36ec0c1d
......@@ -2,10 +2,10 @@ set(mardown_engine_SRCS)
set(discount_LIB)
if(USE_DISCOUNT_LIB)
add_definitions(-DUSE_DISCOUNT_LIB)
set(mardown_engine_SRCS mardowndiscount.cpp)
set(mardown_engine_SRCS markdowndiscount.cpp)
set(discount_LIB discount::Lib)
else()
set(mardown_engine_SRCS mardownqtextdocument.cpp)
set(mardown_engine_SRCS markdownqtextdocument.cpp)
endif()
add_definitions(-DTRANSLATION_DOMAIN=\"messageviewer_text_markdown_plugin\")
......
......@@ -17,23 +17,23 @@
Boston, MA 02110-1301, USA.
*/
#include "mardowndiscount.h"
#include "markdowndiscount.h"
#include <QDebug>
extern "C" {
#include <mkdio.h>
}
MardownDiscount::MardownDiscount()
MarkdownDiscount::MarkdownDiscount()
{
}
MardownDiscount::~MardownDiscount()
MarkdownDiscount::~MarkdownDiscount()
{
}
QString MardownDiscount::toHtml() const
QString MarkdownDiscount::toHtml() const
{
if (mText.isEmpty()) {
return {};
......
......@@ -17,18 +17,18 @@
Boston, MA 02110-1301, USA.
*/
#ifndef MARDOWNDISCOUNT_H
#define MARDOWNDISCOUNT_H
#ifndef MARKDOWNDISCOUNT_H
#define MARKDOWNDISCOUNT_H
#include "markdownabstract.h"
class MardownDiscount : public MarkdownAbstract
class MarkdownDiscount : public MarkdownAbstract
{
public:
MardownDiscount();
~MardownDiscount();
MarkdownDiscount();
~MarkdownDiscount();
Q_REQUIRED_RESULT QString toHtml() const override;
};
#endif // MARDOWNDISCOUNT_H
#endif // MARKDOWNDISCOUNT_H
......@@ -17,21 +17,21 @@
Boston, MA 02110-1301, USA.
*/
#include "mardownqtextdocument.h"
#include "markdownqtextdocument.h"
#include <QTextDocument>
MardownQTextDocument::MardownQTextDocument()
MarkdownQTextDocument::MarkdownQTextDocument()
{
}
MardownQTextDocument::~MardownQTextDocument()
MarkdownQTextDocument::~MarkdownQTextDocument()
{
}
QString MardownQTextDocument::toHtml() const
QString MarkdownQTextDocument::toHtml() const
{
QTextDocument textDocument;
textDocument.setMarkdown(mText, QTextDocument::MarkdownNoHTML);
......
......@@ -17,17 +17,17 @@
Boston, MA 02110-1301, USA.
*/
#ifndef MARDOWNQTEXTDOCUMENT_H
#define MARDOWNQTEXTDOCUMENT_H
#ifndef MARKDOWNQTEXTDOCUMENT_H
#define MARKDOWNQTEXTDOCUMENT_H
#include "markdownabstract.h"
class MardownQTextDocument : public MarkdownAbstract
class MarkdownQTextDocument : public MarkdownAbstract
{
public:
MardownQTextDocument();
~MardownQTextDocument();
MarkdownQTextDocument();
~MarkdownQTextDocument();
Q_REQUIRED_RESULT QString toHtml() const override;
};
#endif // MARDOWNQTEXTDOCUMENT_H
#endif // MARKDOWNQTEXTDOCUMENT_H
......@@ -25,9 +25,9 @@
#include <MessageViewer/HtmlWriter>
#include "markdownabstract.h"
#ifdef USE_DISCOUNT_LIB
#include "mardowndiscount.h"
#include "markdowndiscount.h"
#else
#include "mardownqtextdocument.h"
#include "markdownqtextdocument.h"
#endif
#include <grantlee/template.h>
......@@ -63,11 +63,11 @@ public:
c.insert(QStringLiteral("content"), QVariant::fromValue<MessageViewer::GrantleeCallback>([=](Grantlee::OutputStream *) {
QString result;
#ifdef USE_DISCOUNT_LIB
MardownDiscount engine;
MarkdownDiscount engine;
engine.setText(msgPart->text());
result = engine.toHtml();
#else
MardownQTextDocument engine;
MarkdownQTextDocument engine;
engine.setText(msgPart->text());
result = engine.toHtml();
#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