diff options
author | Aaron Seigo <aseigo@kde.org> | 2015-12-25 19:44:49 +0100 |
---|---|---|
committer | Aaron Seigo <aseigo@kde.org> | 2015-12-25 19:44:49 +0100 |
commit | 045c47b877cd6b996eb17b91963d5e25b6707a53 (patch) | |
tree | 2e3c9e322a4c071361045f07a980cafd327ced4a /akonadish/syntax_modules | |
parent | 02ebb2bd3c9a5d4fe224c239b2ea10e7db12ebc6 (diff) | |
download | sink-045c47b877cd6b996eb17b91963d5e25b6707a53.tar.gz sink-045c47b877cd6b996eb17b91963d5e25b6707a53.zip |
error out when nothing useful is provided
would be nicer to autocomplete?
Diffstat (limited to 'akonadish/syntax_modules')
-rw-r--r-- | akonadish/syntax_modules/akonadi_list.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/akonadish/syntax_modules/akonadi_list.cpp b/akonadish/syntax_modules/akonadi_list.cpp index 25ccabf..807119c 100644 --- a/akonadish/syntax_modules/akonadi_list.cpp +++ b/akonadish/syntax_modules/akonadi_list.cpp | |||
@@ -41,6 +41,11 @@ namespace AkonadiList | |||
41 | 41 | ||
42 | bool list(const QStringList &args, State &state) | 42 | bool list(const QStringList &args, State &state) |
43 | { | 43 | { |
44 | if (args.isEmpty()) { | ||
45 | state.printError(QObject::tr("Please provide at least one type to list (e.g. resource, ..")); | ||
46 | return false; | ||
47 | } | ||
48 | |||
44 | auto resources = args; | 49 | auto resources = args; |
45 | auto type = !resources.isEmpty() ? resources.takeFirst() : QString(); | 50 | auto type = !resources.isEmpty() ? resources.takeFirst() : QString(); |
46 | 51 | ||