forked from len0rd/rockbox
Properly reset theme file group if a checked group turned out to not include any theme information and gets skipped.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20446 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b9e07aded2
commit
5274dfd86a
1 changed files with 7 additions and 3 deletions
|
|
@ -89,13 +89,13 @@ void ThemesInstallWindow::downloadDone(bool error)
|
|||
|
||||
QSettings iniDetails(themesInfo.fileName(), QSettings::IniFormat, this);
|
||||
QStringList tl = iniDetails.childGroups();
|
||||
qDebug() << tl.size();
|
||||
qDebug() << iniDetails.value("error/code").toString()
|
||||
<< iniDetails.value("error/description").toString()
|
||||
<< iniDetails.value("error/query").toString();
|
||||
|
||||
if(error) {
|
||||
logger->addItem(tr("Network error: %1.\nPlease check your network and proxy settings.")
|
||||
logger->addItem(tr("Network error: %1.\n"
|
||||
"Please check your network and proxy settings.")
|
||||
.arg(getter->errorString()), LOGERROR);
|
||||
getter->abort();
|
||||
logger->abort();
|
||||
|
|
@ -120,7 +120,11 @@ void ThemesInstallWindow::downloadDone(bool error)
|
|||
for(int i = 0; i < tl.size(); i++) {
|
||||
iniDetails.beginGroup(tl.at(i));
|
||||
// skip all themes without name field set (i.e. error section)
|
||||
if(iniDetails.value("name").toString().isEmpty()) continue;
|
||||
if(iniDetails.value("name").toString().isEmpty()) {
|
||||
iniDetails.endGroup();
|
||||
continue;
|
||||
}
|
||||
qDebug() << "adding theme:" << tl.at(i);
|
||||
QListWidgetItem *w = new QListWidgetItem;
|
||||
w->setData(Qt::DisplayRole, iniDetails.value("name").toString());
|
||||
w->setData(Qt::UserRole, tl.at(i));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue