Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Refactor Database and Database widgets #2491
This is the long-overdue refactoring of the Database internals.
The core changes are:
How has this been tested?
Tests pass, behaviour is the same as before (only slightly less buggy).
Types of changes
I don't know if we should really use a QWeakPointer instead of a QPointer. Yes, it does guarantee that the object is not deleted while you are using it (which is unlikely, because everything runs on the same thread), but it has the overhead of requiring you to promote it to a QSharedPointer before you can use it. QPointer is much simpler to use. It does not guarantee that the object goes out of scope while you are using it, but it still guarantees that the pointer is reset to nullptr if the object is deleted, so no dangling pointers.