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 @@ ...@@ -5,7 +5,20 @@
*/ */
#include "mailmergeutil.h" #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 @@ ...@@ -5,9 +5,11 @@
*/ */
#pragma once #pragma once
#include <QString>
class MailMergeUtil /** Send later utilities. */
namespace MailMergeUtil
{ {
public: Q_REQUIRED_RESULT QString mailMergePattern();
MailMergeUtil(); 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