Commit 9772ab99 authored by hjk's avatar hjk
Browse files

Fixes: debugger: revert change from " to ' style quoting

    Details:  ' was used interanlly sometimes
parent 4b9f4078
......@@ -109,7 +109,7 @@ int qtGhVersion = QT_VERSION;
'P(d, name, value)' roughly expands to:
d << (name) << "='" << value << "'";
d << (name) << "=\"" << value << "\"";
Useful (i.e. understood by the IDE) names include:
......@@ -551,7 +551,7 @@ void QDumper::addCommaIfNeeded()
if (pos == 0)
return;
char c = qDumpOutBuffer[pos - 1];
if (c == '}' || c == '\'' || c == ']')
if (c == '}' || c == '"' || c == ']')
put(',');
}
......@@ -630,7 +630,7 @@ void QDumper::endHash()
void QDumper::putEllipsis()
{
addCommaIfNeeded();
*this << "{name='<incomplete>',value='',type='" << innertype << "'}";
*this << "{name=\"<incomplete>\",value=\"\",type=\"" << innertype << "\"}";
}
//
......@@ -642,7 +642,7 @@ void QDumper::putEllipsis()
#define P(dumper,name,value) \
do { \
dumper.addCommaIfNeeded(); \
dumper << (name) << "='" << value << "'"; \
dumper << (name) << "=\"" << value << '"'; \
} while (0)
// simple string property
......@@ -740,7 +740,7 @@ static void qDumpInnerValueHelper(QDumper &d, const char *type, const void *addr
return;
case 'B':
if (isEqual(type, "QByteArray")) {
d << key << "encoded='1',";
d << key << "encoded=\"1\",";
P(d, key, *(QByteArray*)addr);
}
return;
......@@ -769,7 +769,7 @@ static void qDumpInnerValueHelper(QDumper &d, const char *type, const void *addr
return;
case 'S':
if (isEqual(type, "QString")) {
d << key << "encoded='1',";
d << key << "encoded=\"1\",";
P(d, key, *(QString*)addr);
}
return;
......@@ -2008,7 +2008,7 @@ static void qDumpQVariantHelper(const void *data, QString *value,
*numchild = 0;
break;
case QVariant::String:
*value = QLatin1Char('\'') + v.toString() + QLatin1Char('\'');
*value = QLatin1Char('"') + v.toString() + QLatin1Char('"');
*numchild = 0;
break;
case QVariant::StringList:
......@@ -2240,9 +2240,9 @@ static void qDumpStdString(QDumper &d)
qCheckAccess(str.c_str() + str.size() - 1);
}
d << ",value='";
d << ",value=\"";
d.putBase64Encoded(str.c_str(), str.size());
d << "'";
d << "\"";
P(d, "valueencoded", "1");
P(d, "type", "std::string");
P(d, "numchild", "0");
......
......@@ -145,14 +145,33 @@ void testQByteArray()
void testQHash()
{
#if 0
QHash<int, float> hgg0;
hgg0[11] = 11.0;
hgg0[22] = 22.0;
hgg0[22] = 22.0;
hgg0[22] = 22.0;
hgg0[22] = 22.0;
hgg0[22] = 22.0;
hgg0[22] = 22.0;
#endif
#if 1
QHash<QString, float> hgg1;
hgg1["22.0"] = 22.0;
hgg1["23.0"] = 22.0;
hgg1["24.0"] = 22.0;
hgg1["25.0"] = 22.0;
hgg1["26.0"] = 22.0;
hgg1["27.0"] = 27.0;
hgg1["28.0"] = 28.0;
hgg1["29.0"] = 29.0;
#endif
#if 0
QHash<int, QString> hgg2;
hgg2[22] = "22.0";
......@@ -165,6 +184,7 @@ void testQHash()
hash.insert("Hallo", QPointer<QObject>(&ob));
hash.insert("Welt", QPointer<QObject>(&ob));
hash.insert(".", QPointer<QObject>(&ob));
#endif
}
void testQImage()
......
Markdown is supported
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