Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
PIM Calendar Support
Commits
298a8e32
Commit
298a8e32
authored
May 12, 2021
by
Laurent Montel
😁
Browse files
Fix clazy warning
parent
71b92f67
Pipeline
#61605
passed with stage
in 6 minutes
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/autotests/placeitemtest.cpp
View file @
298a8e32
...
...
@@ -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
);
...
...
src/printing/calprintpluginbase.cpp
View file @
298a8e32
...
...
@@ -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,
}
}
Q
List
<
MonthEventStruct
>
monthentries
;
Q
Vector
<
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() );
Q
List
<
MonthEventStruct
>::
ConstIterator
mit
=
monthentries
.
constBegin
();
Q
Vector
<
MonthEventStruct
>::
ConstIterator
mit
=
monthentries
.
constBegin
();
QDateTime
endofmonth
(
end
,
QTime
(
0
,
0
,
0
));
endofmonth
=
endofmonth
.
addDays
(
1
);
for
(;
mit
!=
monthentries
.
constEnd
();
++
mit
)
{
...
...
Glen Ditchfield
🐛
@gditchfield
mentioned in commit
860ca0c2
·
Jun 02, 2021
mentioned in commit
860ca0c2
mentioned in commit 860ca0c29ddbfe360702e2563d6ebfbb9a826520
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment