aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vrátil <[email protected]>2017-04-24 00:16:00 +0200
committerDaniel Vrátil <[email protected]>2017-04-24 00:16:00 +0200
commitd28d58ca664b37d8b3a38de4d7b5b629d03e7716 (patch)
treef195106b191645adbac034475ff9249ff7f8ac28
parent54d7d7a9638d1802ed62754fcdd4e07efb9b791b (diff)
Improve Protocol debugging
-rw-r--r--src/private/protocolgen/cppgenerator.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/private/protocolgen/cppgenerator.cpp b/src/private/protocolgen/cppgenerator.cpp
index 682b037..fda44ad 100644
--- a/src/private/protocolgen/cppgenerator.cpp
+++ b/src/private/protocolgen/cppgenerator.cpp
@@ -205,24 +205,24 @@ void CppGenerator::writeImplSerializer(DocumentNode const *node)
" QString out;\n"
" switch (static_cast<int>(cmd.type() | (cmd.isResponse() ? Command::_ResponseBit : 0))) {\n"
" case Command::Invalid:\n"
- " QDebug(&out) << static_cast<const Command &>(cmd);\n"
+ " QDebug(&out).noquote() << static_cast<const Command &>(cmd);\n"
" return out;\n"
" case Command::Invalid | Command::_ResponseBit:\n"
- " QDebug(&out) << static_cast<const Response &>(cmd);\n"
+ " QDebug(&out).noquote() << static_cast<const Response &>(cmd);\n"
" return out;\n";
for (auto child : qAsConst(node->children())) {
auto classNode = static_cast<ClassNode const *>(child);
if (classNode->classType() == ClassNode::Response) {
mImpl << " case Command::" << classNode->name() << " | Command::_ResponseBit:\n"
- " QDebug(&out) << static_cast<const " << classNode->className() << " &>(cmd);\n"
+ " QDebug(&out).noquote() << static_cast<const " << classNode->className() << " &>(cmd);\n"
" return out;\n";
} else if (classNode->classType() == ClassNode::Command) {
mImpl << " case Command::" << classNode->name() << ":\n"
- " QDebug(&out) << static_cast<const " << classNode->className() << " &>(cmd);\n"
+ " QDebug(&out).noquote() << static_cast<const " << classNode->className() << " &>(cmd);\n"
" return out;\n";
} else if (classNode->classType() == ClassNode::Notification) {
mImpl << " case Command::" << classNode->name() << "Notification:\n"
- " QDebug(&out) << static_cast<const " << classNode->className() << " &>(cmd);\n"
+ " QDebug(&out).noquote() << static_cast<const " << classNode->className() << " &>(cmd);\n"
" return out;\n";
}
}
@@ -573,7 +573,7 @@ void CppGenerator::writeImplClass(ClassNode const *node)
}
for (auto prop : serializeProperties) {
- mImpl << " << obj." << prop->mVariableName() << "\n";
+ mImpl << " << \"" << prop->name() << ":\" << obj." << prop->mVariableName() << " << \"\\n\"\n";
}
mImpl << " ;\n"
"}\n"