[Webkit-unassigned] [Bug 96648] Replace qInstallMsgHandler() with qInstallMessageHandler()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 25 03:00:02 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=96648





--- Comment #3 from Kai Koehne <kai.koehne at nokia.com>  2012-09-25 03:00:30 PST ---
qPrintable(string) 

is actually just a macro that expands to

QString(string).toLocal8Bit().constData() 

The e-mail of qt-interest was about whether the temporary QByteArray created by toLocal8Bit() is guaranteed to be still valid by the time printf(...) is executed, and the answer (at the bottom of the thread) is that it is: It can only be destroyed after the whole statement has executed. So

printf("%s", qPrintable(x));

is okay while

const char * str = qPrintable(x);
printf("%s", str);

isn't.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list