diff --git a/src/libs/qmljs/qmljsdelta.cpp b/src/libs/qmljs/qmljsdelta.cpp index da0022a419dbb81f9c4643b551c87aa64ea45ca9..6c71e3c5e7a4a03dc752dfeb2d3866947ce8064c 100644 --- a/src/libs/qmljs/qmljsdelta.cpp +++ b/src/libs/qmljs/qmljsdelta.cpp @@ -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);