OTHER: Get values for keys matching RegExp
This commit is contained in:
parent
92c7c30c49
commit
c6b75de31d
3 changed files with 18 additions and 1 deletions
|
@ -48,6 +48,20 @@ XConfig::value_get (QString key)
|
|||
return m_config_cache.value (key);
|
||||
}
|
||||
|
||||
QStringList
|
||||
XConfig::values_get (QRegExp key)
|
||||
{
|
||||
QStringList ret;
|
||||
QHash < QString, QString >::ConstIterator it = m_config_cache.constBegin ();
|
||||
while (it != m_config_cache.constEnd ()) {
|
||||
if (key.exactMatch (it.key ())) {
|
||||
ret.append (it.value ());
|
||||
}
|
||||
++it;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool
|
||||
XConfig::value_set (QString key, QString val)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue