On 2010-04-20 01:35, Anderson Lizardo wrote:
On Mon, Apr 19, 2010 at 4:53 PM, Thomas Berg<[email protected]> wrote:I found I had to comment out line 174 in reporthandler.cpp in apiextractor, to work around a crash: va_start(argp, str); //vsnprintf(m_progressBuffer, sizeof(m_progressBuffer), msg.toLocal8Bit().constData(), argp); va_end(argp); I did not look anymore into this crash, as I wanted to see how far I could get with the rest of the build.Hugo: isn't this related to the fact that msg.toLocal8Bit() returnes a QByteArray that needs to be kept in some intermediary variable so that constData() remains valid?
Nope, that works as the const char* is valid on that line. All temporary returned vars are guaranteed to stay alive until end-of-statement.
See: http://www.qtcentre.org/threads/26417-Converting-QString-to-char*-in-onl-line
Here the const char* tries to outlive the line that it's created on. That does not work.
Cheers, /Marcus _______________________________________________ PySide mailing list [email protected] http://lists.openbossa.org/listinfo/pyside
