Re: [Interest] Why QString and not std::string?

2012-06-16 Thread Alex Strickland
On 2012/06/15 07:26 PM, Charley Bay wrote: (1) Its interface is too minimal (insufficient) (2) Its implementation is limited (3) It does not support real-world-unicode use That's my venting because for over a decade I never understood why people thought std::string was an acceptable

Re: [Interest] Why QString and not std::string?

2012-06-16 Thread Michael Seydl
I'd say one reason is the encoding awareness of QString alone is a good reason. Fiddling around with libicu and alike is a mess. Regarding the int to string thing. Who codes C++ without boost nowadays? boost::lexical_cast ftw. Greetz, Mike On 15.06.2012, at 12:50, Rui Maciel

Re: [Interest] Why QString and not std::string?

2012-06-16 Thread Constantin Makshin
More people than you might think. ;) On 06/16/2012 06:45 PM, Michael Seydl wrote: Who codes C++ without boost nowadays? signature.asc Description: OpenPGP digital signature ___ Interest mailing list Interest@qt-project.org

Re: [Interest] Why QString and not std::string?

2012-06-16 Thread Michael Seydl
When there's no Qt I definitely would use boost. It's header only ... mostly ... very portable and provides everything one could need. Asio, regex, filesystem, spirit ... But that's the Qt mailing list don't wanna make advertisement for another library here. ;) Sent from my iPhone On

Re: [Interest] Why QString and not std::string?

2012-06-16 Thread Michael Seydl
Nobody forces you to. Due to naming conflicts of slots and signals moc including boost can be quite a hassle. What I tried to say is std::string needs enhancement when QString is not available and that one good stable possibility is boost. Personally I used boost::bind and boost::function

Re: [Interest] Why QString and not std::string?

2012-06-16 Thread Boudewijn Rempt
On Saturday 16 June 2012 Jun, Michael Seydl wrote: When there's no Qt I definitely would use boost. It's header only ... mostly ... very portable and provides everything one could need. Asio, regex, filesystem, spirit ... But that's the Qt mailing list don't wanna make advertisement for

Re: [Interest] Why QString and not std::string?

2012-06-16 Thread wargand
I actually don't know anyone directly who codes C++ _with_ boost. I use boost when it is non-graphical stuff and the LGPL is not good enough. Guido ___ Interest mailing list Interest@qt-project.org

[Interest] Why QString and not std::string?

