Commit 4b85ab9c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add util methods

parent 0983e542
Pipeline #67316 passed with stage
in 24 minutes and 3 seconds
......@@ -5,7 +5,20 @@
*/
#include "mailmergeutil.h"
#include "mailmergeagentsettings.h"
MailMergeUtil::MailMergeUtil()
void MailMergeUtil::forceReparseConfiguration()
{
MailMergeAgentSettings::self()->save();
MailMergeAgentSettings::self()->config()->reparseConfiguration();
}
bool MailMergeUtil::mailMergeAgentEnabled()
{
return MailMergeAgentSettings::self()->enabled();
}
QString MailMergeUtil::mailMergePattern()
{
return QStringLiteral("MailMergeItem %1");
}
......@@ -5,9 +5,11 @@
*/
#pragma once
class MailMergeUtil
#include <QString>
/** Send later utilities. */
namespace MailMergeUtil
{
public:
MailMergeUtil();
Q_REQUIRED_RESULT QString mailMergePattern();
Q_REQUIRED_RESULT bool mailMergeAgentEnabled();
void forceReparseConfiguration();
};
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