Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-10-08 Thread Edward Welbourne
> On Friday, 5 October 2018 08:35:10 PDT Thiago Macieira wrote: >>> Cons: >>> Suppresses move construction as in >>>QCborValue v = array[n]; >>> this still compiles, but passes through the copy constructor, not >>> the move one. We cana add an extra move constructor for const >>> QCborValue &&

Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-10-07 Thread Lars Knoll
> On 6 Oct 2018, at 00:47, Thiago Macieira wrote: > > On Friday, 5 October 2018 08:35:10 PDT Thiago Macieira wrote: >> Cons: >> Suppresses move construction as in >>QCborValue v = array[n]; >> this still compiles, but passes through the copy constructor, not the move >> one. We cana add an

Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-10-05 Thread Thiago Macieira
On Friday, 5 October 2018 08:35:10 PDT Thiago Macieira wrote: > Cons: > Suppresses move construction as in > QCborValue v = array[n]; > this still compiles, but passes through the copy constructor, not the move > one. We cana add an extra move constructor for const QCborValue && if > necessary

Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-10-05 Thread Edward Welbourne
Thiago Macieira (5 October 2018 17:35) asked me: > Eddy: what happens in the new API if you write: > const QCborArray array = { QCborArray{ 1 } }; > QCborValue v = array[0]; > v[0] = 2; > > Does that modify array? No. It should only modify what v[0] reports, or a v.toArray()[0] reports, aft

Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-10-05 Thread Thiago Macieira
On Friday, 5 October 2018 04:25:05 PDT Edward Welbourne wrote: > dev (5.13): > QCborValue{Ref,}::operator[] added where missing > https://codereview.qt-project.org/240042 > > The first's const-ing and the second's padding are needed in 5.12 to let > the last be backwards-compatible, when it lands.

Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-10-05 Thread Edward Welbourne
On Sunday, 9 September 2018 04:16:24 PDT Tor Arne Vestbø wrote: >> This is exactly the kind of stuff I brought up at the contributors >> summit. We should strive to at least be on par with QJson, but I’m >> hoping we can also have a nice API for writing (something QJson >> doesn’t easily facilitat

Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-09-09 Thread Thiago Macieira
On Sunday, 9 September 2018 04:16:24 PDT Tor Arne Vestbø wrote: > This is exactly the kind of stuff I brought up at the contributors summit. > We should strive to at least be on par with QJson, but I’m hoping we can > also have a nice API for writing (something QJson doesn’t easily > facilitate). A

Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-09-09 Thread Thiago Macieira
On Sunday, 9 September 2018 03:25:54 PDT Sze Howe Koh wrote: > Hi Thiago, > > Any chance you can give it a go? Or someone else? > > I've installed the Qt 5.12 alpha for MSVC 2015 and started playing > with the CBOR API. > > map["hello"] = foo; // ERROR C2593: Operator '[' is ambiguous That's

Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-09-09 Thread Tor Arne Vestbø
> On 9 Sep 2018, at 12:25, Sze Howe Koh wrote: > > Hi Thiago, > > On Sat, 18 Aug 2018 at 01:51, Thiago Macieira > wrote: >> >> On Friday, 17 August 2018 08:13:21 PDT Tor Arne Vestbø wrote: Now, looking at the code, I don't think it does work. I thought that QCborValue::operator[]

Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-09-09 Thread Sze Howe Koh
Hi Thiago, On Sat, 18 Aug 2018 at 01:51, Thiago Macieira wrote: > > On Friday, 17 August 2018 08:13:21 PDT Tor Arne Vestbø wrote: > > > Now, looking at the code, I don't think it does work. I thought that > > > QCborValue::operator[] returned QCborValueRefs, but it doesn't. Adding a > > > set of

Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-08-22 Thread Mikhail Svetkin
Yes, this library is very cool and requires only c++11. Best regards, Mikhail On Wed, 22 Aug 2018 at 16:47, Tor Arne Vestbø wrote: > On 17 Aug 2018, at 17:08, Thiago Macieira > wrote: > > > > On Friday, 17 August 2018 02:50:32 PDT Tor Arne Vestbø wrote: > >>> Unless someone can volunteer to t

Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-08-22 Thread Tor Arne Vestbø
On 17 Aug 2018, at 17:08, Thiago Macieira wrote: > > On Friday, 17 August 2018 02:50:32 PDT Tor Arne Vestbø wrote: >>> Unless someone can volunteer to test. I *think* my design is slightly >>> better than QJsonValue, so the following should work: >>> >>> value[1]["hello"][32] = false; >> >> Tha

Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-08-20 Thread Arnaud Clère
rpedoes" unless I am sure they are targeting the right thing 😊 Cheers, Arnaud -Original Message- From: Thiago Macieira Sent: jeudi 16 août 2018 22:11 To: development@qt-project.org Subject: Re: [Development] unified data model API in QtCore => thin wrapper proposal On Wednes

Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-08-17 Thread Thiago Macieira
On Friday, 17 August 2018 08:13:21 PDT Tor Arne Vestbø wrote: > > Now, looking at the code, I don't think it does work. I thought that > > QCborValue::operator[] returned QCborValueRefs, but it doesn't. Adding a > > set of non-const overloads returning QCborValueRef might be the trick. > That would

Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-08-17 Thread Tor Arne Vestbø
> On 17 Aug 2018, at 17:08, Thiago Macieira wrote: > > On Friday, 17 August 2018 02:50:32 PDT Tor Arne Vestbø wrote: >>> Unless someone can volunteer to test. I *think* my design is slightly >>> better than QJsonValue, so the following should work: >>> >>> value[1]["hello"][32] = false; >> >>

Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-08-17 Thread Thiago Macieira
On Friday, 17 August 2018 02:50:32 PDT Tor Arne Vestbø wrote: > > Unless someone can volunteer to test. I *think* my design is slightly > > better than QJsonValue, so the following should work: > > > > value[1]["hello"][32] = false; > > That’s great news. I assume it’s also easy to convert from a

Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-08-17 Thread Tor Arne Vestbø
> On 16 Aug 2018, at 22:11, Thiago Macieira wrote: > > On Wednesday, 20 June 2018 06:05:35 PDT Arnaud Clère wrote: >> Hi, >> Thiago, did you decide on something regarding QCborValue in Qt5.12? > > Hello Arnaud, all > > No, I have not. I have not had the time to read your email yet and nor hav

Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-08-16 Thread Thiago Macieira
On Wednesday, 20 June 2018 06:05:35 PDT Arnaud Clère wrote: > Hi, > Thiago, did you decide on something regarding QCborValue in Qt5.12? Hello Arnaud, all No, I have not. I have not had the time to read your email yet and nor have I had time to even test if the API I designed does what we discuss

Re: [Development] unified data model API in QtCore => thin wrapper proposal

2018-06-20 Thread Arnaud Clère
Hi, Thiago, did you decide on something regarding QCborValue in Qt5.12? For structured traces, we have to deal with any user-defined data types so, we can do with QCborValue, QJsonValue or QFoo too. Now, the value of exposing the common backend of QJson and QCbor as a QFoo binary format is not c