Use the correct check to determine whether initial preference should be read from KParts or KPlugin
Use QJsonValue::isUndefined()
instead of QJsonValue::isNull()
to determine whether the KParts
section of the JSON file contains the initial preference entry. QJsonValue::isNull()
returns true
even if the entry doesn't exist, which makes KPartsLoader
attempt to use the value in the KParts
section even if it doesn't exist and give the part priority 0.
This is the cause of the bug mentioned in !87 (comment 992632).