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_livequery.cpp | 38 ++++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'sinksh/syntax_modules/sink_livequery.cpp') diff --git a/sinksh/syntax_modules/sink_livequery.cpp b/sinksh/syntax_modules/sink_livequery.cpp index 0acaaeb..2d8d5d0 100644 --- a/sinksh/syntax_modules/sink_livequery.cpp +++ b/sinksh/syntax_modules/sink_livequery.cpp @@ -38,25 +38,7 @@ namespace SinkLiveQuery { -bool livequery(const QStringList &args_, State &state); - -Syntax::List syntax() -{ - Syntax list("livequery", QObject::tr("Run a livequery."), &SinkLiveQuery::livequery, Syntax::EventDriven); - - list.addPositionalArgument({ .name = "type", .help = "The type to run the livequery on" }); - list.addParameter("resource", { .name = "resource", .help = "Filter the livequery to the given resource" }); - list.addFlag("compact", "Use a compact view (reduces the size of IDs)"); - list.addParameter("filter", { .name = "property=$value", .help = "Filter the results" }); - list.addParameter("id", { .name = "id", .help = "List only the content with the given ID" }); - list.addFlag("showall", "Show all properties"); - list.addParameter("show", { .name = "property", .help = "Only show the given property" }); - - list.completer = &SinkshUtils::resourceOrTypeCompleter; - return Syntax::List() << list; -} - -REGISTER_SYNTAX(SinkLiveQuery) +Syntax::List syntax(); bool livequery(const QStringList &args_, State &state) { @@ -141,4 +123,22 @@ bool livequery(const QStringList &args_, State &state) return false; } +Syntax::List syntax() +{ + Syntax list("livequery", QObject::tr("Run a livequery."), &SinkLiveQuery::livequery, Syntax::EventDriven); + + list.addPositionalArgument({ .name = "type", .help = "The type to run the livequery on" }); + list.addParameter("resource", { .name = "resource", .help = "Filter the livequery to the given resource" }); + list.addFlag("compact", "Use a compact view (reduces the size of IDs)"); + list.addParameter("filter", { .name = "property=$value", .help = "Filter the results" }); + list.addParameter("id", { .name = "id", .help = "List only the content with the given ID" }); + list.addFlag("showall", "Show all properties"); + list.addParameter("show", { .name = "property", .help = "Only show the given property" }); + + list.completer = &SinkshUtils::resourceOrTypeCompleter; + return Syntax::List() << list; +} + +REGISTER_SYNTAX(SinkLiveQuery) + } -- cgit v1.2.3