setForeignKey doc does not match behavior of the code
Closed this issue · 1 comments
agateau-g commented
The documentation for QDjangoModel::setForeignKey() says it takes ownership of the QObject* value argument, but what the code does is assign value as a property of the model instance, and this is not taking ownership: a QObject does not delete its properties when it is deleted.
I think the code is doing the right thing, but the doc should be fixed.
jlaine commented
You are right the docs are out of date, it used to be that setForeignKey took ownership but this caused too many problems, I will fix it