Simplify manual installer setup a bit.

Change-Id: Idbef76cee2ddc6537696b5d234d9e33c4a3bd621
This commit is contained in:
Dominik Riebeling 2012-06-18 23:24:00 +02:00
parent dd79face4d
commit e9487d3551

View file

@ -66,8 +66,6 @@ void ManualWidget::downloadManual(void)
manual = "rockbox-" + SystemInfo::value(SystemInfo::CurBuildserverModel).toString();
}
QString manualurl;
ProgressLoggerGui* logger = new ProgressLoggerGui(this);
logger->show();
ZipInstaller *installer = new ZipInstaller(this);
@ -76,19 +74,18 @@ void ManualWidget::downloadManual(void)
installer->setCache(true);
if(ui.radioPdf->isChecked()) {
manualurl = ServerInfo::platformValue(platform, ServerInfo::ManualPdfUrl).toString();
installer->setUrl(ServerInfo::platformValue(platform,
ServerInfo::ManualPdfUrl).toString());
installer->setLogSection("Manual (PDF)");
installer->setTarget("/" + manual + ".pdf");
}
else {
manualurl = ServerInfo::platformValue(platform, ServerInfo::ManualZipUrl).toString();
installer->setUrl(ServerInfo::platformValue(platform,
ServerInfo::ManualZipUrl).toString());
installer->setLogSection("Manual (HTML)");
installer->setTarget("/" + manual + "-" + "-html.zip");
}
qDebug() << "[ManualWidget] Manual URL:" << manualurl;
installer->setLogVersion();
installer->setUrl(manualurl);
installer->setUnzip(false);
connect(installer, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int)));