GEventLoop was just a dummy subclass of CEventLoop anyway. The only
thing it actually did was make sure a GWindowServerConnectionw was
instantiated. We now take care of that in GApplication instead.
CEventLoop is now non-virtual and a little less confusing. :^)
Okay, I've spent a whole day on this now, and it finally kinda works!
With this patch, CObject and all of its derived classes are reference
counted instead of tree-owned.
The previous, Qt-like model was nice and familiar, but ultimately also
outdated and difficult to reason about.
CObject-derived types should now be stored in RefPtr/NonnullRefPtr and
each class can be constructed using the forwarding construct() helper:
auto widget = GWidget::construct(parent_widget);
Note that construct() simply forwards all arguments to an existing
constructor. It is inserted into each class by the C_OBJECT macro,
see CObject.h to understand how that works.
CObject::delete_later() disappears in this patch, as there is no longer
a single logical owner of a CObject.
Subclasses of CNetworkJob handle this by overriding shutdown().
This patch implements it for CHttpJob by simply tearing down the
underlying socket.
We also automatically call shutdown() after the job finishes,
regardless of success or failure. :^)
The C_OBJECT macro now also inserts a static construct(...) helper into
the class. Now we can make the constructor(s) private and instead call:
auto socket = CTCPSocket::construct(arguments);
construct() returns an ObjectPtr<T>, which we'll later switch to being
a NonnullRefPtr<T>, once everything else in in place for ref-counting.
The delete action now actually deletes files (after asking the user for
confirmation, of course.) Deleting directories is not yet supported.
Fixes#541.
Fix a crash when opening a folder, and another one when trying to open
a newly created folder.
It was not safe to modify a GModelSelection while it's being iterated over.
Fixes#536.