Commit 6863a848 authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlJsDelta: Guard qDebug output

parent e0b11d43
......@@ -42,6 +42,10 @@ using namespace QmlJS::AST;
namespace {
using namespace QmlJS;
enum {
debug = false
};
/*!
Build a hash of the parents
*/
......@@ -475,7 +479,8 @@ Delta::DebugIdMap Delta::operator()(const Document::Ptr &doc1, const Document::P
UiObjectMember* parent = parents2.parent.value(y);
if (!M.way2.contains(parent))
continue;
qDebug () << "Delta::operator(): insert " << label(y, doc2) << " to " << label(parent, doc2);
if (debug)
qDebug () << "Delta::operator(): insert " << label(y, doc2) << " to " << label(parent, doc2);
insert(y, parent, newDebuggIds.value(parent), doc2);
continue;
}
......@@ -494,7 +499,8 @@ Delta::DebugIdMap Delta::operator()(const Document::Ptr &doc1, const Document::P
// << " to "<< label(y, doc2) << "with parent " << label(parents2.parent.value(y), doc2);
if (!M.contains(parents1.parent.value(x),parents2.parent.value(y))) {
qDebug () << "Delta::operator(): move " << label(y, doc2) << " from " << label(parents1.parent.value(x), doc1)
if (debug)
qDebug () << "Delta::operator(): move " << label(y, doc2) << " from " << label(parents1.parent.value(x), doc1)
<< " to " << label(parents2.parent.value(y), doc2);
reparent(newDebuggIds.value(y), newDebuggIds.value(parents2.parent.value(y)));
continue;
......@@ -508,7 +514,8 @@ Delta::DebugIdMap Delta::operator()(const Document::Ptr &doc1, const Document::P
if (!cast<UiObjectDefinition *>(x))
continue;
if (!M.way1.contains(x)) {
qDebug () << "Delta::operator(): remove " << label(x, doc1);
if (debug)
qDebug () << "Delta::operator(): remove " << label(x, doc1);
QList<DebugId> ids = debugIds.value(x);
if (!ids.isEmpty())
remove(ids);
......
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