diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2009-03-22 08:33:49 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2009-03-22 08:33:49 +0000 |
commit | 5274dfd86aaaf1312485aff46cb2eb9caae9b8ea (patch) | |
tree | 40ed0841691233c460227388169ec21538deb981 /rbutil/rbutilqt | |
parent | b9e07aded2357dbfca3e83ce5e86881135e454d0 (diff) | |
download | rockbox-5274dfd86aaaf1312485aff46cb2eb9caae9b8ea.tar.gz rockbox-5274dfd86aaaf1312485aff46cb2eb9caae9b8ea.zip |
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
Diffstat (limited to 'rbutil/rbutilqt')
-rw-r--r-- | rbutil/rbutilqt/installthemes.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/rbutil/rbutilqt/installthemes.cpp b/rbutil/rbutilqt/installthemes.cpp index 6e15ae0b51..7dd765627b 100644 --- a/rbutil/rbutilqt/installthemes.cpp +++ b/rbutil/rbutilqt/installthemes.cpp | |||
@@ -89,13 +89,13 @@ void ThemesInstallWindow::downloadDone(bool error) | |||
89 | 89 | ||
90 | QSettings iniDetails(themesInfo.fileName(), QSettings::IniFormat, this); | 90 | QSettings iniDetails(themesInfo.fileName(), QSettings::IniFormat, this); |
91 | QStringList tl = iniDetails.childGroups(); | 91 | QStringList tl = iniDetails.childGroups(); |
92 | qDebug() << tl.size(); | ||
93 | qDebug() << iniDetails.value("error/code").toString() | 92 | qDebug() << iniDetails.value("error/code").toString() |
94 | << iniDetails.value("error/description").toString() | 93 | << iniDetails.value("error/description").toString() |
95 | << iniDetails.value("error/query").toString(); | 94 | << iniDetails.value("error/query").toString(); |
96 | 95 | ||
97 | if(error) { | 96 | if(error) { |
98 | logger->addItem(tr("Network error: %1.\nPlease check your network and proxy settings.") | 97 | logger->addItem(tr("Network error: %1.\n" |
98 | "Please check your network and proxy settings.") | ||
99 | .arg(getter->errorString()), LOGERROR); | 99 | .arg(getter->errorString()), LOGERROR); |
100 | getter->abort(); | 100 | getter->abort(); |
101 | logger->abort(); | 101 | logger->abort(); |
@@ -120,7 +120,11 @@ void ThemesInstallWindow::downloadDone(bool error) | |||
120 | for(int i = 0; i < tl.size(); i++) { | 120 | for(int i = 0; i < tl.size(); i++) { |
121 | iniDetails.beginGroup(tl.at(i)); | 121 | iniDetails.beginGroup(tl.at(i)); |
122 | // skip all themes without name field set (i.e. error section) | 122 | // skip all themes without name field set (i.e. error section) |
123 | if(iniDetails.value("name").toString().isEmpty()) continue; | 123 | if(iniDetails.value("name").toString().isEmpty()) { |
124 | iniDetails.endGroup(); | ||
125 | continue; | ||
126 | } | ||
127 | qDebug() << "adding theme:" << tl.at(i); | ||
124 | QListWidgetItem *w = new QListWidgetItem; | 128 | QListWidgetItem *w = new QListWidgetItem; |
125 | w->setData(Qt::DisplayRole, iniDetails.value("name").toString()); | 129 | w->setData(Qt::DisplayRole, iniDetails.value("name").toString()); |
126 | w->setData(Qt::UserRole, tl.at(i)); | 130 | w->setData(Qt::UserRole, tl.at(i)); |