Commit 08e17e6e authored by hjk's avatar hjk
Browse files

Fixes: debugger: more quote fixes

parent 1c55964b
......@@ -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
......@@ -2482,54 +2482,54 @@ void qDumpObjectData440(
// They are mentioned here nevertheless. For types that not listed
// here, dumpers won't be used.
d << "dumpers=["
"'"NS"QByteArray',"
"'"NS"QDateTime',"
"'"NS"QDir',"
"'"NS"QFile',"
"'"NS"QFileInfo',"
"'"NS"QHash',"
"'"NS"QHashNode',"
"'"NS"QImage',"
"'"NS"QLinkedList',"
"'"NS"QList',"
"'"NS"QLocale',"
"'"NS"QMap',"
"'"NS"QMapNode',"
"'"NS"QModelIndex',"
"\""NS"QByteArray\","
"\""NS"QDateTime\","
"\""NS"QDir\","
"\""NS"QFile\","
"\""NS"QFileInfo\","
"\""NS"QHash\","
"\""NS"QHashNode\","
"\""NS"QImage\","
"\""NS"QLinkedList\","
"\""NS"QList\","
"\""NS"QLocale\","
"\""NS"QMap\","
"\""NS"QMapNode\","
"\""NS"QModelIndex\","
#if QT_VERSION >= 0x040500
"'"NS"QMultiMap',"
"\""NS"QMultiMap\","
#endif
"'"NS"QObject',"
"'"NS"QObjectMethodList'," // hack to get nested properties display
"'"NS"QObjectPropertyList',"
"\""NS"QObject\","
"\""NS"QObjectMethodList\"," // hack to get nested properties display
"\""NS"QObjectPropertyList\","
#if PRIVATE_OBJECT_ALLOWED
"'"NS"QObjectSignal',"
"'"NS"QObjectSignalList',"
"'"NS"QObjectSlot',"
"'"NS"QObjectSlotList',"
"\""NS"QObjectSignal\","
"\""NS"QObjectSignalList\","
"\""NS"QObjectSlot\","
"\""NS"QObjectSlotList\","
#endif // PRIVATE_OBJECT_ALLOWED
// << "'"NS"QRegion',"
"'"NS"QSet',"
"'"NS"QString',"
"'"NS"QStringList',"
"'"NS"QTextCodec',"
"'"NS"QVariant',"
"'"NS"QVector',"
"'"NS"QWidget',"
"'string',"
"'wstring',"
"'std::basic_string',"
"'std::list',"
"'std::map',"
"'std::string',"
"'std::vector',"
"'std::wstring',"
// << "\""NS"QRegion\","
"\""NS"QSet\","
"\""NS"QString\","
"\""NS"QStringList\","
"\""NS"QTextCodec\","
"\""NS"QVariant\","
"\""NS"QVector\","
"\""NS"QWidget\","
"\"string\","
"\"wstring\","
"\"std::basic_string\","
"\"std::list\","
"\"std::map\","
"\"std::string\","
"\"std::vector\","
"\"std::wstring\","
"]";
d << ",qtversion=["
"'" << ((QT_VERSION >> 16) & 255) << "',"
"'" << ((QT_VERSION >> 8) & 255) << "',"
"'" << ((QT_VERSION) & 255) << "']";
d << ",namespace='"NS"'";
"\"" << ((QT_VERSION >> 16) & 255) << "\","
"\"" << ((QT_VERSION >> 8) & 255) << "\","
"\"" << ((QT_VERSION) & 255) << "\"]";
d << ",namespace=\""NS"\"";
d.disarm();
}
......
......@@ -1096,8 +1096,8 @@ bool DebuggerManager::useFastStart() const
void DebuggerManager::setUseCustomDumpers(bool on)
{
m_settings.m_useCustomDumpers = on;
engine()->setUseCustomDumpers(on);
//m_settings.m_useCustomDumpers = on;
//engine()->setUseCustomDumpers(on);
}
void DebuggerManager::setUseFastStart(bool on)
......
......@@ -2883,6 +2883,7 @@ static QString sizeofTypeExpression(const QString &type)
void GdbEngine::setUseCustomDumpers(bool on)
{
qDebug() << "SWITCHING ON/OFF DUMPER DEBUGGING:" << on;
Q_UNUSED(on);
// FIXME: a bit too harsh, but otherwise the treeview sometimes look funny
//m_expandedINames.clear();
......@@ -3298,7 +3299,8 @@ void GdbEngine::handleQueryDataDumper2(const GdbResultRecord &record)
QByteArray out = output.data();
out = out.mid(out.indexOf('"') + 2); // + 1 is success marker
out = out.left(out.lastIndexOf('"'));
out = out.replace('\'', '"');
//out.replace('\'', '"');
out.replace("\\", "");
out = "dummy={" + out + "}";
//qDebug() << "OUTPUT: " << out;
......@@ -3488,7 +3490,8 @@ void GdbEngine::handleDumpCustomValue2(const GdbResultRecord &record,
QByteArray out = output.data();
out = out.mid(out.indexOf('"') + 2); // + 1 is the 'success marker'
out = out.left(out.lastIndexOf('"'));
out = out.replace('\'', '"');
//out.replace('\'', '"');
out.replace("\\", "");
out = "dummy={" + out + "}";
//qDebug() << "OUTPUT: " << out;
......
......@@ -145,7 +145,7 @@ void testQByteArray()
void testQHash()
{
#if 0
#if 1
QHash<int, float> hgg0;
hgg0[11] = 11.0;
hgg0[22] = 22.0;
......@@ -171,7 +171,7 @@ void testQHash()
#endif
#if 0
#if 1
QHash<int, QString> hgg2;
hgg2[22] = "22.0";
......
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