Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PIM EventViews
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PIM
PIM EventViews
Commits
af87c91b
Commit
af87c91b
authored
Apr 08, 2017
by
Volker Krause
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port some KDateTime::Spec usage considering this is always LocalTime
parent
5ad230a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
src/agenda/agendaview.cpp
src/agenda/agendaview.cpp
+4
-7
No files found.
src/agenda/agendaview.cpp
View file @
af87c91b
...
@@ -333,9 +333,6 @@ AgendaItem::List AgendaView::Private::agendaItems(const QString &uid) const
...
@@ -333,9 +333,6 @@ AgendaItem::List AgendaView::Private::agendaItems(const QString &uid) const
bool
AgendaView
::
Private
::
mightBeVisible
(
const
KCalCore
::
Incidence
::
Ptr
&
incidence
)
const
bool
AgendaView
::
Private
::
mightBeVisible
(
const
KCalCore
::
Incidence
::
Ptr
&
incidence
)
const
{
{
KCalCore
::
Todo
::
Ptr
todo
=
incidence
.
dynamicCast
<
KCalCore
::
Todo
>
();
KCalCore
::
Todo
::
Ptr
todo
=
incidence
.
dynamicCast
<
KCalCore
::
Todo
>
();
const
KDateTime
::
Spec
timeSpec
=
q
->
preferences
()
->
timeSpec
();
KDateTime
firstVisibleDateTime
(
mSelectedDates
.
first
(),
timeSpec
);
KDateTime
lastVisibleDateTime
(
mSelectedDates
.
last
(),
timeSpec
);
// KDateTime::toTimeSpec() is expensive, so lets first compare only the date,
// KDateTime::toTimeSpec() is expensive, so lets first compare only the date,
// to see if the incidence is visible.
// to see if the incidence is visible.
...
@@ -350,17 +347,17 @@ bool AgendaView::Private::mightBeVisible(const KCalCore::Incidence::Ptr &inciden
...
@@ -350,17 +347,17 @@ bool AgendaView::Private::mightBeVisible(const KCalCore::Incidence::Ptr &inciden
if
(
!
incidence
->
recurs
())
{
if
(
!
incidence
->
recurs
())
{
// If DTEND/DTDUE is before the 1st visible column
// If DTEND/DTDUE is before the 1st visible column
if
(
incidence
->
dateTime
(
KCalCore
::
Incidence
::
RoleEnd
).
date
().
daysTo
(
firstVisibleDateTime
.
date
())
>
2
)
{
if
(
incidence
->
dateTime
(
KCalCore
::
Incidence
::
RoleEnd
).
date
().
daysTo
(
mSelectedDates
.
first
())
>
2
)
{
return
false
;
return
false
;
}
}
// if DTSTART is after the last visible column
// if DTSTART is after the last visible column
if
(
!
todo
&&
lastVisibleDateTime
.
date
().
daysTo
(
incidence
->
dtStart
().
date
())
>
2
)
{
if
(
!
todo
&&
mSelectedDates
.
last
().
daysTo
(
incidence
->
dtStart
().
date
())
>
2
)
{
return
false
;
return
false
;
}
}
// if DTDUE is after the last visible column
// if DTDUE is after the last visible column
if
(
todo
&&
lastVisibleDateTime
.
date
().
daysTo
(
todo
->
dtDue
().
date
())
>
2
)
{
if
(
todo
&&
mSelectedDates
.
last
().
daysTo
(
todo
->
dtDue
().
date
())
>
2
)
{
return
false
;
return
false
;
}
}
}
}
...
@@ -593,7 +590,7 @@ void AgendaView::Private::insertIncidence(const KCalCore::Incidence::Ptr &incide
...
@@ -593,7 +590,7 @@ void AgendaView::Private::insertIncidence(const KCalCore::Incidence::Ptr &incide
}
}
const
KDateTime
::
Spec
timeSpec
=
q
->
preferences
()
->
timeSpec
();
const
KDateTime
::
Spec
timeSpec
=
q
->
preferences
()
->
timeSpec
();
const
QDate
today
=
KDateTime
::
currentDateTime
(
timeSpec
).
date
();
const
QDate
today
=
QDateTime
::
currentDateTime
(
).
date
();
if
(
todo
&&
todo
->
isOverdue
()
&&
today
>=
insertAtDate
)
{
if
(
todo
&&
todo
->
isOverdue
()
&&
today
>=
insertAtDate
)
{
mAllDayAgenda
->
insertAllDayItem
(
incidence
,
recurrenceId
,
curCol
,
curCol
,
mAllDayAgenda
->
insertAllDayItem
(
incidence
,
recurrenceId
,
curCol
,
curCol
,
createSelected
);
createSelected
);
...
...
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