summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Seigo <aseigo@kde.org>2015-12-23 16:40:08 +0100
committerAaron Seigo <aseigo@kde.org>2015-12-23 16:40:08 +0100
commitafba02ad5fc52acf84a18f67f38b6b75267a31c0 (patch)
tree419667e0e5e53497d7af1282f3a75c860b376ceb
parenta4d438b7f5780e865c824f6e7f892bb3f0ee2b61 (diff)
downloadsink-afba02ad5fc52acf84a18f67f38b6b75267a31c0.tar.gz
sink-afba02ad5fc52acf84a18f67f38b6b75267a31c0.zip
stub in where command line tokenization will live
-rw-r--r--akonadi2_cli/module.cpp5
-rw-r--r--akonadi2_cli/module.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/akonadi2_cli/module.cpp b/akonadi2_cli/module.cpp
index 125caaa..5fd68b4 100644
--- a/akonadi2_cli/module.cpp
+++ b/akonadi2_cli/module.cpp
@@ -157,4 +157,9 @@ Module::SyntaxList Module::nearestSyntax(const QStringList &words, const QString
157 return matches; 157 return matches;
158} 158}
159 159
160QStringList Module::tokenize(const QString &text)
161{
162 //TODO: properly tokenize (e.g. "foo bar" should not become ['"foo', 'bar"']
163 return text.split(" ");
164}
160 165
diff --git a/akonadi2_cli/module.h b/akonadi2_cli/module.h
index d2745d0..1149f4f 100644
--- a/akonadi2_cli/module.h
+++ b/akonadi2_cli/module.h
@@ -59,6 +59,8 @@ public:
59 59
60 bool run(const QStringList &commands); 60 bool run(const QStringList &commands);
61 61
62 static QStringList tokenize(const QString &text);
63
62private: 64private:
63 Module(); 65 Module();
64 Command matches(const QStringList &commands) const; 66 Command matches(const QStringList &commands) const;