Adapt to the new version of XML file.
This commit is contained in:
parent
9b745b0b60
commit
95466f7b4c
|
@ -331,10 +331,10 @@ void SettingsSearchPlugin::xmlElement() {
|
||||||
QStringList englishSearchResult;
|
QStringList englishSearchResult;
|
||||||
while (!node.isNull()) {
|
while (!node.isNull()) {
|
||||||
QDomElement element = node.toElement();
|
QDomElement element = node.toElement();
|
||||||
QString key = element.attribute("name");
|
QDomNodeList list = element.childNodes();
|
||||||
|
QString key = list.at(6).toElement().text();
|
||||||
chineseSearchResult = m_chineseSearchList.value(key);
|
chineseSearchResult = m_chineseSearchList.value(key);
|
||||||
englishSearchResult = m_englishSearchList.value(key);
|
englishSearchResult = m_englishSearchList.value(key);
|
||||||
QDomNodeList list = element.childNodes();
|
|
||||||
for (int i = 0; i < list.count(); ++i) {
|
for (int i = 0; i < list.count(); ++i) {
|
||||||
QDomNode n = list.at(i);
|
QDomNode n = list.at(i);
|
||||||
|
|
||||||
|
@ -346,7 +346,7 @@ void SettingsSearchPlugin::xmlElement() {
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (n.nodeName() == QString::fromLocal8Bit("ChinesePlugin")) {
|
if (n.nodeName() == QString::fromLocal8Bit("ChineseFunc1")) {
|
||||||
chineseIndex = n.toElement().text();
|
chineseIndex = n.toElement().text();
|
||||||
if (chineseIndex.isEmpty()) {
|
if (chineseIndex.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -355,7 +355,7 @@ void SettingsSearchPlugin::xmlElement() {
|
||||||
m_mixSearchList[key].insert(chineseIndex, key);
|
m_mixSearchList[key].insert(chineseIndex, key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (n.nodeName() == QString::fromLocal8Bit("ChineseFunc")) {
|
if (n.nodeName() == QString::fromLocal8Bit("ChineseFunc2")) {
|
||||||
chineseIndex = n.toElement().text();
|
chineseIndex = n.toElement().text();
|
||||||
if (chineseIndex.isEmpty()) {
|
if (chineseIndex.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -367,7 +367,7 @@ void SettingsSearchPlugin::xmlElement() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (n.nodeName() == QString::fromLocal8Bit("EnglishFunc")) {
|
if (n.nodeName() == QString::fromLocal8Bit("EnglishFunc2")) {
|
||||||
englishIndex = /*QString::fromLocal8Bit("/") + */n.toElement().text();
|
englishIndex = /*QString::fromLocal8Bit("/") + */n.toElement().text();
|
||||||
if (englishIndex.isEmpty()) {
|
if (englishIndex.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue