Commit 011a25bd authored by Harald Sitter's avatar Harald Sitter 🏳️‍🌈
Browse files

users: delay result submission

the user change application is blocking (because saving as a whole is
blocking) BUT result submission doesn't need to be and indeed need not
be because the applyjob is running as part of the save() call stack, and
that will set needssave at the very end, effectively undermining any
state management done as part of error handling.

effectively this now means that save() sets needsSave=false and then on
the next event loop run our error handling kicks in and reevaluates
resolvePending on the qml side, potentially setting it true if necessary

BUG: 432111


(cherry picked from commit 9f162e23)
parent d6687be3
Pipeline #235257 passed with stage
in 9 minutes and 55 seconds
......@@ -265,7 +265,7 @@ void User::apply()
break;
case UserApplyJob::Error::NoError:; // Do nothing
}
});
}, Qt::QueuedConnection /* result emission must be async, in the case of failure we'll manipulate states */);
job->start();
}
......
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