Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
KAlarm
Commits
b533214b
Commit
b533214b
authored
Jun 05, 2015
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use QVariant method.
parent
e3e64d40
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
akonadimodel.cpp
akonadimodel.cpp
+4
-4
No files found.
akonadimodel.cpp
View file @
b533214b
...
...
@@ -556,7 +556,7 @@ bool AkonadiModel::setData(const QModelIndex& index, const QVariant& value, int
}
case
EnabledTypesRole
:
{
const
CalEvent
::
Types
types
=
static_cast
<
CalEvent
::
Types
>
(
value
.
value
<
i
nt
>
());
const
CalEvent
::
Types
types
=
static_cast
<
CalEvent
::
Types
>
(
value
.
toI
nt
());
attr
=
collection
.
attribute
<
CollectionAttribute
>
(
Entity
::
AddIfMissing
);
if
(
attr
->
enabled
()
==
types
)
return
true
;
// no change
...
...
@@ -569,16 +569,16 @@ bool AkonadiModel::setData(const QModelIndex& index, const QVariant& value, int
if
(
collection
.
hasAttribute
<
CollectionAttribute
>
()
&&
isCompatible
(
collection
))
{
const
CalEvent
::
Types
types
=
static_cast
<
CalEvent
::
Types
>
(
value
.
value
<
i
nt
>
());
const
CalEvent
::
Types
types
=
static_cast
<
CalEvent
::
Types
>
(
value
.
toI
nt
());
attr
=
collection
.
attribute
<
CollectionAttribute
>
(
Entity
::
AddIfMissing
);
qCDebug
(
KALARM_LOG
)
<<
"Set standard:"
<<
types
<<
", was="
<<
attr
->
standard
();
qCDebug
(
KALARM_LOG
)
<<
"Set standard:"
<<
types
<<
", was="
<<
attr
->
standard
();
attr
->
setStandard
(
types
);
updateCollection
=
true
;
}
break
;
case
KeepFormatRole
:
{
const
bool
keepFormat
=
value
.
value
<
b
ool
>
();
const
bool
keepFormat
=
value
.
toB
ool
();
attr
=
collection
.
attribute
<
CollectionAttribute
>
(
Entity
::
AddIfMissing
);
if
(
attr
->
keepFormat
()
==
keepFormat
)
return
true
;
// no change
...
...
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