add initial support of tag suggestion

This commit is contained in:
2016-10-24 08:12:14 +03:00
parent d520f55afc
commit 87406f70c4
6 changed files with 65 additions and 11 deletions

View File

@ -72,15 +72,21 @@ int DPAdds::currentDesktop() const
}
QStringList DPAdds::dictKeys(const bool, const QString) const
QStringList DPAdds::dictKeys(const bool sorted, const QString regexp) const
{
qCDebug(LOG_DP) << "Should be sorted" << sorted << "and filter applied"
<< regexp;
QStringList allKeys;
allKeys.append(QString("mark"));
allKeys.append(QString("name"));
allKeys.append(QString("number"));
allKeys.append(QString("total"));
return allKeys;
if (sorted)
allKeys.sort();
return allKeys.filter(QRegExp(regexp));
}