cscarney / syndic

Convergent feed reader for Plasma and Android
12 stars 2 forks source link

Replace hand-rolled Future implementation with QPromise/QFuture #148

Closed cscarney closed 1 year ago

cscarney commented 1 year ago

We were previously using a QObject class to represent async operations, but Qt6 has QPromise, which does everything our implementation did and more, without the overhead of a new QObject and a signal/slot connection for every operation. It's also better tested code that we don't have to maintain.

This touches a lot of code, but it's mostly just a find-and-replace job.

Note that future.h contains some new convenience functions that mimic the behavior of our old Future class. These are there to avoid having to refactor every existing consumer, but they should probably be avoided in new code.