if name doesn't exist, try to get it from key
svn path=/trunk/KDE/kdelibs/; revision=922727
This commit is contained in:
parent
1eb7e181bc
commit
3ba464e1c3
@ -112,11 +112,11 @@ bool ConfigLoaderHandler::startElement(const QString &namespaceURI, const QStrin
|
||||
for (int i = 0; i < numAttrs; ++i) {
|
||||
QString name = attrs.localName(i).toLower();
|
||||
if (name == "name") {
|
||||
m_name = attrs.value(i);
|
||||
m_name = attrs.value(i).trimmed();
|
||||
} else if (name == "type") {
|
||||
m_type = attrs.value(i).toLower();
|
||||
} else if (name == "key") {
|
||||
m_key = attrs.value(i);
|
||||
m_key = attrs.value(i).trimmed();
|
||||
}
|
||||
}
|
||||
} else if (tag == "choice") {
|
||||
@ -182,9 +182,15 @@ bool ConfigLoaderHandler::endElement(const QString &namespaceURI,
|
||||
void ConfigLoaderHandler::addItem()
|
||||
{
|
||||
if (m_name.isEmpty()) {
|
||||
if (m_key.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_name = m_key;
|
||||
}
|
||||
|
||||
m_name.remove(' ');
|
||||
|
||||
KConfigSkeletonItem *item = 0;
|
||||
|
||||
if (m_type == "bool") {
|
||||
|
Loading…
Reference in New Issue
Block a user