summaryrefslogtreecommitdiffstats
path: root/akonadish/syntax_modules/akonadi_remove.cpp
diff options
context:
space:
mode:
authorAaron Seigo <aseigo@kde.org>2015-12-25 22:45:23 +0100
committerAaron Seigo <aseigo@kde.org>2015-12-25 22:45:23 +0100
commit2a88528b15312e011a6acc0e92ecbd4766103a23 (patch)
tree9372d4695ce636e6d1425add807c5f4c39ac50f2 /akonadish/syntax_modules/akonadi_remove.cpp
parent26db899f5a12d5ba960e778ce904e279e97481d8 (diff)
downloadsink-2a88528b15312e011a6acc0e92ecbd4766103a23.tar.gz
sink-2a88528b15312e011a6acc0e92ecbd4766103a23.zip
cleanup
Diffstat (limited to 'akonadish/syntax_modules/akonadi_remove.cpp')
-rw-r--r--akonadish/syntax_modules/akonadi_remove.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/akonadish/syntax_modules/akonadi_remove.cpp b/akonadish/syntax_modules/akonadi_remove.cpp
index 5e11af3..bf09e2e 100644
--- a/akonadish/syntax_modules/akonadi_remove.cpp
+++ b/akonadish/syntax_modules/akonadi_remove.cpp
@@ -42,17 +42,17 @@ namespace AkonadiRemove
42bool remove(const QStringList &args, State &state) 42bool remove(const QStringList &args, State &state)
43{ 43{
44 if (args.isEmpty()) { 44 if (args.isEmpty()) {
45 state.printError(QObject::tr("A type is required"), "akonadicreate/02"); 45 state.printError(QObject::tr("A type is required"), "akonadi_remove/02");
46 return false; 46 return false;
47 } 47 }
48 48
49 if (args.count() < 2) { 49 if (args.count() < 2) {
50 state.printError(QObject::tr("A resource ID is required to remove items"), "akonadicreate/03"); 50 state.printError(QObject::tr("A resource ID is required to remove items"), "akonadi_remove/03");
51 return false; 51 return false;
52 } 52 }
53 53
54 if (args.count() < 3) { 54 if (args.count() < 3) {
55 state.printError(QObject::tr("An object ID is required to remove items"), "akonadicreate/03"); 55 state.printError(QObject::tr("An object ID is required to remove items"), "akonadi_remove/03");
56 return false; 56 return false;
57 } 57 }
58 58
@@ -67,7 +67,7 @@ bool remove(const QStringList &args, State &state)
67 result.waitForFinished(); 67 result.waitForFinished();
68 if (result.errorCode()) { 68 if (result.errorCode()) {
69 state.printError(QObject::tr("An error occurred while removing %1 from %1: %2").arg(identifier).arg(resourceId).arg(result.errorMessage()), 69 state.printError(QObject::tr("An error occurred while removing %1 from %1: %2").arg(identifier).arg(resourceId).arg(result.errorMessage()),
70 "akonaid_create_" + QString::number(result.errorCode())); 70 "akonaid_remove_e" + QString::number(result.errorCode()));
71 } 71 }
72 72
73 return true; 73 return true;
@@ -88,7 +88,7 @@ bool resource(const QStringList &args, State &state)
88 result.waitForFinished(); 88 result.waitForFinished();
89 if (result.errorCode()) { 89 if (result.errorCode()) {
90 state.printError(QObject::tr("An error occurred while removing the resource %1: %2").arg(resourceId).arg(result.errorMessage()), 90 state.printError(QObject::tr("An error occurred while removing the resource %1: %2").arg(resourceId).arg(result.errorMessage()),
91 "akonaid_create_" + QString::number(result.errorCode())); 91 "akonaid_remove_e" + QString::number(result.errorCode()));
92 } 92 }
93 93
94 return true; 94 return true;
@@ -99,10 +99,10 @@ Syntax::List syntax()
99{ 99{
100 Syntax::List syntax; 100 Syntax::List syntax;
101 101
102 Syntax create("remove"); 102 Syntax remove("remove", QObject::tr("Remove items in a resource"), &AkonadiRemove::remove);
103 create.children << Syntax("resource", QObject::tr("Removes a resource"), &AkonadiRemove::resource);//, Syntax::EventDriven); 103 remove.children << Syntax("resource", QObject::tr("Removes a resource"), &AkonadiRemove::resource);//, Syntax::EventDriven);
104 104
105 syntax << create; 105 syntax << remove;
106 return syntax; 106 return syntax;
107} 107}
108 108