summaryrefslogtreecommitdiffstats
path: root/framework/actions/context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'framework/actions/context.cpp')
-rw-r--r--framework/actions/context.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/framework/actions/context.cpp b/framework/actions/context.cpp
index a7f87d16..205b1606 100644
--- a/framework/actions/context.cpp
+++ b/framework/actions/context.cpp
@@ -19,6 +19,7 @@
19#include "context.h" 19#include "context.h"
20 20
21#include <QDebug> 21#include <QDebug>
22#include <QMetaProperty>
22 23
23using namespace Kube; 24using namespace Kube;
24 25
@@ -27,3 +28,18 @@ Context::Context(QObject *parent)
27{ 28{
28 29
29} 30}
31
32QDebug operator<<(QDebug dbg, const Kube::Context &context)
33{
34 dbg << "Kube::Context {\n";
35 auto metaObject = context.QObject::metaObject();
36 for (auto i = metaObject->propertyOffset(); i < metaObject->propertyCount(); i++) {
37 auto property = metaObject->property(i);
38 dbg << property.name() << context.property(property.name()) << "\n";
39 }
40 for (const auto &p : context.dynamicPropertyNames()) {
41 dbg << p << context.property(p) << "\n";
42 }
43 dbg << "\n}";
44 return dbg;
45}