diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-02-15 16:21:06 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-02-16 10:39:59 +0100 |
commit | f7a42de9bfd6e34f1dc46da433d3f45976b1cd0e (patch) | |
tree | 421899ff287eb44459587aee6549ff098ab564fd /sinksh/syntax_modules/sink_create.cpp | |
parent | 73ef798bf849a01418895c2e88300e1c6730b665 (diff) | |
download | sink-f7a42de9bfd6e34f1dc46da433d3f45976b1cd0e.tar.gz sink-f7a42de9bfd6e34f1dc46da433d3f45976b1cd0e.zip |
PropertyParser to properly parse different property types.
Diffstat (limited to 'sinksh/syntax_modules/sink_create.cpp')
-rw-r--r-- | sinksh/syntax_modules/sink_create.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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 @@ | |||
25 | 25 | ||
26 | #include "common/resource.h" | 26 | #include "common/resource.h" |
27 | #include "common/storage.h" | 27 | #include "common/storage.h" |
28 | #include "common/domain/event.h" | ||
29 | #include "common/domain/folder.h" | ||
30 | #include "common/resourceconfig.h" | 28 | #include "common/resourceconfig.h" |
31 | #include "common/log.h" | 29 | #include "common/log.h" |
32 | #include "common/storage.h" | 30 | #include "common/storage.h" |
33 | #include "common/definitions.h" | 31 | #include "common/definitions.h" |
32 | #include "common/propertyparser.h" | ||
34 | 33 | ||
35 | #include "sinksh_utils.h" | 34 | #include "sinksh_utils.h" |
36 | #include "state.h" | 35 | #include "state.h" |
@@ -62,7 +61,8 @@ bool create(const QStringList &allArgs, State &state) | |||
62 | 61 | ||
63 | auto map = SinkshUtils::keyValueMapFromArgs(args); | 62 | auto map = SinkshUtils::keyValueMapFromArgs(args); |
64 | for (auto i = map.begin(); i != map.end(); ++i) { | 63 | for (auto i = map.begin(); i != map.end(); ++i) { |
65 | object->setProperty(i.key().toLatin1(), i.value()); | 64 | const auto property = i.key().toLatin1(); |
65 | object->setProperty(property, Sink::PropertyParser::parse(type.toLatin1(), property, i.value())); | ||
66 | } | 66 | } |
67 | 67 | ||
68 | auto result = store.create(*object).exec(); | 68 | auto result = store.create(*object).exec(); |