Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-31 Thread Thiago Macieira
On Friday 31 July 2015 10:34:50 Knoll Lars wrote: > On 31/07/15 10:15, "Thiago Macieira" wrote: > [snip] > > >I will try to submit a patch tomorrow. > > Thanks Thiago! Done. Change: https://codereview.qt-project.org/122598 Doc update: https://codereview.qt-project.org/121992 -- Thiago Maciei

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-31 Thread Thiago Macieira
On Friday 31 July 2015 10:34:50 Knoll Lars wrote: > On 31/07/15 10:15, "Thiago Macieira" wrote: > [snip] > > >I will try to submit a patch tomorrow. > > Thanks Thiago! Without changing QtTest. That is, I'd like to keep the QString escaping in QtTest exactly as it is today. -- Thiago Macieira

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-31 Thread Knoll Lars
Agree with Thiago. Backslash is a good escape character, as it’s used in pretty much all programming languages for that. If you want unescaped paths, you can use noquote, or print the paths using slashes (using QDir::fromNativeSeparators()). Cheers, Lars On 31/07/15 10:23, "Thiago Macieira" wrot

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-31 Thread Knoll Lars
On 31/07/15 10:15, "Thiago Macieira" wrote: [snip] >I will try to submit a patch tomorrow. Thanks Thiago! Cheers, Lars ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-31 Thread Thiago Macieira
On Friday 31 July 2015 09:29:36 André Somers wrote: > Does it? The output is not aimed at being C++ again. So, why is is > needed that the backslash is always escaped? Would it be possible to > only escape \ if it is followed by 0x in the actual string, and then > make escaped characters print a

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-31 Thread Thiago Macieira
On Friday 31 July 2015 07:20:00 Knoll Lars wrote: > >1) qDebug for QStrings should > > > > a) escape everything non-US-ASCII (5.5.0 behaviour) > > b) escape everything that isn't QChar::isPrint > > c) escape only US-ASCII control characters (0 to 31), backslash and > > > >quote > > > > d) escap

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-31 Thread André Somers
Op 31-7-2015 om 09:20 schreef Knoll Lars: > > Anything except 1e will still change "C:\Users" to "C:\\Users" in the > output, > which was one of the complaints listed. > Yes, but this is unavoidable. We need to escape non printable characters > and quote, and this implies we also need to escape the

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-31 Thread Knoll Lars
On 28/07/15 21:24, "Thiago Macieira" wrote: >On Tuesday 28 July 2015 21:58:08 NIkolai Marchenko wrote: >> Fact is : you are severly overestimating the amount of cases where >> homoglyph is a problem at the same time severly underestimating the >>amount >> of code you broke and inconvenience cause

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-29 Thread Olivier Goffart
On Tuesday 28. July 2015 12:24:16 Thiago Macieira wrote: > I don't think I am underestimating the annoyance to those people nor that I > am overestimating the benefit. You have also take into account that a great > majority of source code is written in English and for those cases this > feature is

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-28 Thread Thiago Macieira
On Tuesday 28 July 2015 21:58:08 NIkolai Marchenko wrote: > Fact is : you are severly overestimating the amount of cases where > homoglyph is a problem at the same time severly underestimating the amount > of code you broke and inconvenience caused by the change. > The amount of people that has sin

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-28 Thread NIkolai Marchenko
Fact is : you are severly overestimating the amount of cases where homoglyph is a problem at the same time severly underestimating the amount of code you broke and inconvenience caused by the change. The amount of people that has since agreed with my point of view in this thread is a testament to t

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-28 Thread Thiago Macieira
On Tuesday 28 July 2015 09:28:08 Olivier Goffart wrote: > qDebug() << "There was an error processing XYZ: " << job->errorString(); > qDebug() << "Error parsing file: " << fileName; > qDebug() << "User entered: " << searchLineEdit->text(); > > Imagine that in a app written in russian for russ

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-28 Thread Robert Griebl
On 28.07.2015 09:28, Olivier Goffart wrote: > On Monday 27. July 2015 10:03:25 Thiago Macieira wrote: >> The whole thinking is that the use of operator<< for QString implies you're >> trying to figure out why that string is the way it is, as opposed to trying >> to convey a message. > > I think tha

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-28 Thread Sze Howe Koh
On 28 July 2015 at 15:28, Olivier Goffart wrote: > On Monday 27. July 2015 10:03:25 Thiago Macieira wrote: >> The whole thinking is that the use of operator<< for QString implies you're >> trying to figure out why that string is the way it is, as opposed to trying >> to convey a message. > > I thi

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-28 Thread Olivier Goffart
On Tuesday 28. July 2015 11:47:09 Tasuku Suzuki wrote: > Hi Thiago, > > 2015-07-28 1:34 GMT+09:00 Thiago Macieira : > > On Monday 27 July 2015 19:27:44 NIkolai Marchenko wrote: > >> > Or just use qPrintable() around your strings. > >> > >> you do realize, that it will require editing thousands of

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-28 Thread Olivier Goffart
On Monday 27. July 2015 10:03:25 Thiago Macieira wrote: > The whole thinking is that the use of operator<< for QString implies you're > trying to figure out why that string is the way it is, as opposed to trying > to convey a message. I think that's where the disagreement is. I would think the u

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-27 Thread Andre Somers
On 27-7-2015 18:13, Thiago Macieira wrote: > On Monday 27 July 2015 08:44:30 Knoll Lars wrote: >> I can understand the issues that non latin speakers are facing with this >> well. I’ve often used qDebug() to debug non latin use cases, and in 90% of >> the cases I just want to know what the string r

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-27 Thread Tasuku Suzuki
Hi Thiago, 2015-07-28 1:34 GMT+09:00 Thiago Macieira : > On Monday 27 July 2015 19:27:44 NIkolai Marchenko wrote: >> > Or just use qPrintable() around your strings. >> >> you do realize, that it will require editing thousands of instances of >> qDebug in the old code? > > Yes. grepped "QDebug\s*&

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-27 Thread NIkolai Marchenko
Ok, let's try another line of inquiry I just thought of : Since when debuggin with qDebug requires external unicode converter, not provided with Qt? Surely you realize that without an access to one, the output will not be helpful to ANYONE ? And while we're at it: let's say we are debugging applic

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-27 Thread Thiago Macieira
On Monday 27 July 2015 16:54:49 Knoll Lars wrote: > QChar::isPrint() is not that expensive, and this is about debug output. Your > code escaping all these chars is a more expensive if it gets hit. I don't think so. The code is pretty efficient and it's just a simple stateful loop. QChar::isPrint

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-27 Thread Thiago Macieira
On Monday 27 July 2015 16:57:23 Knoll Lars wrote: > On 27/07/15 18:52, "development-bounces+lars.knoll=theqtcompany.com@qt- project.org on behalf of Thiago Macieira" wrote: > >On Monday 27 July 2015 19:49:15 NIkolai Marchenko wrote: > >> If we are to believe Thiago, every developer that needs to s

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-27 Thread Knoll Lars
On 27/07/15 18:52, "development-bounces+lars.knoll=theqtcompany@qt-project.org on behalf of Thiago Macieira" wrote: >On Monday 27 July 2015 19:49:15 NIkolai Marchenko wrote: >> If we are to believe Thiago, every developer that needs to see trace >> information from an old code, now needs

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-27 Thread Knoll Lars
On 27/07/15 18:13, "development-bounces+lars.knoll=theqtcompany@qt-project.org on behalf of Thiago Macieira" wrote: >On Monday 27 July 2015 08:44:30 Knoll Lars wrote: >> I can understand the issues that non latin speakers are facing with this >> well. I’ve often used qDebug() to debug non

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-27 Thread Thiago Macieira
On Monday 27 July 2015 19:49:15 NIkolai Marchenko wrote: > If we are to believe Thiago, every developer that needs to see trace > information from an old code, now needs to edit all of his qDebug()'ed > instances to use qPrintable. Yes, all of them. However much there is, > manually, one by one. Y

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-27 Thread NIkolai Marchenko
If we are to believe Thiago, every developer that needs to see trace information from an old code, now needs to edit all of his qDebug()'ed instances to use qPrintable. Yes, all of them. However much there is, manually, one by one. On Mon, Jul 27, 2015 at 7:34 PM, Thiago Macieira wrote: > On Mon

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-27 Thread NIkolai Marchenko
> you do realize, that it will require editing thousands of instances of > qDebug in the old code? > Yes. And here, ladies and gentlemen, is exactly the reason this discussion is even happening. This.Should. Not. Be. The. Case. This is just wrong on so many levels I cannot express it in words.

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-27 Thread Thiago Macieira
On Monday 27 July 2015 19:27:44 NIkolai Marchenko wrote: > > Or just use qPrintable() around your strings. > > you do realize, that it will require editing thousands of instances of > qDebug in the old code? Yes. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Op

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-27 Thread NIkolai Marchenko
Not to mention, this is cumbersome to the extreme. On Mon, Jul 27, 2015 at 7:26 PM, Thiago Macieira wrote: > On Monday 27 July 2015 19:20:34 NIkolai Marchenko wrote: > > b) getting the old behaviour "back" requires using "noquote" everywhere > > which breaks the code if you need to build it with

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-27 Thread NIkolai Marchenko
> Or just use qPrintable() around your strings. you do realize, that it will require editing thousands of instances of qDebug in the old code? On Mon, Jul 27, 2015 at 7:26 PM, Thiago Macieira wrote: > On Monday 27 July 2015 19:20:34 NIkolai Marchenko wrote: > > b) getting the old behaviour "bac

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-27 Thread Thiago Macieira
On Monday 27 July 2015 19:20:34 NIkolai Marchenko wrote: > b) getting the old behaviour "back" requires using "noquote" everywhere > which breaks the code if you need to build it with earlier qt version Or just use qPrintable() around your strings. -- Thiago Macieira - thiago.macieira (AT) intel.

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-27 Thread NIkolai Marchenko
> I'm ok with a flag, as long as it's the default. I am ok with a flag too. As long as escaping can be turned off, preferably in one place instead of editing qDebug()'s everywhere it is ok. I am so vehemently against the change as it is now primarily because it a) cannot be contained in a simple #i

Re: [Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-27 Thread Thiago Macieira
On Monday 27 July 2015 08:44:30 Knoll Lars wrote: > I can understand the issues that non latin speakers are facing with this > well. I’ve often used qDebug() to debug non latin use cases, and in 90% of > the cases I just want to know what the string reads. The unicode content > of it is interesting

[Development] FW: Backwards compatibiltiy break in Qt 5.5

2015-07-27 Thread Knoll Lars
Hi, I can understand the issues that non latin speakers are facing with this well. I’ve often used qDebug() to debug non latin use cases, and in 90% of the cases I just want to know what the string reads. The unicode content of it is interesting to me in only 10% of the cases. For most users not d