Commit 5a6bb5f6 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some clazy warning

parent 39be443e
Pipeline #78162 passed with stage
in 4 minutes and 42 seconds
......@@ -44,7 +44,7 @@ using namespace KCalUtils::IncidenceFormatter;
// Create a to-do that may or may not be an all-day to-do, may or may nor recur,
// and with the given start and due dates (which may be invalid).
// Other to-do fields are fixed.
static KCalendarCore::Todo::Ptr makeToDo(bool allday, bool recurs, QDateTime dtStart, QDateTime dtDue)
static KCalendarCore::Todo::Ptr makeToDo(bool allday, bool recurs, const QDateTime &dtStart, const QDateTime &dtDue)
{
KCalendarCore::Todo::Ptr todo{new KCalendarCore::Todo};
todo->setSummary(SUMMARY);
......
......@@ -3308,12 +3308,12 @@ QString IncidenceFormatter::recurrenceString(const Incidence::Ptr &incidence)
return recurStr;
}
QString IncidenceFormatter::timeToString(const QTime &time, bool shortfmt)
QString IncidenceFormatter::timeToString(QTime time, bool shortfmt)
{
return QLocale().toString(time, shortfmt ? QLocale::ShortFormat : QLocale::LongFormat);
}
QString IncidenceFormatter::dateToString(const QDate &date, bool shortfmt)
QString IncidenceFormatter::dateToString(QDate date, bool shortfmt)
{
return QLocale().toString(date, (shortfmt ? QLocale::ShortFormat : QLocale::LongFormat));
}
......
......@@ -158,7 +158,7 @@ KCALUTILS_EXPORT QStringList reminderStringList(const KCalendarCore::Incidence::
@param shortfmt If true, display info in short format.
@see dateToString(), dateTimeToString().
*/
KCALUTILS_EXPORT QString timeToString(const QTime &time, bool shortfmt = true);
KCALUTILS_EXPORT QString timeToString(QTime time, bool shortfmt = true);
/**
Build a QString date representation of a QDate object.
......@@ -167,7 +167,7 @@ KCALUTILS_EXPORT QString timeToString(const QTime &time, bool shortfmt = true);
@param shortfmt If true, display info in short format.
@see dateToString(), dateTimeToString().
*/
KCALUTILS_EXPORT QString dateToString(const QDate &date, bool shortfmt = true);
KCALUTILS_EXPORT QString dateToString(QDate date, bool shortfmt = true);
KCALUTILS_EXPORT QString formatStartEnd(const QDateTime &start, const QDateTime &end, bool isAllDay);
......
Supports Markdown
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