Commit 9d15fba7 authored by Glen Ditchfield's avatar Glen Ditchfield 🐛
Browse files

Fix Clazy warnings

parent b295cd8d
Pipeline #74491 passed with stage
in 4 minutes and 18 seconds
......@@ -733,9 +733,9 @@ void CalPrintTimetable::drawAllDayBox(QPainter &p,
}
void CalPrintTimetable::drawTimeTable(QPainter &p,
const QDate &fromDate,
const QDate &toDate,
const QRect &box)
QDate fromDate,
QDate toDate,
QRect box)
{
QTime myFromTime = mStartTime;
QTime myToTime = mEndTime;
......@@ -951,7 +951,7 @@ void CalPrintDay::setDateRange(const QDate &from, const QDate &to)
}
}
void CalPrintDay::drawDays(QPainter &p, const QRect &box)
void CalPrintDay::drawDays(QPainter &p, QRect box)
{
const int numberOfDays = mFromDate.daysTo(mToDate) + 1;
int vcells;
......
......@@ -118,9 +118,9 @@ protected:
@param box coordinates of the time table.
*/
void drawTimeTable(QPainter &p,
const QDate &fromDate,
const QDate &toDate,
const QRect &box);
QDate fromDate,
QDate toDate,
QRect box);
QTime mStartTime, mEndTime; /**< Earliest and latest times of day to print. */
bool mSingleLineLimit; /**< Should all fields be printed on the same line? */
......@@ -182,7 +182,7 @@ protected:
@param p QPainter of the printout
@param box coordinates of the week box.
*/
void drawDays(QPainter &p, const QRect &box);
void drawDays(QPainter &p, QRect box);
};
class CalPrintWeek : public CalPrintTimetable
......
......@@ -74,10 +74,8 @@ void CalPrinter::init(const Akonadi::ETMCalendar::Ptr &calendar)
void CalPrinter::setDateRange(QDate fd, QDate td)
{
PrintPlugin::List::Iterator it = mPrintPlugins.begin();
const PrintPlugin::List::Iterator end = mPrintPlugins.end();
for (; it != end; ++it) {
(*it)->setDateRange(fd, td);
for (const auto plugin : mPrintPlugins) {
plugin->setDateRange(fd, td);
}
}
......
......@@ -679,7 +679,7 @@ void CalPrintPluginBase::drawSmallMonth(QPainter &p, QDate qd, QRect box)
* This routine draws a header box over the main part of the calendar
* containing the days of the week.
*/
void CalPrintPluginBase::drawDaysOfWeek(QPainter &p, const QDate &fromDate, QDate toDate, QRect box)
void CalPrintPluginBase::drawDaysOfWeek(QPainter &p, QDate fromDate, QDate toDate, QRect box)
{
double cellWidth = double(box.width() - 1) / double(fromDate.daysTo(toDate) + 1);
QDate cellDate(fromDate);
......@@ -765,11 +765,11 @@ void CalPrintPluginBase::drawTimeLine(QPainter &p, QTime fromTime, QTime toTime,
void CalPrintPluginBase::drawAgendaDayBox(QPainter &p,
const KCalendarCore::Event::List &events,
const QDate &qd,
QDate qd,
bool expandable,
const QTime &fromTime,
const QTime &toTime,
const QRect &oldbox,
QTime fromTime,
QTime toTime,
QRect oldbox,
bool includeDescription,
bool includeCategories,
bool excludeTime,
......@@ -890,7 +890,7 @@ void CalPrintPluginBase::drawAgendaItem(PrintCellItem *item,
const QDateTime &startPrintDate,
const QDateTime &endPrintDate,
float minlen,
const QRect &box,
QRect box,
bool includeDescription,
bool includeCategories,
bool excludeTime)
......@@ -967,10 +967,10 @@ void CalPrintPluginBase::drawAgendaItem(PrintCellItem *item,
}
void CalPrintPluginBase::drawDayBox(QPainter &p,
const QDate &qd,
const QTime &fromTime,
const QTime &toTime,
const QRect &box,
QDate qd,
QTime fromTime,
QTime toTime,
QRect box,
bool fullDate,
bool printRecurDaily,
bool printRecurWeekly,
......@@ -1143,7 +1143,7 @@ void CalPrintPluginBase::drawDayBox(QPainter &p,
}
void CalPrintPluginBase::drawIncidence(QPainter &p,
const QRect &dayBox,
QRect dayBox,
const QString &time,
const QString &summary,
const QString &description,
......@@ -1279,8 +1279,8 @@ public:
};
void CalPrintPluginBase::drawMonth(QPainter &p,
const QDate &dt,
const QRect &box,
QDate dt,
QRect box,
int maxdays,
int subDailyFlags,
int holidaysFlags)
......@@ -1482,16 +1482,16 @@ void CalPrintPluginBase::drawMonth(QPainter &p,
}
void CalPrintPluginBase::drawMonthTable(QPainter &p,
const QDate &qd,
const QTime &fromTime,
const QTime &toTime,
QDate qd,
QTime fromTime,
QTime toTime,
bool weeknumbers,
bool recurDaily,
bool recurWeekly,
bool singleLineLimit,
bool includeDescription,
bool includeCategories,
const QRect &box)
QRect box)
{
int yoffset = mSubHeaderHeight;
int xoffset = 0;
......
......@@ -268,7 +268,7 @@ public:
@param toDate Last date of the printed dates
@param box coordinates of the box for the days of the week
*/
void drawDaysOfWeek(QPainter &p, const QDate &fromDate, QDate toDate, QRect box);
void drawDaysOfWeek(QPainter &p, QDate fromDate, QDate toDate, QRect box);
/**
Draw a single weekday name in a box inside the given area of the painter.
......@@ -319,11 +319,11 @@ public:
*/
void drawAgendaDayBox(QPainter &p,
const KCalendarCore::Event::List &eventList,
const QDate &qd,
QDate qd,
bool expandable,
const QTime &fromTime,
const QTime &toTime,
const QRect &box,
QTime fromTime,
QTime toTime,
QRect box,
bool includeDescription,
bool includeCategories,
bool excludeTime,
......@@ -334,7 +334,7 @@ public:
const QDateTime &startPrintDate,
const QDateTime &endPrintDate,
float minlen,
const QRect &box,
QRect box,
bool includeDescription,
bool includeCategories,
bool excludeTime);
......@@ -359,10 +359,10 @@ public:
@param includeCategories Whether to print the event categories (tags) as well.
*/
void drawDayBox(QPainter &p,
const QDate &qd,
const QTime &fromTime,
const QTime &toTime,
const QRect &box,
QDate qd,
QTime fromTime,
QTime toTime,
QRect box,
bool fullDate = false,
bool printRecurDaily = true,
bool printRecurWeekly = true,
......@@ -391,16 +391,16 @@ public:
@param box coordinates of the month.
*/
void drawMonthTable(QPainter &p,
const QDate &qd,
const QTime &fromTime,
const QTime &toTime,
QDate qd,
QTime fromTime,
QTime toTime,
bool weeknumbers,
bool recurDaily,
bool recurWeekly,
bool singleLineLimit,
bool includeDescription,
bool includeCategories,
const QRect &box);
QRect box);
/**
Draw a vertical representation of the month containing the date dt. Each
......@@ -420,8 +420,8 @@ public:
how holidays should be printed.
*/
void drawMonth(QPainter &p,
const QDate &dt,
const QRect &box,
QDate dt,
QRect box,
int maxdays = -1,
int subDailyFlags = TimeBoxes,
int holidaysFlags = Text);
......@@ -519,7 +519,7 @@ protected:
QColor categoryBgColor(const KCalendarCore::Incidence::Ptr &incidence) const;
void drawIncidence(QPainter &p,
const QRect &dayBox,
QRect dayBox,
const QString &time,
const QString &summary,
const QString &description,
......
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