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

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)
......
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