diff options
author | Aaron Seigo <aseigo@kde.org> | 2015-12-23 20:31:25 +0100 |
---|---|---|
committer | Aaron Seigo <aseigo@kde.org> | 2015-12-23 20:31:25 +0100 |
commit | 5e9c1172ca196bdc8bcdc842e54efc5a74908fff (patch) | |
tree | 102ecf6f74bd94e0c8eaf09acc3006b241d49135 /akonadi2_cli/syntax_modules | |
parent | 26c510ace968af7d4c82c1f192bc8cdcb3505910 (diff) | |
download | sink-5e9c1172ca196bdc8bcdc842e54efc5a74908fff.tar.gz sink-5e9c1172ca196bdc8bcdc842e54efc5a74908fff.zip |
move Syntax out of SyntraxTree
Diffstat (limited to 'akonadi2_cli/syntax_modules')
-rw-r--r-- | akonadi2_cli/syntax_modules/akonadi_list.cpp | 2 | ||||
-rw-r--r-- | akonadi2_cli/syntax_modules/core_syntax.cpp | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/akonadi2_cli/syntax_modules/akonadi_list.cpp b/akonadi2_cli/syntax_modules/akonadi_list.cpp index 26b1f1e..62824ee 100644 --- a/akonadi2_cli/syntax_modules/akonadi_list.cpp +++ b/akonadi2_cli/syntax_modules/akonadi_list.cpp | |||
@@ -42,7 +42,7 @@ namespace AkonadiList | |||
42 | SyntaxTree::SyntaxList syntax() | 42 | SyntaxTree::SyntaxList syntax() |
43 | { | 43 | { |
44 | SyntaxTree::SyntaxList syntax; | 44 | SyntaxTree::SyntaxList syntax; |
45 | syntax << SyntaxTree::Syntax("list", QObject::tr("List all resources, or the contents of one or more resources"), &AkonadiList::list, SyntaxTree::Syntax::EventDriven); | 45 | syntax << Syntax("list", QObject::tr("List all resources, or the contents of one or more resources"), &AkonadiList::list, Syntax::EventDriven); |
46 | 46 | ||
47 | return syntax; | 47 | return syntax; |
48 | } | 48 | } |
diff --git a/akonadi2_cli/syntax_modules/core_syntax.cpp b/akonadi2_cli/syntax_modules/core_syntax.cpp index f9cd622..1231e29 100644 --- a/akonadi2_cli/syntax_modules/core_syntax.cpp +++ b/akonadi2_cli/syntax_modules/core_syntax.cpp | |||
@@ -30,15 +30,15 @@ namespace CoreSyntax | |||
30 | SyntaxTree::SyntaxList syntax() | 30 | SyntaxTree::SyntaxList syntax() |
31 | { | 31 | { |
32 | SyntaxTree::SyntaxList syntax; | 32 | SyntaxTree::SyntaxList syntax; |
33 | syntax << SyntaxTree::Syntax("exit", QObject::tr("Exits the application. Ctrl-d also works!"), &CoreSyntax::exit); | 33 | syntax << Syntax("exit", QObject::tr("Exits the application. Ctrl-d also works!"), &CoreSyntax::exit); |
34 | syntax << SyntaxTree::Syntax(QObject::tr("help"), QObject::tr("Print command information: help [command]"), &CoreSyntax::showHelp); | 34 | syntax << Syntax(QObject::tr("help"), QObject::tr("Print command information: help [command]"), &CoreSyntax::showHelp); |
35 | 35 | ||
36 | SyntaxTree::Syntax set(QObject::tr("set"), QObject::tr("Sets settings for the session")); | 36 | Syntax set(QObject::tr("set"), QObject::tr("Sets settings for the session")); |
37 | set.children << SyntaxTree::Syntax(QObject::tr("debug"), QObject::tr("Set the debug level from 0 to 6"), &CoreSyntax::setDebugLevel); | 37 | set.children << Syntax(QObject::tr("debug"), QObject::tr("Set the debug level from 0 to 6"), &CoreSyntax::setDebugLevel); |
38 | syntax << set; | 38 | syntax << set; |
39 | 39 | ||
40 | SyntaxTree::Syntax get(QObject::tr("get"), QObject::tr("Gets settings for the session")); | 40 | Syntax get(QObject::tr("get"), QObject::tr("Gets settings for the session")); |
41 | get.children << SyntaxTree::Syntax(QObject::tr("debug"), QObject::tr("Set the debug level from 0 to 6"), &CoreSyntax::printDebugLevel); | 41 | get.children << Syntax(QObject::tr("debug"), QObject::tr("Set the debug level from 0 to 6"), &CoreSyntax::printDebugLevel); |
42 | syntax << get; | 42 | syntax << get; |
43 | 43 | ||
44 | return syntax; | 44 | return syntax; |
@@ -65,7 +65,7 @@ bool showHelp(const QStringList &commands, State &state) | |||
65 | for (auto keyword: sorted) { | 65 | for (auto keyword: sorted) { |
66 | state.printLine(keyword, 1); | 66 | state.printLine(keyword, 1); |
67 | } | 67 | } |
68 | } else if (const SyntaxTree::Syntax *syntax = command.first) { | 68 | } else if (const Syntax *syntax = command.first) { |
69 | //TODO: get parent! | 69 | //TODO: get parent! |
70 | state.print(QObject::tr("Command `%1`").arg(syntax->keyword)); | 70 | state.print(QObject::tr("Command `%1`").arg(syntax->keyword)); |
71 | 71 | ||