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
Please register or sign in to comment