diff options
Diffstat (limited to 'sinksh/syntax_modules/sink_modify.cpp')
-rw-r--r-- | sinksh/syntax_modules/sink_modify.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sinksh/syntax_modules/sink_modify.cpp b/sinksh/syntax_modules/sink_modify.cpp index 4d637d8..2579550 100644 --- a/sinksh/syntax_modules/sink_modify.cpp +++ b/sinksh/syntax_modules/sink_modify.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" |
@@ -65,7 +64,8 @@ bool modify(const QStringList &args, State &state) | |||
65 | 64 | ||
66 | auto map = SinkshUtils::keyValueMapFromArgs(args); | 65 | auto map = SinkshUtils::keyValueMapFromArgs(args); |
67 | for (auto i = map.begin(); i != map.end(); ++i) { | 66 | for (auto i = map.begin(); i != map.end(); ++i) { |
68 | object->setProperty(i.key().toLatin1(), i.value()); | 67 | const auto property = i.key().toLatin1(); |
68 | object->setProperty(property, Sink::PropertyParser::parse(type.toLatin1(), property, i.value())); | ||
69 | } | 69 | } |
70 | 70 | ||
71 | auto result = store.modify(*object).exec(); | 71 | auto result = store.modify(*object).exec(); |
@@ -91,7 +91,8 @@ bool resource(const QStringList &args, State &state) | |||
91 | 91 | ||
92 | auto map = SinkshUtils::keyValueMapFromArgs(args); | 92 | auto map = SinkshUtils::keyValueMapFromArgs(args); |
93 | for (auto i = map.begin(); i != map.end(); ++i) { | 93 | for (auto i = map.begin(); i != map.end(); ++i) { |
94 | object->setProperty(i.key().toLatin1(), i.value()); | 94 | const auto property = i.key().toLatin1(); |
95 | object->setProperty(property, Sink::PropertyParser::parse("resource", property, i.value())); | ||
95 | } | 96 | } |
96 | 97 | ||
97 | auto result = store.modify(*object).exec(); | 98 | auto result = store.modify(*object).exec(); |