From c82c80d031d50e445bda7c02adbd3e97a635cde6 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Thu, 2 Aug 2018 14:08:35 +0200 Subject: Put "syntax" at the bottom --- sinksh/syntax_modules/sink_sync.cpp | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'sinksh/syntax_modules/sink_sync.cpp') diff --git a/sinksh/syntax_modules/sink_sync.cpp b/sinksh/syntax_modules/sink_sync.cpp index ee19f0a..e13e8f8 100644 --- a/sinksh/syntax_modules/sink_sync.cpp +++ b/sinksh/syntax_modules/sink_sync.cpp @@ -37,23 +37,6 @@ namespace SinkSync { -bool sync(const QStringList &args, State &state); - -Syntax::List syntax() -{ - Syntax sync("sync", QObject::tr("Synchronizes a resource."), &SinkSync::sync, Syntax::EventDriven); - - sync.addPositionalArgument({ .name = "type", .help = "The type of resource to synchronize" }); - sync.addPositionalArgument({ .name = "resourceId", .help = "The ID of the resource to synchronize" }); - sync.addParameter("password", { .name = "password", .help = "The password of the resource", .required = true }); - - sync.completer = &SinkshUtils::resourceCompleter; - - return Syntax::List() << sync; -} - -REGISTER_SYNTAX(SinkSync) - bool sync(const QStringList &args, State &state) { auto options = SyntaxTree::parseOptions(args); @@ -97,4 +80,19 @@ bool sync(const QStringList &args, State &state) return true; } +Syntax::List syntax() +{ + Syntax sync("sync", QObject::tr("Synchronizes a resource."), &SinkSync::sync, Syntax::EventDriven); + + sync.addPositionalArgument({ .name = "type", .help = "The type of resource to synchronize" }); + sync.addPositionalArgument({ .name = "resourceId", .help = "The ID of the resource to synchronize" }); + sync.addParameter("password", { .name = "password", .help = "The password of the resource", .required = true }); + + sync.completer = &SinkshUtils::resourceCompleter; + + return Syntax::List() << sync; +} + +REGISTER_SYNTAX(SinkSync) + } -- cgit v1.2.3