make it easy to get at items and values by name
svn path=/trunk/KDE/kdelibs/; revision=906335
This commit is contained in:
parent
102cd88d29
commit
cf32d4770d
@ -387,6 +387,22 @@ KConfigSkeletonItem *ConfigLoader::findItem(const QString &group, const QString
|
||||
return KConfigSkeleton::findItem(d->keysToNames[group + key]);
|
||||
}
|
||||
|
||||
KConfigSkeletonItem *ConfigLoader::findItemByName(const QString &name)
|
||||
{
|
||||
return KConfigSkeleton::findItem(name);
|
||||
}
|
||||
|
||||
QVariant ConfigLoader::property(const QString &name)
|
||||
{
|
||||
KConfigSkeletonItem *item = KConfigSkeleton::findItem(name);
|
||||
|
||||
if (item) {
|
||||
return item->property();
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
bool ConfigLoader::hasGroup(const QString &group) const
|
||||
{
|
||||
return d->groups.contains(group);
|
||||
|
@ -115,6 +115,16 @@ public:
|
||||
*/
|
||||
KConfigSkeletonItem *findItem(const QString &group, const QString &key);
|
||||
|
||||
/**
|
||||
* Finds an item by its name
|
||||
*/
|
||||
KConfigSkeletonItem *findItemByName(const QString &name);
|
||||
|
||||
/**
|
||||
* Returns the property (variantized value) of the named item
|
||||
*/
|
||||
QVariant property(const QString &name);
|
||||
|
||||
/**
|
||||
* Check to see if a group exists
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user