Commit 54484a6d authored by David Jarvie's avatar David Jarvie
Browse files

Add AlarmText::clear() method

parent 9f761196
Pipeline #23759 passed with stage
in 6 minutes and 40 seconds
......@@ -2,7 +2,7 @@
* alarmtext.cpp - text/email alarm text conversion
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2004-2019 David Jarvie <djarvie@kde.org>
* Copyright © 2004-2020 David Jarvie <djarvie@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
......@@ -24,7 +24,7 @@
#include "kaevent.h"
#include <klocalizedstring.h>
#include <KLocalizedString>
#include <QStringList>
#include <QDateTime>
......@@ -125,6 +125,11 @@ AlarmText &AlarmText::operator=(const AlarmText &other)
return *this;
}
void AlarmText::clear()
{
d->clear();
}
void AlarmText::setText(const QString &text)
{
d->clear();
......
......@@ -2,7 +2,7 @@
* alarmtext.h - text/email alarm text conversion
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2004-2019 David Jarvie <djarvie@kde.org>
* Copyright © 2004-2020 David Jarvie <djarvie@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
......@@ -26,7 +26,7 @@
#include "kalarmcal_export.h"
#include <KCalendarCore/Todo>
#include <AkonadiCore/item.h>
#include <AkonadiCore/Item>
#include <QString>
namespace KAlarmCal
......@@ -61,6 +61,9 @@ public:
~AlarmText();
AlarmText &operator=(const AlarmText &other);
/** Initialise the instance to an empty state. */
void clear();
/** Set the alarm text.
* If @p text starts with '#!', it is flagged as a script, else plain text.
* @param text alarm text to set
......
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