Re: [Interest] move methods in QList

2017-10-11 Thread Elvis Stansvik
2017-10-12 3:03 GMT+02:00 Thiago Macieira : > On quarta-feira, 11 de outubro de 2017 14:01:41 PDT Elvis Stansvik wrote: >> > A possible answer is on the same slide: >> > "QList might simply become a typedef for QVector" >> >> Ah right, that's true. >> >> Thiago, was that alternative discussed durin

Re: [Interest] move methods in QList

2017-10-11 Thread Thiago Macieira
On quarta-feira, 11 de outubro de 2017 14:01:41 PDT Elvis Stansvik wrote: > > A possible answer is on the same slide: > > "QList might simply become a typedef for QVector" > > Ah right, that's true. > > Thiago, was that alternative discussed during the Developer Days? Yes. See the notes and the

Re: [Interest] move methods in QList

2017-10-11 Thread Roland Hughes
Elvis, Here are some pearls of wisdom (or freshly polished t...s) depending on your opinion of them and myself. It is some rules of thumb I've developed over the past 30+ years in IT on numerous platforms with countless tool sets. 1) If you cannot immerse yourself completely in it and still

Re: [Interest] move methods in QList

2017-10-11 Thread Philippe
On Wed, 11 Oct 2017 22:32:49 +0200 Elvis Stansvik wrote: > Could others chime in here. If you were to start a project today, what > focus would you have wrt to containers? Would you do your utmost to > stay with std containers? Strive to use Qt containers, but avoid QList > as much as possible? O

Re: [Interest] move methods in QList

2017-10-11 Thread Elvis Stansvik
2017-10-11 22:54 GMT+02:00 Philippe : > On Wed, 11 Oct 2017 22:32:49 +0200 > Elvis Stansvik wrote: > >> Another thing for you Qt devs: Qt's APIs are littered with QList. >> Guiseppe mention in his slides that it's out of the question to change >> that for Qt 6, because it would be such a big API b

Re: [Interest] move methods in QList

2017-10-11 Thread Philippe
On Wed, 11 Oct 2017 22:32:49 +0200 Elvis Stansvik wrote: > Another thing for you Qt devs: Qt's APIs are littered with QList. > Guiseppe mention in his slides that it's out of the question to change > that for Qt 6, because it would be such a big API break. But, when > should such a change be made

Re: [Interest] move methods in QList

2017-10-11 Thread Elvis Stansvik
2017-10-11 21:08 GMT+02:00 Thiago Macieira : > On terça-feira, 10 de outubro de 2017 14:31:05 PDT Christian Gagneraud wrote: >> It's full of interesting information, like: >> - Don't use Qt container, unless you have to >> - Do not use QList, prefer QVector. > > And I complained to him right afterw

Re: [Interest] move methods in QList

2017-10-11 Thread Thiago Macieira
On terça-feira, 10 de outubro de 2017 14:31:05 PDT Christian Gagneraud wrote: > It's full of interesting information, like: > - Don't use Qt container, unless you have to > - Do not use QList, prefer QVector. And I complained to him right afterwards. The advice should be: - do use the Qt Contain

Re: [Interest] move methods in QList

2017-10-10 Thread Christian Gagneraud
On 10 October 2017 at 19:45, Hamish Moffatt wrote: > I'm interested in storing a big structure in QList, and I would like to move > it to the list, but unlike std::list QList does not seem to have > push_back(T&&), insert(..., T&&) etc. > > Should I use std::list instead? Or use a QList of pointer

Re: [Interest] move methods in QList

2017-10-10 Thread Roland Hughes
http://doc.qt.io/qt-5/qlist-members.html * *push_back *(const T &) * *push_front *(const T &) * *insert *(int , const T &) * *insert

Re: [Interest] move methods in QList

2017-10-10 Thread André Somers
std::list cannot be compared to QList, and likely neither data structure is what you are looking for. QList should, IMO, not be used for new code if it can be avoided, and is certainly not suitable for using with anying Big. With big as in: bigger than size of a pointer. And linked-lists like std::

Re: [Interest] move methods in QList

2017-10-10 Thread Andrew Ialacci
I personally favor QVector and use it instead of QList. There are times though when you must use a QList because some class or function requires it. For example many of the Qt JSON classes deal with QLists instead of QVectors. Take a read over this thread from SO: https://stackoverflow.com/que

Re: [Interest] move methods in QList

2017-10-10 Thread Michael Corcoran
: Interest on behalf of Hamish Moffatt Sent: Tuesday, 10 October 2017 7:45 p.m. To: interest@qt-project.org Subject: [Interest] move methods in QList I'm interested in storing a big structure in QList, and I would like to move it to the list, but unlike std::list QList does not seem to have pu

[Interest] move methods in QList

2017-10-09 Thread Hamish Moffatt
I'm interested in storing a big structure in QList, and I would like to move it to the list, but unlike std::list QList does not seem to have push_back(T&&), insert(..., T&&) etc. Should I use std::list instead? Or use a QList of pointers (eg QSharedPointer) to my structure? Or construct a def