Commit d404e90b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some clazy warning

parent a4345186
Pipeline #78160 failed with stage
in 4 minutes and 54 seconds
......@@ -80,7 +80,7 @@ bool ConflictResolver::containsAttendee(const KCalendarCore::Attendee &attendee)
return mFBModel->containsAttendee(attendee);
}
void ConflictResolver::setEarliestDate(const QDate &newDate)
void ConflictResolver::setEarliestDate(QDate newDate)
{
QDateTime newStart = mTimeframeConstraint.start();
newStart.setDate(newDate);
......@@ -88,7 +88,7 @@ void ConflictResolver::setEarliestDate(const QDate &newDate)
calculateConflicts();
}
void ConflictResolver::setEarliestTime(const QTime &newTime)
void ConflictResolver::setEarliestTime(QTime newTime)
{
QDateTime newStart = mTimeframeConstraint.start();
newStart.setTime(newTime);
......@@ -96,7 +96,7 @@ void ConflictResolver::setEarliestTime(const QTime &newTime)
calculateConflicts();
}
void ConflictResolver::setLatestDate(const QDate &newDate)
void ConflictResolver::setLatestDate(QDate newDate)
{
QDateTime newEnd = mTimeframeConstraint.end();
newEnd.setDate(newDate);
......@@ -104,7 +104,7 @@ void ConflictResolver::setLatestDate(const QDate &newDate)
calculateConflicts();
}
void ConflictResolver::setLatestTime(const QTime &newTime)
void ConflictResolver::setLatestTime(QTime newTime)
{
QDateTime newEnd = mTimeframeConstraint.end();
newEnd.setTime(newTime);
......
......@@ -125,10 +125,10 @@ public Q_SLOTS:
*
* These control the timeframe for which conflicts are to be resolved.
*/
void setEarliestDate(const QDate &newDate);
void setEarliestTime(const QTime &newTime);
void setLatestDate(const QDate &newDate);
void setLatestTime(const QTime &newTime);
void setEarliestDate(QDate newDate);
void setEarliestTime(QTime newTime);
void setLatestDate(QDate newDate);
void setLatestTime(QTime newTime);
void setEarliestDateTime(const QDateTime &newDateTime);
void setLatestDateTime(const QDateTime &newDateTime);
......
......@@ -72,15 +72,17 @@ ItemEditorPrivate::ItemEditorPrivate(Akonadi::IncidenceChanger *changer, EditorI
mChanger = changer ? changer : new Akonadi::IncidenceChanger(new IndividualMailComponentFactory(qq), qq);
// clang-format off
qq->connect(mChanger,
SIGNAL(modifyFinished(int, Akonadi::Item, Akonadi::IncidenceChanger::ResultCode, QString)),
SIGNAL(modifyFinished(int,Akonadi::Item,Akonadi::IncidenceChanger::ResultCode,QString)),
qq,
SLOT(onModifyFinished(int, Akonadi::Item, Akonadi::IncidenceChanger::ResultCode, QString)));
SLOT(onModifyFinished(int,Akonadi::Item,Akonadi::IncidenceChanger::ResultCode,QString)));
qq->connect(mChanger,
SIGNAL(createFinished(int, Akonadi::Item, Akonadi::IncidenceChanger::ResultCode, QString)),
SIGNAL(createFinished(int, Akonadi::Item,Akonadi::IncidenceChanger::ResultCode,QString)),
qq,
SLOT(onCreateFinished(int, Akonadi::Item, Akonadi::IncidenceChanger::ResultCode, QString)));
SLOT(onCreateFinished(int, Akonadi::Item,Akonadi::IncidenceChanger::ResultCode,QString)));
// clang-format on
}
void ItemEditorPrivate::moveJobFinished(KJob *job)
......
......@@ -54,10 +54,11 @@ enum {
ComboIndexYearlyDay
};
static void setExDateTimesFromExDates(KCalendarCore::Recurrence *r, KCalendarCore::DateList exDates)
static void setExDateTimesFromExDates(KCalendarCore::Recurrence *r, const KCalendarCore::DateList &exDates)
{
KCalendarCore::DateTimeList dts;
QDateTime dt = r->startDateTime();
dts.reserve(exDates.count());
for (const auto &e : exDates) {
dt.setDate(e);
dts.append(dt);
......
......@@ -20,7 +20,7 @@
using namespace IncidenceEditorNG;
SchedulingDialog::SchedulingDialog(const QDate &startDate, const QTime &startTime, int duration, ConflictResolver *resolver, QWidget *parent)
SchedulingDialog::SchedulingDialog(QDate startDate, QTime startTime, int duration, ConflictResolver *resolver, QWidget *parent)
: QDialog(parent)
, mResolver(resolver)
, mPeriodModel(new CalendarSupport::FreePeriodModel(this))
......
......@@ -26,7 +26,7 @@ class SchedulingDialog : public QDialog, private Ui_Dialog
{
Q_OBJECT
public:
explicit SchedulingDialog(const QDate &startDate, const QTime &startTime, int duration, ConflictResolver *resolver, QWidget *parent);
explicit SchedulingDialog(QDate startDate, QTime startTime, int duration, ConflictResolver *resolver, QWidget *parent);
~SchedulingDialog() override;
Q_REQUIRED_RESULT QDate selectedStartDate() const;
......
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