forked from qt-creator/qt-creator
QmlDesigner: Add qdebugs for commands
Change-Id: I60bdd5b36749be5092d4dabe486b101d62b3df06 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
committed by
Thomas Hartmann
parent
8f22b84016
commit
0ba2b9b37d
@@ -30,6 +30,7 @@
|
||||
#include "instancecontainer.h"
|
||||
|
||||
#include <QDataStream>
|
||||
#include <QDebug>
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
@@ -122,4 +123,35 @@ QDataStream &operator>>(QDataStream &in, InstanceContainer &container)
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
QDebug operator <<(QDebug debug, const InstanceContainer &command)
|
||||
{
|
||||
debug.nospace() << "InstanceContainer("
|
||||
<< "instanceId: " << command.instanceId() << ", "
|
||||
<< "type: " << command.type() << ", "
|
||||
<< "majorNumber: " << command.majorNumber() << ", "
|
||||
<< "minorNumber: " << command.minorNumber() << ", ";
|
||||
|
||||
if (!command.componentPath().isEmpty())
|
||||
debug.nospace() << "componentPath: " << command.componentPath() << ", ";
|
||||
|
||||
if (!command.nodeSource().isEmpty())
|
||||
debug.nospace() << "nodeSource: " << command.nodeSource() << ", ";
|
||||
|
||||
if (command.nodeSourceType() == InstanceContainer::NoSource)
|
||||
debug.nospace() << "nodeSourceType: NoSource, ";
|
||||
else if (command.nodeSourceType() == InstanceContainer::CustomParserSource)
|
||||
debug.nospace() << "nodeSourceType: CustomParserSource, ";
|
||||
else
|
||||
debug.nospace() << "nodeSourceType: ComponentSource, ";
|
||||
|
||||
if (command.metaType() == InstanceContainer::ObjectMetaType)
|
||||
debug.nospace() << "metatype: ObjectMetaType";
|
||||
else
|
||||
debug.nospace() << "metatype: ItemMetaType";
|
||||
|
||||
return debug.nospace() << ")";
|
||||
|
||||
}
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
||||
Reference in New Issue
Block a user