From f7a42de9bfd6e34f1dc46da433d3f45976b1cd0e Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 15 Feb 2017 16:21:06 +0100 Subject: PropertyParser to properly parse different property types. --- sinksh/syntax_modules/sink_create.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sinksh/syntax_modules/sink_create.cpp') diff --git a/sinksh/syntax_modules/sink_create.cpp b/sinksh/syntax_modules/sink_create.cpp index 9f5d010..f18a990 100644 --- a/sinksh/syntax_modules/sink_create.cpp +++ b/sinksh/syntax_modules/sink_create.cpp @@ -25,12 +25,11 @@ #include "common/resource.h" #include "common/storage.h" -#include "common/domain/event.h" -#include "common/domain/folder.h" #include "common/resourceconfig.h" #include "common/log.h" #include "common/storage.h" #include "common/definitions.h" +#include "common/propertyparser.h" #include "sinksh_utils.h" #include "state.h" @@ -62,7 +61,8 @@ bool create(const QStringList &allArgs, State &state) auto map = SinkshUtils::keyValueMapFromArgs(args); for (auto i = map.begin(); i != map.end(); ++i) { - object->setProperty(i.key().toLatin1(), i.value()); + const auto property = i.key().toLatin1(); + object->setProperty(property, Sink::PropertyParser::parse(type.toLatin1(), property, i.value())); } auto result = store.create(*object).exec(); -- cgit v1.2.3