From afba02ad5fc52acf84a18f67f38b6b75267a31c0 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Wed, 23 Dec 2015 16:40:08 +0100 Subject: stub in where command line tokenization will live --- akonadi2_cli/module.cpp | 5 +++++ akonadi2_cli/module.h | 2 ++ 2 files changed, 7 insertions(+) (limited to 'akonadi2_cli') 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 return matches; } +QStringList Module::tokenize(const QString &text) +{ + //TODO: properly tokenize (e.g. "foo bar" should not become ['"foo', 'bar"'] + return text.split(" "); +} 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: bool run(const QStringList &commands); + static QStringList tokenize(const QString &text); + private: Module(); Command matches(const QStringList &commands) const; -- cgit v1.2.3