diff options
author | Aaron Seigo <aseigo@kde.org> | 2015-12-23 16:40:08 +0100 |
---|---|---|
committer | Aaron Seigo <aseigo@kde.org> | 2015-12-23 16:40:08 +0100 |
commit | afba02ad5fc52acf84a18f67f38b6b75267a31c0 (patch) | |
tree | 419667e0e5e53497d7af1282f3a75c860b376ceb | |
parent | a4d438b7f5780e865c824f6e7f892bb3f0ee2b61 (diff) | |
download | sink-afba02ad5fc52acf84a18f67f38b6b75267a31c0.tar.gz sink-afba02ad5fc52acf84a18f67f38b6b75267a31c0.zip |
stub in where command line tokenization will live
-rw-r--r-- | akonadi2_cli/module.cpp | 5 | ||||
-rw-r--r-- | akonadi2_cli/module.h | 2 |
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 | ||
160 | QStringList 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 | |||
62 | private: | 64 | private: |
63 | Module(); | 65 | Module(); |
64 | Command matches(const QStringList &commands) const; | 66 | Command matches(const QStringList &commands) const; |