cmake: make use of QSharedPointer<CMakeServer> from the start
Don't start using the sharedpointer at some random point in the lifetime
of the object.
Make sure we don't parent it, as QSharedPointer will try to delete it
eventually as well.
apol | Jan 15 2019, 2:46 AM |
@apol Hi, this change needs some more post-processing in the codebase it seems, as in void ChooseCMakeInterfaceJob::failedConnection(int code) there is code like this:
server->deleteLater(); server = nullptr;
The deleteLater() could be removed now, given the life-time is now managed by all the shared owners? Or was it needed for something else, which now might be no longer working?
Then the server = nullptr; only worls for Qt >= 5.8, as here by what I saw in the API the QSharedPointer(nullptr) constructor is used, which only was introduced with 5.8, thus also the failing builds on @kfunk 's CI.
No time myself to invest more or do a patch, so just pointing out what I found right now.
Shouldn't be a problem anymore.
https://invent.kde.org/kde/kdevelop/commit/d7ca03f79217dd060ded755a61196db29b6ab89d