summaryrefslogtreecommitdiffstats
path: root/sinksh/syntax_modules/sink_modify.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-03 22:43:54 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-03 22:43:54 +0200
commit256b5beb89d2c67d74d80a6f1a0f0dad074911e3 (patch)
tree23326dfe10e290417f823803c75628327f727636 /sinksh/syntax_modules/sink_modify.cpp
parent50bed81038f10091d35c5719df8078612393ae95 (diff)
downloadsink-256b5beb89d2c67d74d80a6f1a0f0dad074911e3.tar.gz
sink-256b5beb89d2c67d74d80a6f1a0f0dad074911e3.zip
Removed the use of C99 extensions
Diffstat (limited to 'sinksh/syntax_modules/sink_modify.cpp')
-rw-r--r--sinksh/syntax_modules/sink_modify.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/sinksh/syntax_modules/sink_modify.cpp b/sinksh/syntax_modules/sink_modify.cpp
index 6cda5ab..173d65e 100644
--- a/sinksh/syntax_modules/sink_modify.cpp
+++ b/sinksh/syntax_modules/sink_modify.cpp
@@ -101,17 +101,15 @@ bool resource(const QStringList &args, State &state)
101Syntax::List syntax() 101Syntax::List syntax()
102{ 102{
103 Syntax modify("modify", QObject::tr("Modify items in a resource"), &SinkModify::modify); 103 Syntax modify("modify", QObject::tr("Modify items in a resource"), &SinkModify::modify);
104 modify.addPositionalArgument({ .name = "type", .help = "The type of entity to modify (mail, event, etc.)" }); 104 modify.addPositionalArgument({"type", "The type of entity to modify (mail, event, etc.)"});
105 modify.addPositionalArgument({ .name = "resourceId", .help = "The ID of the resource containing the entity" }); 105 modify.addPositionalArgument({"resourceId", "The ID of the resource containing the entity"});
106 modify.addPositionalArgument({ .name = "objectId", .help = "The ID of the entity" }); 106 modify.addPositionalArgument({"objectId", "The ID of the entity"});
107 modify.addPositionalArgument( 107 modify.addPositionalArgument({"key value", "Attributes and values to modify", false, true });
108 { .name = "key value", .help = "Attributes and values to modify", .required = false, .variadic = true });
109 108
110 Syntax resource("resource", QObject::tr("Modify a resource"), &SinkModify::resource);//, Syntax::EventDriven); 109 Syntax resource("resource", QObject::tr("Modify a resource"), &SinkModify::resource);//, Syntax::EventDriven);
111 110
112 resource.addPositionalArgument({ .name = "id", .help = "The ID of the resource" }); 111 resource.addPositionalArgument({"id", "The ID of the resource" });
113 resource.addPositionalArgument( 112 resource.addPositionalArgument({"key value", "Attributes and values to modify", false, true});
114 { .name = "key value", .help = "Attributes and values to modify", .required = false, .variadic = true });
115 113
116 resource.completer = &SinkshUtils::resourceOrTypeCompleter; 114 resource.completer = &SinkshUtils::resourceOrTypeCompleter;
117 modify.children << resource; 115 modify.children << resource;