libQuotient
libQuotient copied to clipboard
Apply proper RAII to Connection
This is a very bad idea generally, and the current code will leave quite a few things on the floor if setHomeserver()
gets called while jobs fly over. And there's no real case for it either; so just forbid it by design. Ideally, the whole server resolution/setting could be a couple of static factories so that Connection
would always be created with a sane homeserver set up; but that contradicts to the currently accustomed usage of Connection as a QML component. Maybe when we get a ConnectionManager singleton in Quotient it will be possible to shape the library API in a better way.