summaryrefslogtreecommitdiffstats
path: root/sinksh/syntax_modules/sink_remove.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_remove.cpp
parent50bed81038f10091d35c5719df8078612393ae95 (diff)
downloadsink-256b5beb89d2c67d74d80a6f1a0f0dad074911e3.tar.gz
sink-256b5beb89d2c67d74d80a6f1a0f0dad074911e3.zip
Removed the use of C99 extensions
Diffstat (limited to 'sinksh/syntax_modules/sink_remove.cpp')
-rw-r--r--sinksh/syntax_modules/sink_remove.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/sinksh/syntax_modules/sink_remove.cpp b/sinksh/syntax_modules/sink_remove.cpp
index 999a889..39b3d60 100644
--- a/sinksh/syntax_modules/sink_remove.cpp
+++ b/sinksh/syntax_modules/sink_remove.cpp
@@ -132,20 +132,19 @@ bool identity(const QStringList &args, State &state)
132Syntax::List syntax() 132Syntax::List syntax()
133{ 133{
134 Syntax remove("remove", QObject::tr("Remove items in a resource"), &SinkRemove::remove); 134 Syntax remove("remove", QObject::tr("Remove items in a resource"), &SinkRemove::remove);
135 135 remove.addPositionalArgument({"type", "The type of entity to remove (mail, event, etc.)"});
136 remove.addPositionalArgument({ .name = "type", .help = "The type of entity to remove (mail, event, etc.)" }); 136 remove.addPositionalArgument({"resourceId", "The ID of the resource containing the entity"});
137 remove.addPositionalArgument({ .name = "resourceId", .help = "The ID of the resource containing the entity" }); 137 remove.addPositionalArgument({"objectId", "The ID of the entity to remove"});
138 remove.addPositionalArgument({ .name = "objectId", .help = "The ID of the entity to remove" });
139 138
140 Syntax resource("resource", QObject::tr("Removes a resource"), &SinkRemove::resource, Syntax::NotInteractive); 139 Syntax resource("resource", QObject::tr("Removes a resource"), &SinkRemove::resource, Syntax::NotInteractive);
141 resource.addPositionalArgument({ .name = "id", .help = "The ID of the resource to remove" }); 140 resource.addPositionalArgument({"id", "The ID of the resource to remove"});
142 resource.completer = &SinkshUtils::resourceCompleter; 141 resource.completer = &SinkshUtils::resourceCompleter;
143 142
144 Syntax account("account", QObject::tr("Removes a account"), &SinkRemove::account, Syntax::NotInteractive); 143 Syntax account("account", QObject::tr("Removes a account"), &SinkRemove::account, Syntax::NotInteractive);
145 account.addPositionalArgument({ .name = "id", .help = "The ID of the account to remove" }); 144 account.addPositionalArgument({"id", "The ID of the account to remove"});
146 145
147 Syntax identity("identity", QObject::tr("Removes an identity"), &SinkRemove::identity, Syntax::NotInteractive); 146 Syntax identity("identity", QObject::tr("Removes an identity"), &SinkRemove::identity, Syntax::NotInteractive);
148 identity.addPositionalArgument({ .name = "id", .help = "The ID of the account to remove" }); 147 identity.addPositionalArgument({"id", "The ID of the account to remove"});
149 148
150 remove.children << resource << account << identity; 149 remove.children << resource << account << identity;
151 150