Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.2.0
-
None
-
3
-
f8dba0395 (dev)
-
Foundation Sprint 78
Description
The following code fails to compile:
struct MyClass { QString strValue; int intValue = 0; }; void foo() { QPromise<MyClass> myPromise; myPromise.addResult({"bar", 1}); }
The error is:
error: no matching function for call to ‘QPromise<MyClass>::addResult(<brace-enclosed initializer list>)’ In member function ‘void foo()’: error: no matching function for call to ‘QPromise<MyClass>::addResult(<brace-enclosed initializer list>)’ | myPromise.addResult({"foo", 1}); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
I'm forced to do:
myPromise.addResult(MyClass{"bar", 1});
what shouldn't be really necessary.
Attachments
Issue Links
- relates to
-
QTBUG-112270 QPromise: support emplacement
- Closed
For Gerrit Dashboard: QTBUG-111826 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
468804,3 | QPromise: add support for addResult(braced-initializer) | dev | qt/qtbase | Status: MERGED | +2 | 0 |