Commit 298a8e32 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix clazy warning

parent 71b92f67
Pipeline #61605 passed with stage
in 6 minutes
......@@ -136,7 +136,7 @@ void PlaceItemTest::fillLeftGap()
auto item2 = std::make_unique<TestItem>("item2", 1, 3, 1, 2);
const QList<CellItem *> cells({item1.get(), item2.get()});
auto newItem = std::make_unique<TestItem>("new", 2, 4);
auto overlappers = CellItem::placeItem(cells, newItem.get());
// auto overlappers = CellItem::placeItem(cells, newItem.get());
QCOMPARE(newItem->subCell(), item1->subCell());
QCOMPARE(newItem->subCells(), 2);
}
......@@ -152,7 +152,7 @@ void PlaceItemTest::fillCenterGap()
auto item3 = std::make_unique<TestItem>("item3", 1, 3, 2, 3);
const QList<CellItem *> cells({item1.get(), item2.get(), item3.get()});
auto newItem= std::make_unique<TestItem>("new", 2, 4);
auto overlappers = CellItem::placeItem(cells, newItem.get());
// auto overlappers = CellItem::placeItem(cells, newItem.get());
QCOMPARE(newItem->subCell(), item1->subCell());
QCOMPARE(newItem->subCells(), 3);
}
......@@ -170,7 +170,7 @@ void PlaceItemTest::transitiveOverlap()
auto item3 = std::make_unique<TestItem>("item3", 1, 3, 1, 2);
const QList<CellItem *> cells({item1.get(), item2.get(), item3.get()});
auto newItem= std::make_unique<TestItem>("new", 2, 4);
auto overlappers = CellItem::placeItem(cells, newItem.get());
// auto overlappers = CellItem::placeItem(cells, newItem.get());
QCOMPARE(newItem->subCells(), 3);
QCOMPARE(item1->subCells(), 3);
QCOMPARE(item2->subCells(), 3);
......
......@@ -1610,11 +1610,11 @@ void CalPrintPluginBase::drawMonth(QPainter &p,
// 3) Draw some kind of timeline showing free and busy times
// Holidays
QList<KCalendarCore::Event::Ptr> holidays;
// QList<KCalendarCore::Event::Ptr> holidays;
for (QDate d(start); d <= end; d = d.addDays(1)) {
KCalendarCore::Event::Ptr e = holidayEvent(d);
if (e) {
holidays.append(e);
// holidays.append(e);
if (holidaysFlags & TimeBoxes) {
timeboxItems.append(new PrintCellItem(e, QDateTime(d, QTime(0, 0, 0)), QDateTime(d.addDays(1), QTime(0, 0, 0))));
}
......@@ -1624,7 +1624,7 @@ void CalPrintPluginBase::drawMonth(QPainter &p,
}
}
QList<MonthEventStruct> monthentries;
QVector<MonthEventStruct> monthentries;
for (const KCalendarCore::Event::Ptr &e : qAsConst(events)) {
if (!e) {
......@@ -1668,7 +1668,7 @@ void CalPrintPluginBase::drawMonth(QPainter &p,
// qSort( monthentries.begin(), monthentries.end() );
QList<MonthEventStruct>::ConstIterator mit = monthentries.constBegin();
QVector<MonthEventStruct>::ConstIterator mit = monthentries.constBegin();
QDateTime endofmonth(end, QTime(0, 0, 0));
endofmonth = endofmonth.addDays(1);
for (; mit != monthentries.constEnd(); ++mit) {
......
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