Skip to content
Commit fca8d1f9 authored by Marc Mutz's avatar Marc Mutz
Browse files

Akonadi::Item: never return a null pointer from payloadBase()

Code compiled against an old libakonadi-kde used the non-templated hasPayload() method to check for
the presence of any payload. Since Item was able to only ever hold one payload object at a time, the
code following hasPayload() could be sure that payloadBase() would return non-null. Consequently, the old
payload_cast<> implementation did not contain a check for null. This code is inlined into existing
applications, though, and thus will fail when payloadBase() now returns null.

Instead of returning null, we now return a payload that is impossible to set, thus making the old
payload_cast<> happily fail (which the old payload<T>() code handles gracefully.

svn path=/trunk/KDE/kdepimlibs/; revision=1160972
parent 2e942c9b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment