Re: [Development] QStringLiteral vs QLatin1String , foreach vs for range

2016-01-17 Thread Gunnar Roth
Hi, thanks for answering, but > Am 17.01.2016 um 20:36 schrieb Thiago Macieira : > > On Sunday 17 January 2016 19:13:44 Gunnar Roth wrote: >> Hi, >> I saw quite some changes like https://codereview.qt-project.org/#/c/145961/ >>

[Development] QStringLiteral vs QLatin1String , foreach vs for range

2016-01-17 Thread Gunnar Roth
Hi, I saw quite some changes like https://codereview.qt-project.org/#/c/145961/ Replace QStringLiteral with QLatin1String in QFileSelector. I also read about the problem of QStringLiteral concerning plugins, but what is the idea behind these

Re: [Development] QStringLiteral vs QLatin1String , foreach vs for range

2016-01-17 Thread Thiago Macieira
On Sunday 17 January 2016 19:13:44 Gunnar Roth wrote: > Hi, > I saw quite some changes like https://codereview.qt-project.org/#/c/145961/ > Replace QStringLiteral > with QLatin1String in QFileSelector. I also read about the problem of >

Re: [Development] QStringLiteral vs QLatin1String , foreach vs for range

2016-01-17 Thread Thiago Macieira
On Sunday 17 January 2016 19:31:54 Olivier Goffart wrote: > As explained here: https://woboq.com/blog/qstringliteral.html > QStringLiteral can avoid malloc and conversion to QString. But there is an > operator==(const QString&,QLatin1String) which also don't do allocations or > conversion. In

Re: [Development] QStringLiteral vs QLatin1String , foreach vs for range

2016-01-17 Thread Olivier Goffart
On Sonntag, 17. Januar 2016 19:13:44 CET Gunnar Roth wrote: > Hi, > I saw quite some changes like https://codereview.qt-project.org/#/c/145961/ > Replace QStringLiteral with QLatin1String in QFileSelector. I also read > about the problem of QStringLiteral concerning plugins, but what is the idea >

Re: [Development] QStringLiteral vs QLatin1String , foreach vs for range

2016-01-17 Thread Thiago Macieira
On Sunday 17 January 2016 22:22:39 Gunnar Roth wrote: > why is QLatin1String more efficient than QLiteralString in this case? both > strings being uft16 seems to be faster for, you could use size_t chunks > for comparison for example. Your premise is wrong. The QLatin1String is not stored as

Re: [Development] Question about QCoreApplicationData::*_libpaths

2016-01-17 Thread Mathias Hasselmann
Am 16.01.2016 um 01:29 schrieb Kevin Kofler: Now, what *I* find "simply *not acceptable*" is that "a seemingly innocuous piece of code like": std::vector foo1 = …; std::vector foo2 = foo1; // <- here "leads to a memory allocation, nay, a complete deep copy of the container". This is

Re: [Development] Question about QCoreApplicationData::*_libpaths

2016-01-17 Thread Marc Mutz
On Saturday 16 January 2016 01:29:40 Kevin Kofler wrote: > Now, what I find "simply *not acceptable*" is that "a seemingly innocuous > piece of code like": > std::vector foo1 = …; > std::vector foo2 = foo1; // <- here > "leads to a memory allocation, nay, a complete deep copy of the > container".