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 EventViews
Commits
b04ce739
Commit
b04ce739
authored
Aug 05, 2020
by
Laurent Montel
😁
Browse files
Fix clazy warning
parent
114aaebc
Pipeline
#29691
passed with stage
in 8 minutes and 25 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/agenda/agendaview.cpp
View file @
b04ce739
...
...
@@ -78,9 +78,9 @@ class Q_DECL_HIDDEN EventIndicator::Private
public:
Private
(
EventIndicator
*
parent
,
EventIndicator
::
Location
loc
)
:
q
(
parent
)
,
mColumns
(
1
)
:
mColumns
(
1
)
,
mLocation
(
loc
)
,
q
(
parent
)
{
mEnabled
.
resize
(
mColumns
);
...
...
@@ -717,7 +717,7 @@ void AgendaView::Private::insertIncidence(const KCalendarCore::Incidence::Ptr &i
////////////////////////////////////////////////////////////////////////////
AgendaView
::
AgendaView
(
const
QDate
&
start
,
const
QDate
&
end
,
bool
isInteractive
,
bool
isSideBySide
,
QWidget
*
parent
)
AgendaView
::
AgendaView
(
QDate
start
,
QDate
end
,
bool
isInteractive
,
bool
isSideBySide
,
QWidget
*
parent
)
:
EventView
(
parent
)
,
d
(
new
Private
(
this
,
isInteractive
,
isSideBySide
))
{
...
...
@@ -732,7 +732,7 @@ AgendaView::AgendaView(const PrefsPtr &prefs, const QDate &start, const QDate &e
init
(
start
,
end
);
}
void
AgendaView
::
init
(
const
QDate
&
start
,
const
QDate
&
end
)
void
AgendaView
::
init
(
QDate
start
,
QDate
end
)
{
d
->
mSelectedDates
=
Private
::
generateDateList
(
start
,
end
);
...
...
@@ -2152,7 +2152,7 @@ void AgendaView::setHolidayMasks()
d
->
mHolidayMask
.
resize
(
d
->
mSelectedDates
.
count
()
+
1
);
const
QList
<
QDate
>
workDays
=
CalendarSupport
::
workDays
(
d
->
mSelectedDates
.
f
irst
().
addDays
(
-
1
),
const
QList
<
QDate
>
workDays
=
CalendarSupport
::
workDays
(
d
->
mSelectedDates
.
constF
irst
().
addDays
(
-
1
),
d
->
mSelectedDates
.
last
());
for
(
int
i
=
0
;
i
<
d
->
mSelectedDates
.
count
();
++
i
)
{
d
->
mHolidayMask
[
i
]
=
!
workDays
.
contains
(
d
->
mSelectedDates
[
i
]);
...
...
src/agenda/agendaview.h
View file @
b04ce739
...
...
@@ -86,7 +86,7 @@ class EVENTVIEWS_EXPORT AgendaView : public EventView
public:
explicit
AgendaView
(
const
PrefsPtr
&
preferences
,
const
QDate
&
start
,
const
QDate
&
end
,
bool
isInteractive
,
bool
isSideBySide
=
false
,
QWidget
*
parent
=
nullptr
);
explicit
AgendaView
(
const
QDate
&
start
,
const
QDate
&
end
,
bool
isInteractive
,
bool
isSideBySide
=
false
,
QWidget
*
parent
=
nullptr
);
explicit
AgendaView
(
QDate
start
,
QDate
end
,
bool
isInteractive
,
bool
isSideBySide
=
false
,
QWidget
*
parent
=
nullptr
);
~
AgendaView
()
override
;
...
...
@@ -240,7 +240,7 @@ private Q_SLOTS:
void
slotDeleteIncidence
(
const
KCalendarCore
::
Incidence
::
Ptr
&
incidence
);
private:
void
init
(
const
QDate
&
start
,
const
QDate
&
end
);
void
init
(
QDate
start
,
QDate
end
);
bool
filterByCollectionSelection
(
const
KCalendarCore
::
Incidence
::
Ptr
&
incidence
);
void
setupTimeLabel
(
TimeLabels
*
timeLabel
);
bool
displayIncidence
(
const
KCalendarCore
::
Incidence
::
Ptr
&
incidence
,
bool
createSelected
);
...
...
src/agenda/timescaleconfigdialog.cpp
View file @
b04ce739
...
...
@@ -88,7 +88,7 @@ TimeScaleConfigDialog::TimeScaleConfigDialog(const PrefsPtr &preferences, QWidge
shownTimeZones
+=
d
->
mPreferences
->
timeScaleTimezones
();
shownTimeZones
.
removeDuplicates
();
Q
List
<
TimeZoneNamePair
>
availList
,
selList
;
Q
Vector
<
TimeZoneNamePair
>
availList
,
selList
;
const
auto
zoneIds
=
QTimeZone
::
availableTimeZoneIds
();
for
(
const
auto
&
zoneId
:
qAsConst
(
zoneIds
))
{
// do not list timezones already shown
...
...
src/list/listview.cpp
View file @
b04ce739
...
...
@@ -487,8 +487,8 @@ void ListView::changeIncidenceDisplay(const Akonadi::Item &aitem, int action)
{
const
Incidence
::
Ptr
incidence
=
CalendarSupport
::
incidence
(
aitem
);
ListViewItem
*
item
=
nullptr
;
QDate
f
=
d
->
mSelectedDates
.
f
irst
();
QDate
l
=
d
->
mSelectedDates
.
l
ast
();
const
QDate
f
=
d
->
mSelectedDates
.
constF
irst
();
const
QDate
l
=
d
->
mSelectedDates
.
constL
ast
();
QDate
date
;
if
(
CalendarSupport
::
hasTodo
(
aitem
))
{
...
...
src/month/monthgraphicsitems.cpp
View file @
b04ce739
...
...
@@ -330,7 +330,7 @@ void MonthGraphicsItem::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWi
}
}
void
MonthGraphicsItem
::
setStartDate
(
const
QDate
&
date
)
void
MonthGraphicsItem
::
setStartDate
(
QDate
date
)
{
mStartDate
=
date
;
}
...
...
src/month/monthgraphicsitems.h
View file @
b04ce739
...
...
@@ -169,7 +169,7 @@ public:
*/
QDate
endDate
()
const
;
void
setStartDate
(
const
QDate
&
d
);
void
setStartDate
(
QDate
d
);
void
setDaySpan
(
int
span
);
/**
...
...
src/month/monthscene.cpp
View file @
b04ce739
...
...
@@ -81,7 +81,7 @@ MonthCell *MonthScene::previousCell() const
return
mPreviousCell
;
}
int
MonthScene
::
getRightSpan
(
const
QDate
&
date
)
const
int
MonthScene
::
getRightSpan
(
QDate
date
)
const
{
MonthCell
*
cell
=
mMonthCellMap
.
value
(
date
);
if
(
!
cell
)
{
...
...
@@ -91,7 +91,7 @@ int MonthScene::getRightSpan(const QDate &date) const
return
7
-
cell
->
x
()
-
1
;
}
int
MonthScene
::
getLeftSpan
(
const
QDate
&
date
)
const
int
MonthScene
::
getLeftSpan
(
QDate
date
)
const
{
MonthCell
*
cell
=
mMonthCellMap
.
value
(
date
);
if
(
!
cell
)
{
...
...
src/month/monthscene.h
View file @
b04ce739
...
...
@@ -118,12 +118,12 @@ public:
/**
Get the space on the right of the cell associated to the date @p date.
*/
Q_REQUIRED_RESULT
int
getRightSpan
(
const
QDate
&
date
)
const
;
Q_REQUIRED_RESULT
int
getRightSpan
(
QDate
date
)
const
;
/**
Get the space on the left of the cell associated to the date @p date.
*/
Q_REQUIRED_RESULT
int
getLeftSpan
(
const
QDate
&
date
)
const
;
Q_REQUIRED_RESULT
int
getLeftSpan
(
QDate
date
)
const
;
/**
Returns the date in the first column of the row given by @p row.
...
...
src/multiagenda/multiagendaview.cpp
View file @
b04ce739
...
...
@@ -653,8 +653,8 @@ void MultiAgendaView::setChanges(Changes changes)
void
MultiAgendaView
::
setupScrollBar
()
{
if
(
!
d
->
mAgendaViews
.
isEmpty
()
&&
d
->
mAgendaViews
.
f
irst
()
->
agenda
())
{
QScrollBar
*
scrollBar
=
d
->
mAgendaViews
.
f
irst
()
->
agenda
()
->
verticalScrollBar
();
if
(
!
d
->
mAgendaViews
.
isEmpty
()
&&
d
->
mAgendaViews
.
constF
irst
()
->
agenda
())
{
QScrollBar
*
scrollBar
=
d
->
mAgendaViews
.
constF
irst
()
->
agenda
()
->
verticalScrollBar
();
d
->
mScrollBar
->
setMinimum
(
scrollBar
->
minimum
());
d
->
mScrollBar
->
setMaximum
(
scrollBar
->
maximum
());
d
->
mScrollBar
->
setSingleStep
(
scrollBar
->
singleStep
());
...
...
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