Commit 5291b784 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix clazy warning

parent da6dae2b
Pipeline #61634 passed with stage
in 5 minutes and 32 seconds
......@@ -194,7 +194,7 @@ public:
KAEvent::OccurType nextOccurrence(const KADateTime &preDateTime, DateTime &result, KAEvent::OccurOption = KAEvent::IGNORE_REPETITION) const;
KAEvent::OccurType previousOccurrence(const KADateTime &afterDateTime, DateTime &result, bool includeRepetitions = false) const;
void setRecurrence(const KARecurrence &);
bool setRecur(KCalendarCore::RecurrenceRule::PeriodType, int freq, int count, const QDate &end, KARecurrence::Feb29Type = KARecurrence::Feb29_None);
bool setRecur(KCalendarCore::RecurrenceRule::PeriodType, int freq, int count, QDate end, KARecurrence::Feb29Type = KARecurrence::Feb29_None);
bool setRecur(KCalendarCore::RecurrenceRule::PeriodType, int freq, int count, const KADateTime &end, KARecurrence::Feb29Type = KARecurrence::Feb29_None);
KARecurrence::Type checkRecur() const;
void clearRecur();
......@@ -2703,7 +2703,7 @@ bool KAEvent::setRecurMinutely(int freq, int count, const KADateTime &end)
* end = end date (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
bool KAEvent::setRecurDaily(int freq, const QBitArray &days, int count, const QDate &end)
bool KAEvent::setRecurDaily(int freq, const QBitArray &days, int count, QDate end)
{
const bool success = d->setRecur(RecurrenceRule::rDaily, freq, count, end);
if (success) {
......@@ -2731,7 +2731,7 @@ bool KAEvent::setRecurDaily(int freq, const QBitArray &days, int count, const QD
* end = end date (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
bool KAEvent::setRecurWeekly(int freq, const QBitArray &days, int count, const QDate &end)
bool KAEvent::setRecurWeekly(int freq, const QBitArray &days, int count, QDate end)
{
const bool success = d->setRecur(RecurrenceRule::rWeekly, freq, count, end);
if (success) {
......@@ -2752,7 +2752,7 @@ bool KAEvent::setRecurWeekly(int freq, const QBitArray &days, int count, const Q
* end = end date (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
bool KAEvent::setRecurMonthlyByDate(int freq, const QVector<int> &days, int count, const QDate &end)
bool KAEvent::setRecurMonthlyByDate(int freq, const QVector<int> &days, int count, QDate end)
{
const bool success = d->setRecur(RecurrenceRule::rMonthly, freq, count, end);
if (success) {
......@@ -2776,7 +2776,7 @@ bool KAEvent::setRecurMonthlyByDate(int freq, const QVector<int> &days, int coun
* end = end date (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
bool KAEvent::setRecurMonthlyByPos(int freq, const QVector<MonthPos> &posns, int count, const QDate &end)
bool KAEvent::setRecurMonthlyByPos(int freq, const QVector<MonthPos> &posns, int count, QDate end)
{
const bool success = d->setRecur(RecurrenceRule::rMonthly, freq, count, end);
if (success) {
......@@ -2802,7 +2802,7 @@ bool KAEvent::setRecurMonthlyByPos(int freq, const QVector<MonthPos> &posns, int
* end = end date (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
bool KAEvent::setRecurAnnualByDate(int freq, const QVector<int> &months, int day, KARecurrence::Feb29Type feb29, int count, const QDate &end)
bool KAEvent::setRecurAnnualByDate(int freq, const QVector<int> &months, int day, KARecurrence::Feb29Type feb29, int count, QDate end)
{
const bool success = d->setRecur(RecurrenceRule::rYearly, freq, count, end, feb29);
if (success) {
......@@ -2830,7 +2830,7 @@ bool KAEvent::setRecurAnnualByDate(int freq, const QVector<int> &months, int day
* end = end date (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
bool KAEvent::setRecurAnnualByPos(int freq, const QVector<MonthPos> &posns, const QVector<int> &months, int count, const QDate &end)
bool KAEvent::setRecurAnnualByPos(int freq, const QVector<MonthPos> &posns, const QVector<int> &months, int count, QDate end)
{
const bool success = d->setRecur(RecurrenceRule::rYearly, freq, count, end);
if (success) {
......@@ -2855,7 +2855,7 @@ bool KAEvent::setRecurAnnualByPos(int freq, const QVector<MonthPos> &posns, cons
* end = end date/time (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
bool KAEventPrivate::setRecur(KCalendarCore::RecurrenceRule::PeriodType recurType, int freq, int count, const QDate &end, KARecurrence::Feb29Type feb29)
bool KAEventPrivate::setRecur(KCalendarCore::RecurrenceRule::PeriodType recurType, int freq, int count, QDate end, KARecurrence::Feb29Type feb29)
{
KADateTime edt = mNextMainDateTime.kDateTime();
edt.setDate(end);
......@@ -5249,7 +5249,7 @@ bool KAEvent::convertKCalEvents(const Calendar::Ptr &calendar, int calendarVersi
}
if (!cats.isEmpty()) {
for (Alarm::Ptr alarm : alarms) { //clazy:exclude=range-loop Can't use reference because 'alarms' is const
for (const Alarm::Ptr &alarm : alarms) { //clazy:exclude=range-loop Can't use reference because 'alarms' is const
if (alarm->type() == Alarm::Display)
alarm->setCustomProperty(KACalendar::APPNAME, KAEventPrivate::FONT_COLOUR_PROPERTY,
QStringLiteral("%1;;").arg(cats.at(0)));
......
......@@ -1124,7 +1124,7 @@ public:
* @param end = end date (set invalid to use @p count instead).
* @return @c false if no recurrence was set up.
*/
bool setRecurDaily(int freq, const QBitArray &days, int count, const QDate &end);
bool setRecurDaily(int freq, const QBitArray &days, int count, QDate end);
/** Set the recurrence to recur weekly, on the specified weekdays.
* @param freq how many weeks between recurrences.
......@@ -1135,7 +1135,7 @@ public:
* @param end = end date (set invalid to use @p count instead).
* @return @c false if no recurrence was set up.
*/
bool setRecurWeekly(int freq, const QBitArray &days, int count, const QDate &end);
bool setRecurWeekly(int freq, const QBitArray &days, int count, QDate end);
/** Set the recurrence to recur monthly, on the specified days within the month.
* @param freq how many months between recurrences.
......@@ -1146,7 +1146,7 @@ public:
* @param end = end date (set invalid to use @p count instead).
* @return @c false if no recurrence was set up.
*/
bool setRecurMonthlyByDate(int freq, const QVector<int> &days, int count, const QDate &end);
bool setRecurMonthlyByDate(int freq, const QVector<int> &days, int count, QDate end);
/** Holds days of the week combined with a week number in the month,
* used to specify some monthly or annual recurrences. */
......@@ -1166,7 +1166,7 @@ public:
* @param end = end date (set invalid to use @p count instead).
* @return @c false if no recurrence was set up.
*/
bool setRecurMonthlyByPos(int freq, const QVector<MonthPos> &pos, int count, const QDate &end);
bool setRecurMonthlyByPos(int freq, const QVector<MonthPos> &pos, int count, QDate end);
/** Set the recurrence to recur annually, on the specified day in each
* of the specified months.
......@@ -1181,7 +1181,7 @@ public:
* @param end = end date (set invalid to use @p count instead).
* @return @c false if no recurrence was set up.
*/
bool setRecurAnnualByDate(int freq, const QVector<int> &months, int day, KARecurrence::Feb29Type, int count, const QDate &end);
bool setRecurAnnualByDate(int freq, const QVector<int> &months, int day, KARecurrence::Feb29Type, int count, QDate end);
/** Set the recurrence to recur annually, on the specified weekdays in the
* specified weeks of the specified months.
......@@ -1194,7 +1194,7 @@ public:
* @param end = end date (set invalid to use @p count instead).
* @return @c false if no recurrence was set up.
*/
bool setRecurAnnualByPos(int freq, const QVector<MonthPos> &pos, const QVector<int> &months, int count, const QDate &end);
bool setRecurAnnualByPos(int freq, const QVector<MonthPos> &pos, const QVector<int> &months, int count, QDate end);
/** Return whether the event recurs.
* @see recurType()
......
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