set the key from name if empty
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=862370
This commit is contained in:
parent
f505d063e7
commit
f7314fde0c
@ -350,12 +350,12 @@ void ConfigXmlHandler::addItem()
|
|||||||
item = m_config->addItemDateTime(m_name, *d->newDateTime(),
|
item = m_config->addItemDateTime(m_name, *d->newDateTime(),
|
||||||
QDateTime::fromString(m_default), m_key);
|
QDateTime::fromString(m_default), m_key);
|
||||||
} else if (m_type == "enum") {
|
} else if (m_type == "enum") {
|
||||||
|
m_key = (m_key.isEmpty()) ? m_name : m_key;
|
||||||
KConfigSkeleton::ItemEnum* enumItem =
|
KConfigSkeleton::ItemEnum* enumItem =
|
||||||
new KConfigSkeleton::ItemEnum(m_config->currentGroup(),
|
new KConfigSkeleton::ItemEnum(m_config->currentGroup(),
|
||||||
m_key, *d->newInt(),
|
m_key, *d->newInt(),
|
||||||
m_enumChoices,
|
m_enumChoices,
|
||||||
m_default.toUInt());
|
m_default.toUInt());
|
||||||
enumItem->setName(m_name);
|
|
||||||
m_config->addItem(enumItem, m_name);
|
m_config->addItem(enumItem, m_name);
|
||||||
item = enumItem;
|
item = enumItem;
|
||||||
} else if (m_type == "font") {
|
} else if (m_type == "font") {
|
||||||
@ -395,11 +395,11 @@ void ConfigXmlHandler::addItem()
|
|||||||
}
|
}
|
||||||
item = uintItem;
|
item = uintItem;
|
||||||
} else if (m_type == "url") {
|
} else if (m_type == "url") {
|
||||||
|
m_key = (m_key.isEmpty()) ? m_name : m_key;
|
||||||
KConfigSkeleton::ItemUrl* urlItem =
|
KConfigSkeleton::ItemUrl* urlItem =
|
||||||
new KConfigSkeleton::ItemUrl(m_config->currentGroup(),
|
new KConfigSkeleton::ItemUrl(m_config->currentGroup(),
|
||||||
m_key, *d->newUrl(),
|
m_key, *d->newUrl(),
|
||||||
m_default);
|
m_default);
|
||||||
urlItem->setName(m_name);
|
|
||||||
m_config->addItem(urlItem, m_name);
|
m_config->addItem(urlItem, m_name);
|
||||||
item = urlItem;
|
item = urlItem;
|
||||||
} else if (m_type == "double") {
|
} else if (m_type == "double") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user