Commit d10d8350 authored by Laurent Montel's avatar Laurent Montel 😁

coding style

parent c036b728
......@@ -64,11 +64,10 @@ class KCalUtils::DndFactoryPrivate
public:
DndFactoryPrivate(const MemoryCalendar::Ptr &calendar)
: mCalendar(calendar)
{}
{
}
Incidence::Ptr pasteIncidence(const Incidence::Ptr &incidence,
KDateTime newDateTime,
QFlags<DndFactory::PasteFlag> pasteOptions)
Incidence::Ptr pasteIncidence(const Incidence::Ptr &incidence, KDateTime newDateTime, QFlags<DndFactory::PasteFlag> pasteOptions)
{
Incidence::Ptr inc(incidence);
......@@ -98,7 +97,6 @@ public:
} else {
event->setDtEnd(newDateTime.addSecs(durationInSeconds));
}
} else if (inc->type() == Incidence::TypeTodo) {
Todo::Ptr aTodo = inc.staticCast<Todo>();
const bool pasteAtDtStart = (pasteOptions & DndFactory::FlagTodosPasteAtDtStart);
......@@ -113,7 +111,6 @@ public:
} else {
aTodo->setDtDue(newDateTime);
}
} else if (inc->type() == Incidence::TypeJournal) {
if (pasteOptions & DndFactory::FlagPasteAtOriginalTime) {
// Set date and preserve time and timezone stuff
......@@ -200,14 +197,13 @@ MemoryCalendar::Ptr DndFactory::createDropCalendar(const QMimeData *mimeData)
return createDropCalendar(mimeData, d->mCalendar->timeSpec());
}
MemoryCalendar::Ptr DndFactory::createDropCalendar(const QMimeData *mimeData,
const KDateTime::Spec &timeSpec)
MemoryCalendar::Ptr DndFactory::createDropCalendar(const QMimeData *mimeData, const KDateTime::Spec &timeSpec)
{
if (mimeData) {
MemoryCalendar::Ptr calendar(new MemoryCalendar(timeSpec));
if (ICalDrag::fromMimeData(mimeData, calendar) ||
VCalDrag::fromMimeData(mimeData, calendar)) {
if (ICalDrag::fromMimeData(mimeData, calendar)
|| VCalDrag::fromMimeData(mimeData, calendar)) {
return calendar;
}
}
......@@ -333,8 +329,7 @@ bool DndFactory::copyIncidence(const Incidence::Ptr &selectedInc)
return copyIncidences(list);
}
Incidence::List DndFactory::pasteIncidences(const KDateTime &newDateTime,
QFlags<KCalUtils::DndFactory::PasteFlag> pasteOptions)
Incidence::List DndFactory::pasteIncidences(const KDateTime &newDateTime, QFlags<KCalUtils::DndFactory::PasteFlag> pasteOptions)
{
QClipboard *clipboard = QApplication::clipboard();
Q_ASSERT(clipboard);
......@@ -354,7 +349,7 @@ Incidence::List DndFactory::pasteIncidences(const KDateTime &newDateTime,
const Incidence::List incidences = calendar->incidences();
const Incidence::List::ConstIterator end(incidences.constEnd());
for (it = incidences.constBegin();
it != end; ++it) {
it != end; ++it) {
Incidence::Ptr incidence = d->pasteIncidence(*it, newDateTime, pasteOptions);
if (incidence) {
list.append(incidence);
......@@ -377,8 +372,7 @@ Incidence::List DndFactory::pasteIncidences(const KDateTime &newDateTime,
return list;
}
Incidence::Ptr DndFactory::pasteIncidence(const KDateTime &newDateTime,
QFlags<KCalUtils::DndFactory::PasteFlag> pasteOptions)
Incidence::Ptr DndFactory::pasteIncidence(const KDateTime &newDateTime, QFlags<KCalUtils::DndFactory::PasteFlag> pasteOptions)
{
QClipboard *clipboard = QApplication::clipboard();
MemoryCalendar::Ptr calendar(createDropCalendar(clipboard->mimeData()));
......
......@@ -46,8 +46,7 @@ class QDrag;
class QDropEvent;
class QMimeData;
namespace KCalUtils
{
namespace KCalUtils {
class DndFactoryPrivate;
/**
@brief
......@@ -87,8 +86,7 @@ public:
/**
Create the calendar that is contained in the mime data.
*/
static KCalCore::MemoryCalendar::Ptr createDropCalendar(const QMimeData *md,
const KDateTime::Spec &timeSpec);
static KCalCore::MemoryCalendar::Ptr createDropCalendar(const QMimeData *md, const KDateTime::Spec &timeSpec);
/**
Create the mime data for the whole calendar.
......@@ -157,8 +155,7 @@ public:
@see pasteIncidence()
*/
KCalCore::Incidence::List pasteIncidences(
const KDateTime &newDateTime = KDateTime(),
QFlags<KCalUtils::DndFactory::PasteFlag> pasteOptions = QFlags<PasteFlag>());
const KDateTime &newDateTime = KDateTime(), QFlags<KCalUtils::DndFactory::PasteFlag> pasteOptions = QFlags<PasteFlag>());
/**
This function clones the incidence that's in the clipboard and sets the clone's
......@@ -175,8 +172,7 @@ public:
@return A pointer to the cloned incidence.
*/
KCalCore::Incidence::Ptr pasteIncidence(
const KDateTime &newDateTime = KDateTime(),
QFlags<KCalUtils::DndFactory::PasteFlag> pasteOptions = QFlags<PasteFlag>());
const KDateTime &newDateTime = KDateTime(), QFlags<KCalUtils::DndFactory::PasteFlag> pasteOptions = QFlags<PasteFlag>());
private:
//@cond PRIVATE
......@@ -184,7 +180,6 @@ private:
DndFactoryPrivate *const d;
//@endcond
};
}
#endif
......@@ -28,8 +28,7 @@ public:
explicit KDateFilter();
~KDateFilter();
QVariant doFilter(const QVariant &input, const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = QVariant(), bool autoescape = false) const override;
bool isSafe() const override;
private:
Q_DISABLE_COPY(KDateFilter)
......@@ -41,8 +40,7 @@ public:
explicit KTimeFilter();
~KTimeFilter();
QVariant doFilter(const QVariant &input, const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = QVariant(), bool autoescape = false) const override;
bool isSafe() const override;
private:
Q_DISABLE_COPY(KTimeFilter)
......@@ -54,8 +52,7 @@ public:
explicit KDateTimeFilter();
~KDateTimeFilter();
QVariant doFilter(const QVariant &input, const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = QVariant(), bool autoescape = false) const override;
bool isSafe() const override;
private:
Q_DISABLE_COPY(KDateTimeFilter)
......
......@@ -39,19 +39,18 @@ Grantlee::Node *IconTag::getNode(const QString &tagContent, Grantlee::Parser *p)
Q_UNUSED(p);
static QHash<QString, int> sizeOrGroupLookup
= { { QStringLiteral("desktop"), KIconLoader::Desktop },
{ QStringLiteral("toolbar"), KIconLoader::Toolbar },
{ QStringLiteral("maintoolbar"), KIconLoader::MainToolbar },
{ QStringLiteral("small"), KIconLoader::Small },
{ QStringLiteral("panel"), KIconLoader::Panel },
{ QStringLiteral("dialog"), KIconLoader::Dialog },
{ QStringLiteral("sizesmall"), KIconLoader::SizeSmall },
{ QStringLiteral("sizesmallmedium"), KIconLoader::SizeSmallMedium },
{ QStringLiteral("sizemedium"), KIconLoader::SizeMedium },
{ QStringLiteral("sizelarge"), KIconLoader::SizeLarge },
{ QStringLiteral("sizehuge"), KIconLoader::SizeHuge },
{ QStringLiteral("sizeenormous"), KIconLoader::SizeEnormous }
};
= { { QStringLiteral("desktop"), KIconLoader::Desktop },
{ QStringLiteral("toolbar"), KIconLoader::Toolbar },
{ QStringLiteral("maintoolbar"), KIconLoader::MainToolbar },
{ QStringLiteral("small"), KIconLoader::Small },
{ QStringLiteral("panel"), KIconLoader::Panel },
{ QStringLiteral("dialog"), KIconLoader::Dialog },
{ QStringLiteral("sizesmall"), KIconLoader::SizeSmall },
{ QStringLiteral("sizesmallmedium"), KIconLoader::SizeSmallMedium },
{ QStringLiteral("sizemedium"), KIconLoader::SizeMedium },
{ QStringLiteral("sizelarge"), KIconLoader::SizeLarge },
{ QStringLiteral("sizehuge"), KIconLoader::SizeHuge },
{ QStringLiteral("sizeenormous"), KIconLoader::SizeEnormous }};
const QStringList parts = smartSplit(tagContent);
const int partsSize = parts.size();
......@@ -134,8 +133,8 @@ void IconNode::render(Grantlee::OutputStream *stream, Grantlee::Context *c) cons
const QString html = QStringLiteral("<img src=\"file://%1\" align=\"top\" height=\"%2\" width=\"%2\" alt=\"%3\" title=\"%4\" />")
.arg(KIconLoader::global()->iconPath(iconName, mSizeOrGroup))
.arg(mSizeOrGroup < KIconLoader::LastGroup ?
IconSize(static_cast<KIconLoader::Group>(mSizeOrGroup))
.arg(mSizeOrGroup < KIconLoader::LastGroup
? IconSize(static_cast<KIconLoader::Group>(mSizeOrGroup))
: mSizeOrGroup)
.arg(altText.isEmpty() ? iconName : altText, altText); // title is intentionally blank if no alt is provided
(*stream) << Grantlee::SafeString(html, Grantlee::SafeString::IsSafe);
......
......@@ -22,8 +22,7 @@
#include <grantlee/taglibraryinterface.h>
class KCalendarGrantleePlugin : public QObject
, public Grantlee::TagLibraryInterface
class KCalendarGrantleePlugin : public QObject, public Grantlee::TagLibraryInterface
{
Q_OBJECT
Q_INTERFACES(Grantlee::TagLibraryInterface)
......@@ -33,7 +32,7 @@ public:
explicit KCalendarGrantleePlugin(QObject *parent = nullptr);
~KCalendarGrantleePlugin();
QHash<QString, Grantlee::Filter *> filters(const QString &name) override;
QHash<QString, Grantlee::Filter *> filters(const QString &name) override;
QHash<QString, Grantlee::AbstractNodeFactory *> nodeFactories(const QString &name) override;
};
......
......@@ -36,8 +36,7 @@ GrantleeKi18nLocalizer::~GrantleeKi18nLocalizer()
{
}
QString GrantleeKi18nLocalizer::processArguments(const KLocalizedString &kstr,
const QVariantList &arguments) const
QString GrantleeKi18nLocalizer::processArguments(const KLocalizedString &kstr, const QVariantList &arguments) const
{
KLocalizedString str = kstr;
for (auto iter = arguments.cbegin(), end = arguments.cend(); iter != end; ++iter) {
......@@ -68,9 +67,9 @@ QString GrantleeKi18nLocalizer::processArguments(const KLocalizedString &kstr,
str = str.subs(iter->value<Grantlee::SafeString>().get());
break;
}
// fall-through
#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
Q_FALLTHROUGH();
// fall-through
#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
Q_FALLTHROUGH();
#endif
default:
qCWarning(KCALUTILS_LOG) << "Unknown type" << iter->typeName() << "(" << iter->type() << ")";
......@@ -94,15 +93,13 @@ QString GrantleeKi18nLocalizer::localizeString(const QString &string, const QVar
return processArguments(str, arguments);
}
QString GrantleeKi18nLocalizer::localizePluralContextString(const QString &string, const QString &pluralForm,
const QString &context, const QVariantList &arguments) const
QString GrantleeKi18nLocalizer::localizePluralContextString(const QString &string, const QString &pluralForm, const QString &context, const QVariantList &arguments) const
{
const KLocalizedString str = kxi18ncp(qPrintable(context), qPrintable(string), qPrintable(pluralForm));
return processArguments(str, arguments);
}
QString GrantleeKi18nLocalizer::localizePluralString(const QString &string, const QString &pluralForm,
const QVariantList &arguments) const
QString GrantleeKi18nLocalizer::localizePluralString(const QString &string, const QString &pluralForm, const QVariantList &arguments) const
{
const KLocalizedString str = kxi18np(qPrintable(string), qPrintable(pluralForm));
return processArguments(str, arguments);
......
......@@ -34,21 +34,17 @@ public:
// Only reimplement string localization to use KLocalizedString instead of
// tr(), the remaining methods use QLocale internally, so we can reuse them
QString localizeContextString(const QString &string, const QString &context,
const QVariantList &arguments) const override;
QString localizeContextString(const QString &string, const QString &context, const QVariantList &arguments) const override;
QString localizeString(const QString &string, const QVariantList &arguments) const override;
QString localizePluralContextString(const QString &string, const QString &pluralForm,
const QString &context, const QVariantList &arguments) const override;
QString localizePluralString(const QString &string, const QString &pluralForm,
const QVariantList &arguments) const override;
QString localizePluralContextString(const QString &string, const QString &pluralForm, const QString &context, const QVariantList &arguments) const override;
QString localizePluralString(const QString &string, const QString &pluralForm, const QVariantList &arguments) const override;
// Only exception, Grantlee's implementation is not using QLocale for this
// for some reason
QString localizeMonetaryValue(qreal value, const QString &currenctCode) const override;
private:
QString processArguments(const KLocalizedString &str,
const QVariantList &arguments) const;
QString processArguments(const KLocalizedString &str, const QVariantList &arguments) const;
};
#endif // GRANTLEEKI18NLOCALIZER_H
......@@ -41,7 +41,7 @@ GrantleeTemplateManager::GrantleeTemplateManager()
, mLocalizer(new GrantleeKi18nLocalizer)
{
const QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kcalendar/templates"),
QStandardPaths::LocateDirectory);
QStandardPaths::LocateDirectory);
if (!path.isEmpty()) {
mLoader->setTemplateDirs({ path });
mLoader->setTheme(QStringLiteral("default"));
......@@ -88,15 +88,13 @@ Grantlee::Context GrantleeTemplateManager::createContext(const QVariantHash &has
return ctx;
}
QString GrantleeTemplateManager::errorTemplate(const QString &reason,
const QString &origTemplateName,
const Grantlee::Template &failedTemplate) const
QString GrantleeTemplateManager::errorTemplate(const QString &reason, const QString &origTemplateName, const Grantlee::Template &failedTemplate) const
{
Grantlee::Template tpl = mEngine->newTemplate(
QStringLiteral("<h1>{{ error }}</h1>\n"
"<b>%1:</b> {{ templateName }}<br>\n"
"<b>%2:</b> {{ errorMessage }}")
.arg(i18n("Template"), i18n("Error message")), QStringLiteral("TemplateError"));
QStringLiteral("<h1>{{ error }}</h1>\n"
"<b>%1:</b> {{ templateName }}<br>\n"
"<b>%2:</b> {{ errorMessage }}")
.arg(i18n("Template"), i18n("Error message")), QStringLiteral("TemplateError"));
Grantlee::Context ctx = createContext();
ctx.insert(QStringLiteral("error"), reason);
......
......@@ -23,8 +23,7 @@
#include <QSharedPointer>
#include <QVariantHash>
namespace Grantlee
{
namespace Grantlee {
class Engine;
class FileSystemTemplateLoader;
class TemplateImpl;
......@@ -51,9 +50,7 @@ private:
Q_DISABLE_COPY(GrantleeTemplateManager)
GrantleeTemplateManager();
QString errorTemplate(const QString &reason,
const QString &origTemplateName,
const Grantlee::Template &failedTemplate) const;
QString errorTemplate(const QString &reason, const QString &origTemplateName, const Grantlee::Template &failedTemplate) const;
Grantlee::Context createContext(const QVariantHash &hash = QVariantHash()) const;
Grantlee::Engine *mEngine;
......
......@@ -46,8 +46,10 @@ class KCalUtils::HtmlExportPrivate
{
public:
HtmlExportPrivate(MemoryCalendar *calendar, HTMLExportSettings *settings)
: mCalendar(calendar), mSettings(settings)
{}
: mCalendar(calendar)
, mSettings(settings)
{
}
MemoryCalendar *mCalendar;
HTMLExportSettings *mSettings;
......@@ -216,8 +218,8 @@ void HtmlExport::createMonthView(QTextStream *ts)
// Only print events within the from-to range
if (start >= fromDate() && start <= toDate()) {
Event::List events = d->mCalendar->events(start, d->mCalendar->timeSpec(),
EventSortStartDate,
SortDirectionAscending);
EventSortStartDate,
SortDirectionAscending);
if (events.count()) {
*ts << "<table>";
Event::List::ConstIterator it;
......@@ -255,7 +257,7 @@ void HtmlExport::createEventList(QTextStream *ts)
*ts << "<table border=\"0\" cellpadding=\"3\" cellspacing=\"3\">" << endl;
*ts << " <tr>" << endl;
*ts << " <th class=\"sum\">" << i18nc("@title:column event start time",
"Start Time") << "</th>" << endl;
"Start Time") << "</th>" << endl;
*ts << " <th>" << i18nc("@title:column event end time",
"End Time") << "</th>" << endl;
*ts << " <th>" << i18nc("@title:column event description",
......@@ -281,8 +283,8 @@ void HtmlExport::createEventList(QTextStream *ts)
for (QDate dt = fromDate(); dt <= toDate(); dt = dt.addDays(1)) {
qCDebug(KCALUTILS_LOG) << "Getting events for" << dt.toString();
Event::List events = d->mCalendar->events(dt, d->mCalendar->timeSpec(),
EventSortStartDate,
SortDirectionAscending);
EventSortStartDate,
SortDirectionAscending);
if (events.count()) {
*ts << " <tr><td colspan=\"" << QString::number(columns)
<< "\" class=\"datehead\"><i>"
......@@ -302,10 +304,7 @@ void HtmlExport::createEventList(QTextStream *ts)
*ts << "</table>" << endl;
}
void HtmlExport::createEvent(QTextStream *ts,
const Event::Ptr &event,
QDate date,
bool withDescription)
void HtmlExport::createEvent(QTextStream *ts, const Event::Ptr &event, QDate date, bool withDescription)
{
qCDebug(KCALUTILS_LOG) << event->summary();
*ts << " <tr>" << endl;
......@@ -431,7 +430,7 @@ void HtmlExport::createTodoList(QTextStream *ts)
// Create sub-level lists
for (it = todoList.constBegin(); it != todoList.constEnd(); ++it) {
Incidence::List relations = d->mCalendar->relations((*it)->uid());
Incidence::List relations = d->mCalendar->relations((*it)->uid());
if (relations.count()) {
// Generate sub-to-do list
......@@ -440,7 +439,7 @@ void HtmlExport::createTodoList(QTextStream *ts)
*ts << "\"" << QString::number(columns) << "\"";
*ts << "><a name=\"sub" << (*it)->uid() << "\"></a>"
<< i18nc("@title:column sub-to-dos of the parent to-do",
"Sub-To-dos of: ") << "<a href=\"#"
"Sub-To-dos of: ") << "<a href=\"#"
<< (*it)->uid() << "\"><b>" << cleanChars((*it)->summary())
<< "</b></a></td>" << endl;
*ts << " </tr>" << endl;
......@@ -498,7 +497,7 @@ void HtmlExport::createTodo(QTextStream *ts, const Todo::Ptr &todo)
if (relations.count()) {
*ts << " <div align=\"right\"><a href=\"#sub" << todo->uid()
<< "\">" << i18nc("@title:column sub-to-dos of the parent to-do",
"Sub-To-dos") << "</a></div>" << endl;
"Sub-To-dos") << "</a></div>" << endl;
}
*ts << " </td>" << endl;
......@@ -594,15 +593,14 @@ bool HtmlExport::checkSecrecy(const Incidence::Ptr &incidence)
if (secrecy == Incidence::SecrecyPrivate && !d->mSettings->excludePrivate()) {
return true;
}
if (secrecy == Incidence::SecrecyConfidential &&
!d->mSettings->excludeConfidential()) {
if (secrecy == Incidence::SecrecyConfidential
&& !d->mSettings->excludeConfidential()) {
return true;
}
return false;
}
void HtmlExport::formatLocation(QTextStream *ts,
const Incidence::Ptr &incidence)
void HtmlExport::formatLocation(QTextStream *ts, const Incidence::Ptr &incidence)
{
if (!incidence->location().isEmpty()) {
*ts << " " << cleanChars(incidence->location()) << endl;
......@@ -611,8 +609,7 @@ void HtmlExport::formatLocation(QTextStream *ts,
}
}
void HtmlExport::formatCategories(QTextStream *ts,
const Incidence::Ptr &incidence)
void HtmlExport::formatCategories(QTextStream *ts, const Incidence::Ptr &incidence)
{
if (!incidence->categoriesStr().isEmpty()) {
*ts << " " << cleanChars(incidence->categoriesStr()) << endl;
......@@ -621,8 +618,7 @@ void HtmlExport::formatCategories(QTextStream *ts,
}
}
void HtmlExport::formatAttendees(QTextStream *ts,
const Incidence::Ptr &incidence)
void HtmlExport::formatAttendees(QTextStream *ts, const Incidence::Ptr &incidence)
{
Attendee::List attendees = incidence->attendees();
if (attendees.count()) {
......
......@@ -31,16 +31,13 @@
#include <QDateTime>
#include <QString>
namespace KCalCore
{
namespace KCalCore {
class MemoryCalendar;
}
class QTextStream;
namespace KCalUtils
{
namespace KCalUtils {
class HTMLExportSettings;
class HtmlExportPrivate;
/**
......@@ -77,8 +74,7 @@ protected:
void createTodo(QTextStream *ts, const KCalCore::Todo::Ptr &todo);
void createEvent(QTextStream *ts, const KCalCore::Event::Ptr &event,
QDate date, bool withDescription = true);
void createEvent(QTextStream *ts, const KCalCore::Event::Ptr &event, QDate date, bool withDescription = true);
void createFooter(QTextStream *ts);
......@@ -102,7 +98,6 @@ private:
HtmlExportPrivate *const d;
//@endcond
};
}
#endif
......@@ -28,14 +28,11 @@
class QMimeData;
namespace KCalUtils
{
namespace KCalUtils {
/**
iCalendar drag&drop class.
*/
namespace ICalDrag
{
namespace ICalDrag {
/**
Mime-type of iCalendar
*/
......@@ -44,8 +41,7 @@ KCALUTILS_EXPORT QString mimeType();
/**
Sets the iCalendar representation as data of the drag object
*/
KCALUTILS_EXPORT bool populateMimeData(QMimeData *e,
const KCalCore::MemoryCalendar::Ptr &cal);
KCALUTILS_EXPORT bool populateMimeData(QMimeData *e, const KCalCore::MemoryCalendar::Ptr &cal);
/**
Return, if drag&drop object can be decode to iCalendar.
......@@ -55,10 +51,8 @@ KCALUTILS_EXPORT bool canDecode(const QMimeData *);
/**
Decode drag&drop object to iCalendar component \a cal.
*/
KCALUTILS_EXPORT bool fromMimeData(const QMimeData *e,
const KCalCore::MemoryCalendar::Ptr &cal);
KCALUTILS_EXPORT bool fromMimeData(const QMimeData *e, const KCalCore::MemoryCalendar::Ptr &cal);
}
}
#endif
This diff is collapsed.
......@@ -40,9 +40,7 @@
#include <QDate>
class InvitationFormatterHelperPrivate;
namespace KCalUtils
{
namespace KCalUtils {
class KCALUTILS_EXPORT InvitationFormatterHelper
{
public:
......@@ -68,9 +66,7 @@ private:
for tool tips, or a representation for a viewer widget.
*/
namespace IncidenceFormatter
{
namespace IncidenceFormatter {
/**
Create a QString representation of an Incidence in a nice format
suitable for using in a tooltip.
......@@ -83,10 +79,7 @@ namespace IncidenceFormatter
@param spec is an optional time specification which, when specified,
will shift the Incidence times to different timezones.
*/
KCALUTILS_EXPORT QString toolTipStr(const QString &sourceName,
const KCalCore::IncidenceBase::Ptr &incidence,
QDate date = QDate(),
bool richText = true,
KCALUTILS_EXPORT QString toolTipStr(const QString &sourceName, const KCalCore::IncidenceBase::Ptr &incidence, QDate date = QDate(), bool richText = true,
const KDateTime::Spec &spec = KDateTime::Spec());
/**
......@@ -99,10 +92,8 @@ KCALUTILS_EXPORT QString toolTipStr(const QString &sourceName,
@param spec is an optional time specification which, when specified,
will shift the Incidence times to different timezones.
*/
KCALUTILS_EXPORT QString extensiveDisplayStr(const KCalCore::Calendar::Ptr &calendar,
const KCalCore::IncidenceBase::Ptr &incidence,
QDate date = QDate(),
const KDateTime::Spec &spec = KDateTime::Spec());
KCALUTILS_EXPORT QString extensiveDisplayStr(const KCalCore::Calendar::Ptr &calendar, const KCalCore::IncidenceBase::Ptr &incidence,
QDate date = QDate(), const KDateTime::Spec &spec = KDateTime::Spec());
/**
Create a RichText QString representation of an Incidence in a nice format
......@@ -114,10 +105,7 @@ KCALUTILS_EXPORT QString extensiveDisplayStr(const KCalCore::Calendar::Ptr &cale
@param spec is an optional time specification which, when specified,
will shift the Incidence times to different timezones.
*/
KCALUTILS_EXPORT QString extensiveDisplayStr(const QString &sourceName,
const KCalCore::IncidenceBase::Ptr &incidence,
QDate date = QDate(),
const KDateTime::Spec &spec = KDateTime::Spec());
KCALUTILS_EXPORT QString extensiveDisplayStr(const QString &sourceName, const KCalCore::IncidenceBase::Ptr &incidence, QDate date = QDate(), const KDateTime::Spec &spec = KDateTime::Spec());
/**
Create a QString representation of an Incidence in format suitable for
......@@ -126,8 +114,7 @@ KCALUTILS_EXPORT QString extensiveDisplayStr(const QString &sourceName,
@param spec is an optional time specification which, when specified,
will shift the Incidence times to different timezones.
*/
KCALUTILS_EXPORT QString mailBodyStr(const KCalCore::IncidenceBase::Ptr &incidence,
const KDateTime::Spec &spec = KDateTime::Spec());
KCALUTILS_EXPORT QString mailBodyStr(const KCalCore::IncidenceBase::Ptr &incidence, const KDateTime::Spec &spec = KDateTime::Spec());
/**
Deliver an HTML formatted string displaying an invitation.
......@@ -141,10 +128,7 @@ KCALUTILS_EXPORT QString mailBodyStr(const KCalCore::IncidenceBase::Ptr &inciden
@since 5.23.0
*/
KCALUTILS_EXPORT QString formatICalInvitation(
const QString &invitation,
const KCalCore::MemoryCalendar::Ptr &calendar,
InvitationFormatterHelper *helper);
const QString &invitation, const KCalCore::MemoryCalendar::Ptr &calendar, InvitationFormatterHelper *helper);
/**
Deliver an HTML formatted string displaying an invitation.
......@@ -161,10 +145,7 @@ KCALUTILS_EXPORT QString formatICalInvitation(
@since 5.23.0
*/
KCALUTILS_EXPORT QString formatICalInvitationNoHtml(
const QString &invitation,
const KCalCore::MemoryCalendar::Ptr &calendar,
InvitationFormatterHelper *helper,
const QString &sender);
const QString &invitation, const KCalCore::MemoryCalendar::Ptr &calendar, InvitationFormatterHelper *helper, const QString &sender);
/**
Build a pretty QString representation of an Incidence's recurrence info.
......@@ -181,8 +162,7 @@ KCALUTILS_EXPORT QString recurrenceString(const KCalCore::Incidence::Ptr &incide
@param shortfmt if false, a short version of each reminder is printed;
else a longer version of each reminder is printed.
*/
KCALUTILS_EXPORT QStringList reminderStringList(const KCalCore::Incidence::Ptr &incidence,
bool shortfmt = true);
KCALUTILS_EXPORT QStringList reminderStringList(const KCalCore::Incidence::Ptr &incidence, bool shortfmt = true);
/**
Build a QString time representation of a KDateTime object.
......@@ -191,8 +171,7 @@ KCALUTILS_EXPORT QStringList reminderStringList(const KCalCore::Incidence::Ptr &
@param spec Time spec to use.
@see dateToString(), dateTimeToString().
*/
KCALUTILS_EXPORT QString timeToString(const KDateTime &date, bool shortfmt = true,
const KDateTime::Spec &spec = KDateTime::Spec());
KCALUTILS_EXPORT QString timeToString(const KDateTime &date, bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec());
/**
Build a QString date representation of a KDateTime object.
......@@ -201,12 +180,9 @@ KCALUTILS_EXPORT QString timeToString(const KDateTime &date, bool shortfmt = tru
@param spec Time spec to use.
@see dateToString(), dateTimeToString().