2012-06-15 Thread Rui Maciel
Does anyone know what's the rationale for relying on Qt's custom QString instead of simply using C++'s standard and omnipresent std::string? Thanks in advance, Rui Maciel ___ Interest mailing list Interest@qt-project.org

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread Konstantin Tokarev
15.06.2012, 14:50, Rui Maciel rui.mac...@gmail.com: Does anyone know what's the rationale for relying on Qt's custom QString instead of simply using C++'s standard and omnipresent std::string? 1. Historical reasons - STL was not implemented on the same level in all compilers in the past. 2.

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread Rui Maciel
On 06/15/2012 11:55 AM, Konstantin Tokarev wrote: 1. Historical reasons - STL was not implemented on the same level in all compilers in the past. Is this constraint still relevant today? 2. std::string does not hadle UTF16 strings, and std::wstring is non-standard With C++11, UTF-16

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread Konstantin Tokarev
15.06.2012, 16:12, Constantin Makshin cmaks...@gmail.com: On 06/15/2012 02:55 PM, Konstantin Tokarev wrote:  15.06.2012, 14:50, Rui Maciel rui.mac...@gmail.com:  Does anyone know what's the rationale for relying on Qt's custom QString  instead of simply using C++'s standard and omnipresent

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread Sven Anderson
On 15.06.2012 14:58, Thiago Macieira wrote: On sexta-feira, 15 de junho de 2012 16.12.55, Constantin Makshin wrote: 3. std::string's behavior (e.g. use of the copy-on-write technique) is implementation-dependent while QString is the same everywhere. C++11 bans that. C++11 says that

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread Sven Anderson
On 15.06.2012 14:58, Thiago Macieira wrote: Any one care to give me the Standard Library equivalent of: QString::number(x) string to_string(int) ? Sven ___ Interest mailing list Interest@qt-project.org

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread Konstantin Tokarev
15.06.2012, 16:58, Thiago Macieira thiago.macie...@intel.com: Any one care to give me the Standard Library equivalent of: QString::number(x) static_castostringstream*( (ostringstream() x ) )-str(); -- Regards, Konstantin ___ Interest

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread Giuseppe D'Angelo
On 15 June 2012 14:35, Sven Anderson sven.ander...@snom.com wrote: On 15.06.2012 14:58, Thiago Macieira wrote: Any one care to give me the Standard Library equivalent of:       QString::number(x) string to_string(int) ? No go, C++11 only. -- Giuseppe D'Angelo

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread Giuseppe D'Angelo
On 15 June 2012 15:10, Rui Maciel rui.mac...@gmail.com wrote: On 06/15/2012 02:50 PM, Giuseppe D'Angelo wrote:  string to_string(int) ? No go, C++11 only. But it's standard and it is C++. But (I think) the point was: what should have we used for the last 10-15 years of QString? -- Giuseppe

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread Konstantin Tokarev
15.06.2012, 17:50, Giuseppe D'Angelo dange...@gmail.com: On 15 June 2012 14:35, Sven Anderson sven.ander...@snom.com wrote:  On 15.06.2012 14:58, Thiago Macieira wrote:  Any one care to give me the Standard Library equivalent of:        QString::number(x)  string to_string(int) ? No go,

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread Rui Maciel
On 06/15/2012 12:25 PM, Konstantin Tokarev wrote: 15.06.2012, 15:19, Rui Macielrui.mac...@gmail.com: On 06/15/2012 11:55 AM, Konstantin Tokarev wrote: 1. Historical reasons - STL was not implemented on the same level in all compilers in the past. Is this constraint still relevant

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread Thiago Macieira
On sexta-feira, 15 de junho de 2012 17.46.37, Konstantin Tokarev wrote: 15.06.2012, 16:58, Thiago Macieira thiago.macie...@intel.com: Any one care to give me the Standard Library equivalent of: QString::number(x) static_castostringstream*( (ostringstream() x ) )-str(); Don't

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread Rui Maciel
On 06/15/2012 03:13 PM, Giuseppe D'Angelo wrote: But it's standard and it is C++. But (I think) the point was: what should have we used for the last 10-15 years of QString? I could've been a bit clearer in my initial post, but I intended to know if there was currently any reason that

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread Till Oliver Knoll
[proper recipient] 2012/6/15 Rui Maciel rui.mac...@gmail.com: ... Wouldn't it be better to simply provide an alternative std::string implementation for that specific case? That's what has been done: it's called QString ;) And how relevant is that requirement today? As others have

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread John Layt
On 15 June 2012 15:39, Rui Maciel rui.mac...@gmail.com wrote: On 06/15/2012 03:13 PM, Giuseppe D'Angelo wrote:  But it's standard and it is C++. But (I think) the point was: what should have we used for the last 10-15 years of QString? I could've been a bit clearer in my initial post, but I

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread BRM
From: Till Oliver Knoll till.oliver.kn...@gmail.com 2012/6/15 Rui Maciel rui.mac...@gmail.com: Nevertheless, why is it important to support UTF-16? 1. Faster string search modification than for UTF8 2. It's native UTF string format on Windows and Mac OS X. How relevant is the efficiency of

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread Helbrass
On Fri, 15 Jun 2012 17:39:06 +0300, Rui Maciel rui.mac...@gmail.com wrote: On 06/15/2012 03:13 PM, Giuseppe D'Angelo wrote: But it's standard and it is C++. But (I think) the point was: what should have we used for the last 10-15 years of QString? I could've been a bit clearer in my

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread Charley Bay
But it's standard and it is C++. But (I think) the point was: what should have we used for the last 10-15 years of QString? I could've been a bit clearer in my initial post, but I intended to know if there was currently any reason that justified having QString around instead of

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread Konstantin Tokarev
15.06.2012, 21:26, Charley Bay charleyb...@gmail.com: That's my venting because for over a decade I never understood why people thought std::string was an acceptable component.  IMHO it's absolutely useless.  And dangerous.  I don't care if I'm the only one on the planet with my

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread Jonas Gehring
On 6/15/12 10:18 AM, Konstantin Tokarev wrote: 15.06.2012, 17:50, Giuseppe D'Angelo dange...@gmail.com: On 15 June 2012 14:35, Sven Anderson sven.ander...@snom.com wrote: On 15.06.2012 14:58, Thiago Macieira wrote: Any one care to give me the Standard Library equivalent of:

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread 3dw4rd
I know C+11 is not available everywhere but they did work on lexical casting:string to_string(int val);string to_string(unsigned val);string to_string(long val);string to_string(unsigned long val);string to_string(long long val);string to_string(unsigned long long val);string to_string(float

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread André Pönitz
On Fri, Jun 15, 2012 at 11:50:47AM +0100, Rui Maciel wrote: Does anyone know what's the rationale for relying on Qt's custom QString instead of simply using C++'s standard and omnipresent std::string? std::string is closer to QByteArray than to QString, so you are probably not asking the

Re: [Interest] Why QString and not std::string?

2012-06-15 Thread Thiago Macieira
On sexta-feira, 15 de junho de 2012 14.31.26, 3dw...@verizon.net wrote: Hereaps;s hoping the upgrade at least the standard library a LOT faster going forward.br /br //div Great! Now maybe in C++15 or 16 we'll be able to convert strings from the local 8-bit codec to Unicode without using