Commit 0ba2b9b3 authored by Marco Bubke's avatar Marco Bubke Committed by Thomas Hartmann

QmlDesigner: Add qdebugs for commands

Change-Id: I60bdd5b36749be5092d4dabe486b101d62b3df06
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 8f22b840
......@@ -29,6 +29,8 @@
#include "changeauxiliarycommand.h"
#include <QDebug>
namespace QmlDesigner {
ChangeAuxiliaryCommand::ChangeAuxiliaryCommand()
......@@ -59,4 +61,9 @@ QDataStream &operator>>(QDataStream &in, ChangeAuxiliaryCommand &command)
return in;
}
QDebug operator <<(QDebug debug, const ChangeAuxiliaryCommand &command)
{
return debug.nospace() << "ChangeAuxiliaryCommand(auxiliaryChanges: " << command.m_auxiliaryChangeVector << ")";
}
} // namespace QmlDesigner
......@@ -40,6 +40,7 @@ namespace QmlDesigner {
class ChangeAuxiliaryCommand
{
friend QDataStream &operator>>(QDataStream &in, ChangeAuxiliaryCommand &command);
friend QDebug operator <<(QDebug debug, const ChangeAuxiliaryCommand &command);
public:
ChangeAuxiliaryCommand();
......@@ -54,6 +55,8 @@ private:
QDataStream &operator<<(QDataStream &out, const ChangeAuxiliaryCommand &command);
QDataStream &operator>>(QDataStream &in, ChangeAuxiliaryCommand &command);
QDebug operator <<(QDebug debug, const ChangeAuxiliaryCommand &command);
} // namespace QmlDesigner
Q_DECLARE_METATYPE(QmlDesigner::ChangeAuxiliaryCommand)
......
......@@ -29,6 +29,8 @@
#include "changebindingscommand.h"
#include <QDebug>
namespace QmlDesigner {
ChangeBindingsCommand::ChangeBindingsCommand()
......@@ -58,4 +60,10 @@ QDataStream &operator>>(QDataStream &in, ChangeBindingsCommand &command)
return in;
}
QDebug operator <<(QDebug debug, const ChangeBindingsCommand &command)
{
return debug.nospace() << "PropertyValueContainer(bindingChanges: " << command.m_bindingChangeVector << ")";
}
} // namespace QmlDesigner
......@@ -40,6 +40,7 @@ namespace QmlDesigner {
class ChangeBindingsCommand
{
friend QDataStream &operator>>(QDataStream &in, ChangeBindingsCommand &command);
friend QDebug operator <<(QDebug debug, const ChangeBindingsCommand &command);
public:
ChangeBindingsCommand();
......@@ -54,6 +55,8 @@ private:
QDataStream &operator<<(QDataStream &out, const ChangeBindingsCommand &command);
QDataStream &operator>>(QDataStream &in, ChangeBindingsCommand &command);
QDebug operator <<(QDebug debug, const ChangeBindingsCommand &command);
} // namespace QmlDesigner
Q_DECLARE_METATYPE(QmlDesigner::ChangeBindingsCommand)
......
......@@ -28,7 +28,9 @@
****************************************************************************/
#include "changefileurlcommand.h"
#include <QDataStream>
#include <QDebug>
namespace QmlDesigner {
......@@ -60,4 +62,10 @@ QDataStream &operator>>(QDataStream &in, ChangeFileUrlCommand &command)
return in;
}
QDebug operator <<(QDebug debug, const ChangeFileUrlCommand &command)
{
return debug.nospace() << "ChangeFileUrlCommand("
<< "fileUrl: " << command.fileUrl() << ")";
}
} // namespace QmlDesigner
......@@ -52,6 +52,8 @@ private:
QDataStream &operator<<(QDataStream &out, const ChangeFileUrlCommand &command);
QDataStream &operator>>(QDataStream &in, ChangeFileUrlCommand &command);
QDebug operator <<(QDebug debug, const ChangeFileUrlCommand &command);
} // namespace QmlDesigner
Q_DECLARE_METATYPE(QmlDesigner::ChangeFileUrlCommand)
......
......@@ -29,6 +29,8 @@
#include "changeidscommand.h"
#include <QDebug>
namespace QmlDesigner {
ChangeIdsCommand::ChangeIdsCommand()
......@@ -59,4 +61,9 @@ QDataStream &operator>>(QDataStream &in, ChangeIdsCommand &command)
return in;
}
QDebug operator <<(QDebug debug, const ChangeIdsCommand &command)
{
return debug.nospace() << "ChangeIdsCommand(ids: " << command.m_idVector << ")";
}
} // namespace QmlDesigner
......@@ -41,6 +41,8 @@ namespace QmlDesigner {
class ChangeIdsCommand
{
friend QDataStream &operator>>(QDataStream &in, ChangeIdsCommand &command);
friend QDebug operator <<(QDebug debug, const ChangeIdsCommand &command);
public:
ChangeIdsCommand();
explicit ChangeIdsCommand(const QVector<IdContainer> &idVector);
......@@ -54,6 +56,8 @@ private:
QDataStream &operator<<(QDataStream &out, const ChangeIdsCommand &command);
QDataStream &operator>>(QDataStream &in, ChangeIdsCommand &command);
QDebug operator <<(QDebug debug, const ChangeIdsCommand &command);
} // namespace QmlDesigner
Q_DECLARE_METATYPE(QmlDesigner::ChangeIdsCommand)
......
......@@ -30,6 +30,7 @@
#include "changenodesourcecommand.h"
#include <QDataStream>
#include <QDebug>
namespace QmlDesigner {
......@@ -68,4 +69,11 @@ QDataStream &operator>>(QDataStream &in, ChangeNodeSourceCommand &command)
return in;
}
QDebug operator <<(QDebug debug, const ChangeNodeSourceCommand &command)
{
return debug.nospace() << "ReparentInstancesCommand("
<< "instanceId: " << command.m_instanceId
<< "nodeSource: " << command.m_nodeSource << ")";
}
} // namespace QmlDesigner
......@@ -39,6 +39,8 @@ namespace QmlDesigner {
class ChangeNodeSourceCommand
{
friend QDataStream &operator>>(QDataStream &in, ChangeNodeSourceCommand &command);
friend QDebug operator <<(QDebug debug, const ChangeNodeSourceCommand &command);
public:
ChangeNodeSourceCommand();
explicit ChangeNodeSourceCommand(qint32 instanceId, const QString &nodeSource);
......@@ -53,6 +55,8 @@ private:
QDataStream &operator<<(QDataStream &out, const ChangeNodeSourceCommand &command);
QDataStream &operator>>(QDataStream &in, ChangeNodeSourceCommand &command);
QDebug operator <<(QDebug debug, const ChangeNodeSourceCommand &command);
} // namespace QmlDesigner
Q_DECLARE_METATYPE(QmlDesigner::ChangeNodeSourceCommand)
......
......@@ -29,6 +29,8 @@
#include "changestatecommand.h"
#include <QDebug>
namespace QmlDesigner {
ChangeStateCommand::ChangeStateCommand()
......@@ -60,4 +62,9 @@ QDataStream &operator>>(QDataStream &in, ChangeStateCommand &command)
return in;
}
QDebug operator <<(QDebug debug, const ChangeStateCommand &command)
{
return debug.nospace() << "ChangeStateCommand(stateInstanceId: " << command.m_stateInstanceId << ")";
}
} // namespace QmlDesigner
......@@ -40,6 +40,7 @@ namespace QmlDesigner {
class ChangeStateCommand
{
friend QDataStream &operator>>(QDataStream &in, ChangeStateCommand &command);
friend QDebug operator <<(QDebug debug, const ChangeStateCommand &command);
public:
ChangeStateCommand();
......@@ -54,6 +55,8 @@ private:
QDataStream &operator<<(QDataStream &out, const ChangeStateCommand &command);
QDataStream &operator>>(QDataStream &in, ChangeStateCommand &command);
QDebug operator <<(QDebug debug, const ChangeStateCommand &command);
} // namespace QmlDesigner
Q_DECLARE_METATYPE(QmlDesigner::ChangeStateCommand)
......
......@@ -29,6 +29,8 @@
#include "changevaluescommand.h"
#include <QDebug>
namespace QmlDesigner {
ChangeValuesCommand::ChangeValuesCommand()
......@@ -59,4 +61,9 @@ QDataStream &operator>>(QDataStream &in, ChangeValuesCommand &command)
return in;
}
QDebug operator <<(QDebug debug, const ChangeValuesCommand &command)
{
return debug.nospace() << "ChangeValuesCommand(valueChanges: " << command.m_valueChangeVector << ")";
}
} // namespace QmlDesigner
......@@ -40,6 +40,7 @@ namespace QmlDesigner {
class ChangeValuesCommand
{
friend QDataStream &operator>>(QDataStream &in, ChangeValuesCommand &command);
friend QDebug operator <<(QDebug debug, const ChangeValuesCommand &command);
public:
ChangeValuesCommand();
......@@ -54,6 +55,8 @@ private:
QDataStream &operator<<(QDataStream &out, const ChangeValuesCommand &command);
QDataStream &operator>>(QDataStream &in, ChangeValuesCommand &command);
QDebug operator <<(QDebug debug, const ChangeValuesCommand &command);
} // namespace QmlDesigner
Q_DECLARE_METATYPE(QmlDesigner::ChangeValuesCommand)
......
......@@ -29,6 +29,8 @@
#include "childrenchangedcommand.h"
#include <QDebug>
namespace QmlDesigner {
ChildrenChangedCommand::ChildrenChangedCommand()
......@@ -88,4 +90,12 @@ bool operator ==(const ChildrenChangedCommand &first, const ChildrenChangedComma
&& first.m_informationVector == second.m_informationVector;
}
QDebug operator <<(QDebug debug, const ChildrenChangedCommand &command)
{
return debug.nospace() << "ChildrenChangedCommand("
<< "parentInstanceId: " << command.parentInstanceId() << ", "
<< "children: " << command.childrenInstances() << ", "
<< "informations: " << command.informations() << ")";
}
} // namespace QmlDesigner
......@@ -61,6 +61,7 @@ QDataStream &operator<<(QDataStream &out, const ChildrenChangedCommand &command)
QDataStream &operator>>(QDataStream &in, ChildrenChangedCommand &command);
bool operator ==(const ChildrenChangedCommand &first, const ChildrenChangedCommand &second);
QDebug operator <<(QDebug debug, const ChildrenChangedCommand &command);
} // namespace QmlDesigner
......
......@@ -29,6 +29,8 @@
#include "clearscenecommand.h"
#include <QDebug>
namespace QmlDesigner {
ClearSceneCommand::ClearSceneCommand()
......@@ -45,4 +47,9 @@ QDataStream &operator>>(QDataStream &in, ClearSceneCommand &/*command*/)
return in;
}
QDebug operator <<(QDebug debug, const ClearSceneCommand &/*command*/)
{
return debug.nospace() << "ClearSceneCommand()";
}
} // namespace QmlDesigner
......@@ -43,6 +43,8 @@ public:
QDataStream &operator<<(QDataStream &out, const ClearSceneCommand &command);
QDataStream &operator>>(QDataStream &in, ClearSceneCommand &command);
QDebug operator <<(QDebug debug, const ClearSceneCommand &command);
} // namespace QmlDesigner
Q_DECLARE_METATYPE(QmlDesigner::ClearSceneCommand)
......
......@@ -30,6 +30,7 @@
#include "completecomponentcommand.h"
#include <QDataStream>
#include <QDebug>
namespace QmlDesigner {
......@@ -61,4 +62,9 @@ QDataStream &operator>>(QDataStream &in, CompleteComponentCommand &command)
return in;
}
QDebug operator <<(QDebug debug, const CompleteComponentCommand &command)
{
return debug.nospace() << "CompleteComponentCommand(instances: " << command.m_instanceVector << ")";
}
} // namespace QmlDesigner
......@@ -39,6 +39,7 @@ namespace QmlDesigner {
class CompleteComponentCommand
{
friend QDataStream &operator>>(QDataStream &in, CompleteComponentCommand &command);
friend QDebug operator <<(QDebug debug, const CompleteComponentCommand &command);
public:
CompleteComponentCommand();
......@@ -53,6 +54,8 @@ private:
QDataStream &operator<<(QDataStream &out, const CompleteComponentCommand &command);
QDataStream &operator>>(QDataStream &in, CompleteComponentCommand &command);
QDebug operator <<(QDebug debug, const CompleteComponentCommand &command);
} // namespace QmlDesigner
Q_DECLARE_METATYPE(QmlDesigner::CompleteComponentCommand)
......
......@@ -30,6 +30,7 @@
#include "componentcompletedcommand.h"
#include <QDataStream>
#include <QDebug>
namespace QmlDesigner {
......@@ -71,5 +72,11 @@ bool operator ==(const ComponentCompletedCommand &first, const ComponentComplete
return first.m_instanceVector == second.m_instanceVector;
}
QDebug operator <<(QDebug debug, const ComponentCompletedCommand &command)
{
return debug.nospace() << "ComponentCompletedCommand(" << command.instances() << ")";
}
} // namespace QmlDesigner
......@@ -56,6 +56,7 @@ QDataStream &operator<<(QDataStream &out, const ComponentCompletedCommand &comma
QDataStream &operator>>(QDataStream &in, ComponentCompletedCommand &command);
bool operator ==(const ComponentCompletedCommand &first, const ComponentCompletedCommand &second);
QDebug operator <<(QDebug debug, const ComponentCompletedCommand &command);
} // namespace QmlDesigner
......
......@@ -30,6 +30,7 @@
#include "createinstancescommand.h"
#include <QDataStream>
#include <QDebug>
namespace QmlDesigner {
......@@ -61,4 +62,9 @@ QDataStream &operator>>(QDataStream &in, CreateInstancesCommand &command)
return in;
}
QDebug operator <<(QDebug debug, const CreateInstancesCommand &command)
{
return debug.nospace() << "CreateInstancesCommand(" << command.instances() << ")";
}
} // namespace QmlDesigner
......@@ -54,6 +54,8 @@ private:
QDataStream &operator<<(QDataStream &out, const CreateInstancesCommand &command);
QDataStream &operator>>(QDataStream &in, CreateInstancesCommand &command);
QDebug operator <<(QDebug debug, const CreateInstancesCommand &command);
} // namespace QmlDesigner
Q_DECLARE_METATYPE(QmlDesigner::CreateInstancesCommand)
......
......@@ -29,6 +29,8 @@
#include "createscenecommand.h"
#include <QDebug>
namespace QmlDesigner {
CreateSceneCommand::CreateSceneCommand()
......@@ -122,4 +124,17 @@ QDataStream &operator>>(QDataStream &in, CreateSceneCommand &command)
return in;
}
QDebug operator <<(QDebug debug, const CreateSceneCommand &command)
{
return debug.nospace() << "CreateSceneCommand("
<< "instances: " << command.instances() << ", "
<< "reparentInstances: " << command.reparentInstances() << ", "
<< "ids: " << command.ids() << ", "
<< "valueChanges: " << command.valueChanges() << ", "
<< "bindingChanges: " << command.bindingChanges() << ", "
<< "auxiliaryChanges: " << command.auxiliaryChanges() << ", "
<< "imports: " << command.imports() << ", "
<< "fileUrl: " << command.fileUrl() << ")";
}
}
......@@ -81,6 +81,7 @@ private:
QDataStream &operator<<(QDataStream &out, const CreateSceneCommand &command);
QDataStream &operator>>(QDataStream &in, CreateSceneCommand &command);
QDebug operator <<(QDebug debug, const CreateSceneCommand &command);
}
Q_DECLARE_METATYPE(QmlDesigner::CreateSceneCommand)
......
......@@ -30,6 +30,8 @@
#include "debugoutputcommand.h"
#include <QtDebug>
namespace QmlDesigner {
DebugOutputCommand::DebugOutputCommand()
......@@ -74,4 +76,11 @@ bool operator ==(const DebugOutputCommand &first, const DebugOutputCommand &seco
&& second.m_text == second.m_text;
}
QDebug operator <<(QDebug debug, const DebugOutputCommand &command)
{
return debug.nospace() << "DebugOutputCommand("
<< "type: " << command.type() << ", "
<< "text: " << command.text() << ")";
}
} // namespace QmlDesigner
......@@ -64,6 +64,7 @@ QDataStream &operator<<(QDataStream &out, const DebugOutputCommand &command);
QDataStream &operator>>(QDataStream &in, DebugOutputCommand &command);
bool operator ==(const DebugOutputCommand &first, const DebugOutputCommand &second);
QDebug operator <<(QDebug debug, const DebugOutputCommand &command);
} // namespace QmlDesigner
......
......@@ -29,6 +29,8 @@
#include "endpuppetcommand.h"
#include <QDebug>
namespace QmlDesigner {
EndPuppetCommand::EndPuppetCommand()
......@@ -45,4 +47,9 @@ QDataStream &operator>>(QDataStream &in, EndPuppetCommand &/*command*/)
return in;
}
QDebug operator <<(QDebug debug, const EndPuppetCommand &/*command*/)
{
return debug.nospace() << "EndPuppetCommand()";
}
} // namespace QmlDesigner
......@@ -42,6 +42,8 @@ public:
QDataStream &operator<<(QDataStream &out, const EndPuppetCommand &command);
QDataStream &operator>>(QDataStream &in, EndPuppetCommand &command);
QDebug operator <<(QDebug debug, const EndPuppetCommand &command);
} // namespace QmlDesigner
Q_DECLARE_METATYPE(QmlDesigner::EndPuppetCommand)
......
......@@ -30,6 +30,7 @@
#include "informationchangedcommand.h"
#include <QMetaType>
#include <QtDebug>
#include "propertyvaluecontainer.h"
......@@ -73,4 +74,10 @@ bool operator ==(const InformationChangedCommand &first, const InformationChange
return first.m_informationVector == second.m_informationVector;
}
QDebug operator <<(QDebug debug, const InformationChangedCommand &command)
{
return debug.nospace() << "InformationChangedCommand(" << command.informations() << ")";
}
} // namespace QmlDesigner
......@@ -32,7 +32,6 @@
#include <QMetaType>
#include <QVector>
#include <QDebug>
#include "informationcontainer.h"
......@@ -59,6 +58,7 @@ QDataStream &operator<<(QDataStream &out, const InformationChangedCommand &comma
QDataStream &operator>>(QDataStream &in, InformationChangedCommand &command);
bool operator ==(const InformationChangedCommand &first, const InformationChangedCommand &second);
QDebug operator <<(QDebug debug, const InformationChangedCommand &command);
} // namespace QmlDesigner
......
......@@ -73,4 +73,9 @@ bool operator ==(const PixmapChangedCommand &first, const PixmapChangedCommand &
return first.m_imageVector == second.m_imageVector;
}
QDebug operator <<(QDebug debug, const PixmapChangedCommand &command)
{
return debug.nospace() << "PixmapChangedCommand(" << command.images() << ")";
}
} // namespace QmlDesigner
......@@ -56,6 +56,7 @@ QDataStream &operator<<(QDataStream &out, const PixmapChangedCommand &command);
QDataStream &operator>>(QDataStream &in, PixmapChangedCommand &command);
bool operator ==(const PixmapChangedCommand &first, const PixmapChangedCommand &second);
QDebug operator <<(QDebug debug, const PixmapChangedCommand &command);
} // namespace QmlDesigner
......
......@@ -30,6 +30,7 @@
#include "removeinstancescommand.h"
#include <QDataStream>
#include <QDebug>
namespace QmlDesigner {
......@@ -61,4 +62,9 @@ QDataStream &operator>>(QDataStream &in, RemoveInstancesCommand &command)
return in;
}
QDebug operator <<(QDebug debug, const RemoveInstancesCommand &command)
{
return debug.nospace() << "RemoveInstancesCommand(instanceIdVector: " << command.m_instanceIdVector << ")";
}
} // namespace QmlDesigner
......@@ -41,6 +41,7 @@ namespace QmlDesigner {
class RemoveInstancesCommand
{
friend QDataStream &operator>>(QDataStream &in, RemoveInstancesCommand &command);
friend QDebug operator <<(QDebug debug, const RemoveInstancesCommand &command);
public:
RemoveInstancesCommand();
......@@ -55,6 +56,8 @@ private:
QDataStream &operator<<(QDataStream &out, const RemoveInstancesCommand &command);
QDataStream &operator>>(QDataStream &in, RemoveInstancesCommand &command);
QDebug operator <<(QDebug debug, const RemoveInstancesCommand &command);
} // namespace QmlDesigner
Q_DECLARE_METATYPE(QmlDesigner::RemoveInstancesCommand)
......
......@@ -29,6 +29,8 @@
#include "removepropertiescommand.h"
#include <QDebug>
namespace QmlDesigner {
RemovePropertiesCommand::RemovePropertiesCommand()
......@@ -59,4 +61,9 @@ QDataStream &operator>>(QDataStream &in, RemovePropertiesCommand &command)
return in;
}
QDebug operator <<(QDebug debug, const RemovePropertiesCommand &command)