diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-11-15 18:52:10 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-11-15 18:52:10 +0100 |
commit | 2b2a7b9ae340e2f7273c79ebb8d6140b8fd7aa35 (patch) | |
tree | 8f254861a3f31ebc6e19a876ac1b52930c14933c | |
parent | 687edc1866bc605d793ad57f8a6aaaeb63fa4fae (diff) | |
download | rockbox-2b2a7b9ae340e2f7273c79ebb8d6140b8fd7aa35.tar.gz rockbox-2b2a7b9ae340e2f7273c79ebb8d6140b8fd7aa35.zip |
rbutil: Simplify manual download URL handling.
- Don't construct the URL directly. The ServerInfo already has it, use
that instead.
- Don't manually construct the output filename. ZipInstaller will use
the server filename automatically.
Change-Id: Ib44616daf5efc95b238418b6e699ccd56c40b011
-rw-r--r-- | rbutil/rbutilqt/gui/manualwidget.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/rbutil/rbutilqt/gui/manualwidget.cpp b/rbutil/rbutilqt/gui/manualwidget.cpp index 063facf3a1..ba8f6f6064 100644 --- a/rbutil/rbutilqt/gui/manualwidget.cpp +++ b/rbutil/rbutilqt/gui/manualwidget.cpp | |||
@@ -65,10 +65,7 @@ void ManualWidget::downloadManual(void) | |||
65 | QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) { | 65 | QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) { |
66 | return; | 66 | return; |
67 | } | 67 | } |
68 | QString manual = SystemInfo::platformValue(SystemInfo::Manual).toString(); | 68 | QString manual = ServerInfo::platformValue(ServerInfo::ManualPdfUrl).toString(); |
69 | if(manual.isEmpty()) { | ||
70 | manual = "rockbox-" + SystemInfo::platformValue(SystemInfo::BuildserverModel).toString(); | ||
71 | } | ||
72 | 69 | ||
73 | ProgressLoggerGui* logger = new ProgressLoggerGui(this); | 70 | ProgressLoggerGui* logger = new ProgressLoggerGui(this); |
74 | logger->show(); | 71 | logger->show(); |
@@ -81,13 +78,11 @@ void ManualWidget::downloadManual(void) | |||
81 | installer->setUrl(ServerInfo::platformValue( | 78 | installer->setUrl(ServerInfo::platformValue( |
82 | ServerInfo::ManualPdfUrl, m_platform).toString()); | 79 | ServerInfo::ManualPdfUrl, m_platform).toString()); |
83 | installer->setLogSection("Manual (PDF)"); | 80 | installer->setLogSection("Manual (PDF)"); |
84 | installer->setTarget("/" + manual + ".pdf"); | ||
85 | } | 81 | } |
86 | else { | 82 | else { |
87 | installer->setUrl(ServerInfo::platformValue( | 83 | installer->setUrl(ServerInfo::platformValue( |
88 | ServerInfo::ManualZipUrl, m_platform).toString()); | 84 | ServerInfo::ManualZipUrl, m_platform).toString()); |
89 | installer->setLogSection("Manual (HTML)"); | 85 | installer->setLogSection("Manual (HTML)"); |
90 | installer->setTarget("/" + manual + "-" + "-html.zip"); | ||
91 | } | 86 | } |
92 | installer->setLogVersion(); | 87 | installer->setLogVersion(); |
93 | installer->setUnzip(false); | 88 | installer->setUnzip(false); |