Skip to content
GitLab
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
a8545b05
Commit
a8545b05
authored
Aug 01, 2017
by
Laurent Montel
Browse files
Minor optimization
parent
3300c230
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/agenda/agendaitem.cpp
View file @
a8545b05
...
...
@@ -685,8 +685,7 @@ QList<AgendaItem::QPtr> &AgendaItem::conflictItems()
void
AgendaItem
::
setConflictItems
(
const
QList
<
AgendaItem
::
QPtr
>
&
ci
)
{
mConflictItems
=
ci
;
QList
<
AgendaItem
::
QPtr
>::
iterator
it
;
for
(
it
=
mConflictItems
.
begin
();
it
!=
mConflictItems
.
end
();
++
it
)
{
for
(
QList
<
AgendaItem
::
QPtr
>::
iterator
it
=
mConflictItems
.
begin
(),
end
(
mConflictItems
.
end
());
it
!=
end
;
++
it
)
{
(
*
it
)
->
addConflictItem
(
this
);
}
}
...
...
src/agenda/agendaview.cpp
View file @
a8545b05
...
...
@@ -1449,7 +1449,7 @@ void AgendaView::updateTimeBarWidth()
QFontMetrics
fm
(
labelFont
);
int
width
=
d
->
mTimeLabelsZone
->
preferedTimeLabelsWidth
();
for
each
(
QLabel
*
l
,
d
->
mTimeBarHeaders
)
{
for
(
QLabel
*
l
:
qAsConst
(
d
->
mTimeBarHeaders
)
)
{
foreach
(
const
QString
&
word
,
l
->
text
().
split
(
QLatin1Char
(
' '
)))
{
width
=
qMax
(
width
,
fm
.
width
(
word
));
}
...
...
src/agenda/decorationlabel.cpp
View file @
a8545b05
...
...
@@ -38,7 +38,7 @@ DecorationLabel::DecorationLabel(CalendarDecoration::Element *e,
{
mPixmap
=
e
->
newPixmap
(
size
());
mUrl
=
e
->
url
();
setUrl
(
e
->
url
()
);
setUrl
(
mUrl
);
connect
(
e
,
&
CalendarDecoration
::
Element
::
gotNewExtensiveText
,
this
,
&
DecorationLabel
::
setExtensiveText
);
...
...
src/agenda/timelabels.cpp
View file @
a8545b05
...
...
@@ -361,8 +361,9 @@ QString TimeLabels::headerToolTip() const
toolTip
+=
abbreviations
;
toolTip
+=
QLatin1String
(
"<br/>"
);
}
if
(
!
mTimezone
.
comment
().
isEmpty
())
{
toolTip
+=
i18n
(
"<i>Comment:</i> %1"
,
mTimezone
.
comment
());
const
QString
timeZoneComment
(
mTimezone
.
comment
());
if
(
!
timeZoneComment
.
isEmpty
())
{
toolTip
+=
i18n
(
"<i>Comment:</i> %1"
,
timeZoneComment
);
}
toolTip
+=
QLatin1String
(
"</qt>"
);
...
...
src/agenda/viewcalendar.cpp
View file @
a8545b05
...
...
@@ -60,7 +60,7 @@ int MultiViewCalendar::calendars() const
ViewCalendar
::
Ptr
MultiViewCalendar
::
findCalendar
(
const
KCalCore
::
Incidence
::
Ptr
&
incidence
)
const
{
for
each
(
const
ViewCalendar
::
Ptr
&
cal
,
mSubCalendars
)
{
for
(
const
ViewCalendar
::
Ptr
&
cal
:
qAsConst
(
mSubCalendars
)
)
{
if
(
cal
->
isValid
(
incidence
))
{
return
cal
;
}
...
...
@@ -70,7 +70,7 @@ ViewCalendar::Ptr MultiViewCalendar::findCalendar(const KCalCore::Incidence::Ptr
ViewCalendar
::
Ptr
MultiViewCalendar
::
findCalendar
(
const
QString
&
incidenceIdentifier
)
const
{
for
each
(
const
ViewCalendar
::
Ptr
&
cal
,
mSubCalendars
)
{
for
(
const
ViewCalendar
::
Ptr
&
cal
:
qAsConst
(
mSubCalendars
)
)
{
if
(
cal
->
isValid
(
incidenceIdentifier
))
{
return
cal
;
}
...
...
src/list/listview.cpp
View file @
a8545b05
...
...
@@ -163,7 +163,7 @@ public:
bool
visit
(
const
FreeBusy
::
Ptr
&
)
override
{
// to inhibit hidden virtual compile warning
return
true
;
}
;
}
private:
ListViewItem
*
mItem
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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