initial implementation of custom keys

This commit is contained in:
2017-07-07 00:52:16 +03:00
parent 1a7530a847
commit 7a00dce7c5
14 changed files with 264 additions and 63 deletions

View File

@ -86,6 +86,7 @@ bool AWKeyCache::addKeyToCache(const QString &_type, const QString &_key)
QStringList AWKeyCache::getRequiredKeys(const QStringList &_keys,
const QStringList &_bars,
const QVariantMap &_tooltip,
const QStringList &_userKeys,
const QStringList &_allKeys)
{
qCDebug(LOG_AW) << "Looking for required keys in" << _keys << _bars
@ -94,6 +95,7 @@ QStringList AWKeyCache::getRequiredKeys(const QStringList &_keys,
// initial copy
QSet<QString> used = QSet<QString>::fromList(_keys);
used.unite(QSet<QString>::fromList(_bars));
used.unite(QSet<QString>::fromList(_userKeys));
// insert keys from tooltip
for (auto &key : _tooltip.keys()) {
if ((key.endsWith("Tooltip")) && (_tooltip[key].toBool())) {