Commit 79813dea authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add method for defining if we want to reply as html

parent c6591b11
......@@ -451,6 +451,7 @@ KMCommand::Result KMMailtoReplyCommand::execute()
settings.selection = mSelection;
settings.url = mUrl;
settings.replyStrategy = MessageComposer::ReplyNone;
settings.replyAsHtml = mReplyAsHtml;
CreateReplyMessageJob *job = new CreateReplyMessageJob;
job->setSettings(settings);
......@@ -459,6 +460,16 @@ KMCommand::Result KMMailtoReplyCommand::execute()
return OK;
}
bool KMMailtoReplyCommand::replyAsHtml() const
{
return mReplyAsHtml;
}
void KMMailtoReplyCommand::setReplyAsHtml(bool replyAsHtml)
{
mReplyAsHtml = replyAsHtml;
}
KMMailtoForwardCommand::KMMailtoForwardCommand(QWidget *parent, const QUrl &url, const Akonadi::Item &msg)
: KMCommand(parent, msg)
, mUrl(url)
......@@ -858,6 +869,7 @@ KMCommand::Result KMReplyCommand::execute()
settings.replyStrategy = m_replyStrategy;
settings.templateStr = mTemplate;
settings.noQuote = mNoQuote;
settings.replyAsHtml = mReplyAsHtml;
CreateReplyMessageJob *job = new CreateReplyMessageJob;
job->setSettings(settings);
......@@ -866,6 +878,16 @@ KMCommand::Result KMReplyCommand::execute()
return OK;
}
bool KMReplyCommand::replyAsHtml() const
{
return mReplyAsHtml;
}
void KMReplyCommand::setReplyAsHtml(bool replyAsHtml)
{
mReplyAsHtml = replyAsHtml;
}
KMForwardCommand::KMForwardCommand(QWidget *parent, const Akonadi::Item::List &msgList, uint identity, const QString &templateName, const QString &selection)
: KMCommand(parent, msgList)
, mIdentity(identity)
......
......@@ -179,11 +179,15 @@ class KMAILTESTS_TESTS_EXPORT KMMailtoReplyCommand : public KMCommand
public:
KMMailtoReplyCommand(QWidget *parent, const QUrl &url, const Akonadi::Item &msg, const QString &selection);
Q_REQUIRED_RESULT bool replyAsHtml() const;
void setReplyAsHtml(bool replyAsHtml);
private:
Result execute() override;
QUrl mUrl;
QString mSelection;
bool mReplyAsHtml = false;
};
class KMAILTESTS_TESTS_EXPORT KMMailtoForwardCommand : public KMCommand
......@@ -324,6 +328,9 @@ class KMAILTESTS_TESTS_EXPORT KMReplyCommand : public KMCommand
Q_OBJECT
public:
KMReplyCommand(QWidget *parent, const Akonadi::Item &msg, MessageComposer::ReplyStrategy replyStrategy, const QString &selection = QString(), bool noquote = false, const QString &templateName = QString());
Q_REQUIRED_RESULT bool replyAsHtml() const;
void setReplyAsHtml(bool replyAsHtml);
private:
Result execute() override;
......@@ -332,6 +339,7 @@ private:
QString mTemplate;
MessageComposer::ReplyStrategy m_replyStrategy;
bool mNoQuote = false;
bool mReplyAsHtml = false;
};
class KMAILTESTS_TESTS_EXPORT KMForwardCommand : public KMCommand
......
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