| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 4 | |
I'm not getting any automatic char * to QString conversion, but AFAICS that only happens when Qt has been compiled with QT_NO_CAST_FROM_ASCII. I didn't specifically switch this on, so I'm guessing that it's done automatically (with Qt 4.3.2 at least) - why is that ? The docs imply that it is *not* defined by default. -- [ signature omitted ]
Stephen Collyer wrote: >I'm not getting any automatic char * to QString conversion, >but AFAICS that only happens when Qt has been compiled with >QT_NO_CAST_FROM_ASCII. > >I didn't specifically switch this on, so I'm guessing that >it's done automatically (with Qt 4.3.2 at least) - why is >that ? The docs imply that it is *not* defined by default. It's not, except inside the Qt build itself. What's the error you're getting? -- [ signature omitted ]
Attachment:
signature.asc
Description: This is a digitally signed message part.
Thiago Macieira wrote: > Stephen Collyer wrote: >> I'm not getting any automatic char * to QString conversion, >> but AFAICS that only happens when Qt has been compiled with >> QT_NO_CAST_FROM_ASCII. >> >> I didn't specifically switch this on, so I'm guessing that >> it's done automatically (with Qt 4.3.2 at least) - why is >> that ? The docs imply that it is *not* defined by default. > > It's not, except inside the Qt build itself. > > What's the error you're getting? Whatever was causing the problem, it's disappeared now and I can't reproduce it. I had a method taking a QString where g++ wouldn't accept a char* - I had to construct a temp QString to get it to compile, but I've gone back to look at the problem again, and it seems to have magically disappeared. I have no idea what was going on but I'll assume it was something I did unless it reoccurs. -- [ signature omitted ]
Stephen Collyer wrote: > I'm not getting any automatic char * to QString conversion, > but AFAICS that only happens when Qt has been compiled with > QT_NO_CAST_FROM_ASCII. > > I didn't specifically switch this on, so I'm guessing that > it's done automatically (with Qt 4.3.2 at least) - why is > that ? The docs imply that it is *not* defined by default. > > I have noticed that, too, since I switched to Qt4. You can, however, use QString::toAscii()::constData() if you want to get a pointer to a C-String. -- [ signature omitted ]