diff options
Diffstat (limited to 'akonadish/akonadish_utils.cpp')
-rw-r--r-- | akonadish/akonadish_utils.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/akonadish/akonadish_utils.cpp b/akonadish/akonadish_utils.cpp index bfb72ca..ffbdcb3 100644 --- a/akonadish/akonadish_utils.cpp +++ b/akonadish/akonadish_utils.cpp | |||
@@ -70,5 +70,17 @@ QSharedPointer<QAbstractItemModel> loadModel(const QString &type, Akonadi2::Quer | |||
70 | return model; | 70 | return model; |
71 | } | 71 | } |
72 | 72 | ||
73 | QMap<QString, QString> keyValueMapFromArgs(const QStringList &args) | ||
74 | { | ||
75 | //TODO: this is not the most clever of algorithms. preserved during the port of commands | ||
76 | // from akonadi2_client ... we can probably do better, however ;) | ||
77 | QMap<QString, QString> map; | ||
78 | for (int i = 0; i + 2 <= args.size(); i += 2) { | ||
79 | map.insert(args.at(i), args.at(i + 1)); | ||
80 | } | ||
81 | |||
82 | return map; | ||
83 | } | ||
84 | |||
73 | } | 85 | } |
74 | 86 | ||