Commit 3ba72d0e authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Stabilized the QString debug dumper a bit on Windows.



Try to prevent dumper crashes on
unitialized variables that slow down the debugger.
Acked-by: default avatarhjk <qtc-committer@nokia.com>
parent 65a179da
......@@ -1995,10 +1995,15 @@ static void qDumpQString(QDumper &d)
{
const QString &str = *reinterpret_cast<const QString *>(d.data);
if (!str.isEmpty()) {
qCheckAccess(str.unicode());
if (!str.unicode()[str.size()].isNull()) // must be '\0' terminated
qCheckAccess(0);
const int size = str.size();
if (size < 0)
return;
if (size) {
const QChar *unicode = str.unicode();
qCheckAccess(unicode);
qCheckAccess(unicode + size);
if (!unicode[size].isNull()) // must be '\0' terminated
return;
}
P(d, "value", str);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment