[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [akonadi-next/feature/new_cli] akonadish/syntax_modules: error out when nothing useful is provided
From: Aaron Seigo <aseigo () kde ! org>
Date: 2015-12-25 18:49:47
Message-ID: E1aCXQx-0006Gu-Tp () scm ! kde ! org
[Download RAW message or body]
Git commit 045c47b877cd6b996eb17b91963d5e25b6707a53 by Aaron Seigo.
Committed on 25/12/2015 at 18:44.
Pushed by aseigo into branch 'feature/new_cli'.
error out when nothing useful is provided
would be nicer to autocomplete?
M +5 -0 akonadish/syntax_modules/akonadi_list.cpp
http://commits.kde.org/akonadi-next/045c47b877cd6b996eb17b91963d5e25b6707a53
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
bool list(const QStringList &args, State &state)
{
+ if (args.isEmpty()) {
+ state.printError(QObject::tr("Please provide at least one type to list (e.g. resource, .."));
+ return false;
+ }
+
auto resources = args;
auto type = !resources.isEmpty() ? resources.takeFirst() : QString();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic