1
0
Fork 0
forked from len0rd/rockbox

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