summaryrefslogtreecommitdiffstats
path: root/akonadish/syntax_modules/core_syntax.cpp
diff options
context:
space:
mode:
authorAaron Seigo <aseigo@kde.org>2015-12-25 11:01:01 +0100
committerAaron Seigo <aseigo@kde.org>2015-12-25 11:01:01 +0100
commit540864148b9bccc4b00bb3ba504190d608489413 (patch)
tree2f1446f69feb7f9d29eac35ef26f670e68d2a65e /akonadish/syntax_modules/core_syntax.cpp
parent1231996ec2668e330ead79a16edf85ded1e07e48 (diff)
downloadsink-540864148b9bccc4b00bb3ba504190d608489413.tar.gz
sink-540864148b9bccc4b00bb3ba504190d608489413.zip
don't translate the commands; let them be scriptable universally
Diffstat (limited to 'akonadish/syntax_modules/core_syntax.cpp')
-rw-r--r--akonadish/syntax_modules/core_syntax.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/akonadish/syntax_modules/core_syntax.cpp b/akonadish/syntax_modules/core_syntax.cpp
index 8f3219f..31b824a 100644
--- a/akonadish/syntax_modules/core_syntax.cpp
+++ b/akonadish/syntax_modules/core_syntax.cpp
@@ -150,23 +150,23 @@ Syntax::List syntax()
150 Syntax::List syntax; 150 Syntax::List syntax;
151 syntax << Syntax("exit", QObject::tr("Exits the application. Ctrl-d also works!"), &CoreSyntax::exit); 151 syntax << Syntax("exit", QObject::tr("Exits the application. Ctrl-d also works!"), &CoreSyntax::exit);
152 152
153 Syntax help(QObject::tr("help"), QObject::tr("Print command information: help [command]"), &CoreSyntax::showHelp); 153 Syntax help("help", QObject::tr("Print command information: help [command]"), &CoreSyntax::showHelp);
154 help.completer = &CoreSyntax::showHelpCompleter; 154 help.completer = &CoreSyntax::showHelpCompleter;
155 syntax << help; 155 syntax << help;
156 156
157 syntax << Syntax("syntaxtree", QString(), &printSyntaxTree); 157 syntax << Syntax("syntaxtree", QString(), &printSyntaxTree);
158 158
159 Syntax set(QObject::tr("set"), QObject::tr("Sets settings for the session")); 159 Syntax set("set", QObject::tr("Sets settings for the session"));
160 set.children << Syntax(QObject::tr("debug"), QObject::tr("Set the debug level from 0 to 6"), &CoreSyntax::setDebugLevel); 160 set.children << Syntax("debug", QObject::tr("Set the debug level from 0 to 6"), &CoreSyntax::setDebugLevel);
161 Syntax setTiming = Syntax(QObject::tr("timing"), QObject::tr("Whether or not to print the time commands take to complete")); 161 Syntax setTiming = Syntax("timing", QObject::tr("Whether or not to print the time commands take to complete"));
162 setTiming.children << Syntax(QObject::tr("on"), QString(), [](const QStringList &, State &state) -> bool { state.setCommandTiming(true); return true; }); 162 setTiming.children << Syntax("on", QString(), [](const QStringList &, State &state) -> bool { state.setCommandTiming(true); return true; });
163 setTiming.children << Syntax(QObject::tr("off"), QString(), [](const QStringList &, State &state) -> bool { state.setCommandTiming(false); return true; }); 163 setTiming.children << Syntax("off", QString(), [](const QStringList &, State &state) -> bool { state.setCommandTiming(false); return true; });
164 set.children << setTiming; 164 set.children << setTiming;
165 syntax << set; 165 syntax << set;
166 166
167 Syntax get(QObject::tr("get"), QObject::tr("Gets settings for the session")); 167 Syntax get("get", QObject::tr("Gets settings for the session"));
168 get.children << Syntax(QObject::tr("debug"), QObject::tr("The current debug level from 0 to 6"), &CoreSyntax::printDebugLevel); 168 get.children << Syntax("debug", QObject::tr("The current debug level from 0 to 6"), &CoreSyntax::printDebugLevel);
169 get.children << Syntax(QObject::tr("timing"), QObject::tr("Whether or not to print the time commands take to complete"), &CoreSyntax::printCommandTiming); 169 get.children << Syntax("timing", QObject::tr("Whether or not to print the time commands take to complete"), &CoreSyntax::printCommandTiming);
170 syntax << get; 170 syntax << get;
171 171
172 return syntax; 172 return syntax;