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
Kalendar
Commits
b64db3ff
Commit
b64db3ff
authored
Nov 01, 2021
by
Claudio Cambra
Browse files
Fixed editing tasks resetting the task's due date
parent
0c8f9b87
Pipeline
#93040
canceled with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/contents/ui/IncidenceEditor.qml
View file @
b64db3ff
...
...
@@ -213,10 +213,10 @@ Kirigami.ScrollablePage {
id
:
allDayCheckBox
text
:
i18n
(
"
All day
"
)
enabled
:
!
incidenceForm
.
isTodo
||
incidenceStartCheckBox
.
checked
||
incidenceEndCheckBox
.
checked
enabled
:
!
incidenceForm
.
isTodo
||
!
isNaN
(
root
.
incidenceWrapper
.
incidenceStart
.
getTime
())
||
!
isNaN
(
root
.
incidenceWrapper
.
incidenceEnd
.
getTime
())
onEnabledChanged
:
if
(
!
enabled
)
root
.
incidenceWrapper
.
allDay
=
false
checked
:
root
.
incidenceWrapper
.
allDay
onC
heckedChang
ed
:
root
.
incidenceWrapper
.
allDay
=
checked
onC
lick
ed
:
root
.
incidenceWrapper
.
allDay
=
checked
}
Connections
{
...
...
@@ -246,15 +246,17 @@ Kirigami.ScrollablePage {
QQC2.CheckBox
{
id
:
incidenceStartCheckBox
property
date
oldDate
:
new
Date
()
property
var
oldDate
checked
:
!
isNaN
(
root
.
incidenceWrapper
.
incidenceStart
.
getTime
())
onC
heckedChang
ed
:
{
onC
lick
ed
:
{
if
(
!
checked
&&
incidenceForm
.
isTodo
)
{
oldDate
=
new
Date
(
root
.
incidenceWrapper
.
incidenceStart
)
oldDate
=
root
.
incidenceWrapper
.
incidenceStart
root
.
incidenceWrapper
.
incidenceStart
=
new
Date
(
undefined
)
}
else
if
(
incidenceForm
.
isTodo
)
{
}
else
if
(
incidenceForm
.
isTodo
&&
oldDate
)
{
root
.
incidenceWrapper
.
incidenceStart
=
oldDate
}
else
if
(
incidenceForm
.
isTodo
)
{
root
.
incidenceWrapper
.
incidenceEnd
=
new
Date
()
}
}
visible
:
incidenceForm
.
isTodo
...
...
@@ -291,15 +293,17 @@ Kirigami.ScrollablePage {
QQC2.CheckBox
{
id
:
incidenceEndCheckBox
property
date
oldDate
:
new
Date
()
property
var
oldDate
checked
:
!
isNaN
(
root
.
incidenceWrapper
.
incidenceEnd
.
getTime
())
onC
heckedChanged
:
{
onC
licked
:
{
// If we use onCheckedChanged this will change the date during init
if
(
!
checked
&&
incidenceForm
.
isTodo
)
{
oldDate
=
new
Date
(
root
.
incidenceWrapper
.
incidenceEnd
)
oldDate
=
root
.
incidenceWrapper
.
incidenceEnd
root
.
incidenceWrapper
.
incidenceEnd
=
new
Date
(
undefined
)
}
else
if
(
incidenceForm
.
isTodo
)
{
}
else
if
(
incidenceForm
.
isTodo
&&
oldDate
)
{
root
.
incidenceWrapper
.
incidenceEnd
=
oldDate
}
else
if
(
incidenceForm
.
isTodo
)
{
root
.
incidenceWrapper
.
incidenceEnd
=
new
Date
()
}
}
visible
:
incidenceForm
.
isTodo
...
...
src/incidencewrapper.cpp
View file @
b64db3ff
...
...
@@ -293,6 +293,7 @@ QDateTime IncidenceWrapper::incidenceEnd() const
void
IncidenceWrapper
::
setIncidenceEnd
(
const
QDateTime
&
incidenceEnd
,
bool
respectTimeZone
)
{
qDebug
()
<<
"setEnd"
;
QDateTime
end
;
if
(
respectTimeZone
)
{
end
=
incidenceEnd
;
...
...
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