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
KItinerary
Commits
2256ddc6
Commit
2256ddc6
authored
Oct 15, 2021
by
Volker Krause
Browse files
Use pkpass expirationDate field to guess a suitable end time for events
parent
be98aaae
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/processors/pkpassdocumentprocessor.cpp
View file @
2256ddc6
...
@@ -215,6 +215,12 @@ static Event extractEventTicketPass(KPkPass::Pass *pass, Event event)
...
@@ -215,6 +215,12 @@ static Event extractEventTicketPass(KPkPass::Pass *pass, Event event)
// "relevantDate" is the best guess for the start time
// "relevantDate" is the best guess for the start time
if
(
pass
->
relevantDate
().
isValid
()
&&
!
event
.
startDate
().
isValid
())
{
if
(
pass
->
relevantDate
().
isValid
()
&&
!
event
.
startDate
().
isValid
())
{
event
.
setStartDate
(
pass
->
relevantDate
());
event
.
setStartDate
(
pass
->
relevantDate
());
// "expirationDate" is the best guess for the end time
if
(
pass
->
expirationDate
().
isValid
()
&&
pass
->
relevantDate
().
date
()
==
pass
->
expirationDate
().
date
()
&&
pass
->
expirationDate
()
>
pass
->
relevantDate
()
&&
!
event
.
endDate
().
isValid
())
{
event
.
setEndDate
(
pass
->
expirationDate
());
}
}
}
// location is the best guess for the venue
// location is the best guess for the venue
...
...
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