Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.4.0
-
None
-
Linux Mint 21
-
-
3
-
502a7706b (dev), 2e1025dd4 (6.5)
-
Foundation Sprint 77, Foundation Sprint 78
Description
I'm not 100% if this is a bug as the documentation is a bit unclear, but in the following example I expected to get both callbacks instead of only the second one. If this is intended behavior, perhaps the second then() should print a warning that it is overwriting the old one.
QPromise<int> p; QFuture<int> f1 = p.future(); f1.then([](int i) { printf("first\n"); }); QFuture<int> f2 = p.future(); f2.then([](int i) { printf("second\n"); }); p.start(); p.addResult(5); p.finish();