Commit b5a581d9 authored by Fabian Vogt's avatar Fabian Vogt
Browse files

AccountManager: Don't keep finished promises in the cache

AccountPromises are destroyed one event loop cycle after they finished().
They won't emit finished() again, so they can't be used.
parent 2e5e996d
......@@ -134,7 +134,7 @@ public:
auto promise = mPendingPromises.value(key, nullptr);
if (!promise) {
promise = new AccountPromise(q);
QObject::connect(promise, &QObject::destroyed, q, [key, this]() {
QObject::connect(promise, &AccountPromise::finished, q, [key, this]() {
mPendingPromises.insert(key, promise);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment