summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/gui/manualwidget.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-09-05 22:39:47 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-09-05 22:40:15 +0200
commit4f99dd4264f9aaaccbf3da6bba37d5b2c7eb6f32 (patch)
tree4527d9a0cc4013bff7e08a87e3ee1f6fe505e8e3 /rbutil/rbutilqt/gui/manualwidget.cpp
parent05caadbca3cf3c40264e39eae96b8eed61ededab (diff)
downloadrockbox-4f99dd4264f9aaaccbf3da6bba37d5b2c7eb6f32.tar.gz
rockbox-4f99dd4264f9aaaccbf3da6bba37d5b2c7eb6f32.tar.bz2
rockbox-4f99dd4264f9aaaccbf3da6bba37d5b2c7eb6f32.zip
Fix manual URLs not getting updated properly on device change.
Change-Id: I5aaf62b5b7eb298e4d10fc8d854594dce051b2b6
Diffstat (limited to 'rbutil/rbutilqt/gui/manualwidget.cpp')
-rw-r--r--rbutil/rbutilqt/gui/manualwidget.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/rbutil/rbutilqt/gui/manualwidget.cpp b/rbutil/rbutilqt/gui/manualwidget.cpp
index 10407017c9..5bb88d1982 100644
--- a/rbutil/rbutilqt/gui/manualwidget.cpp
+++ b/rbutil/rbutilqt/gui/manualwidget.cpp
@@ -28,19 +28,21 @@ ManualWidget::ManualWidget(QWidget *parent) : QWidget(parent)
{
ui.setupUi(this);
ui.radioPdf->setChecked(true);
- platform = RbSettings::value(RbSettings::Platform).toString();
+ m_platform = RbSettings::value(RbSettings::Platform).toString();
connect(ui.buttonDownloadManual, SIGNAL(clicked()), this, SLOT(downloadManual()));
}
void ManualWidget::updateManual()
{
- if(!RbSettings::value(RbSettings::Platform).toString().isEmpty())
+ qDebug() << "[ManualWidget] updating manual URLs";
+ m_platform = RbSettings::value(RbSettings::Platform).toString();
+ if(!m_platform.isEmpty())
{
ui.labelPdfManual->setText(tr("<a href='%1'>PDF Manual</a>")
- .arg(ServerInfo::platformValue(platform, ServerInfo::ManualPdfUrl).toString()));
+ .arg(ServerInfo::platformValue(m_platform, ServerInfo::ManualPdfUrl).toString()));
ui.labelHtmlManual->setText(tr("<a href='%1'>HTML Manual (opens in browser)</a>")
- .arg(ServerInfo::platformValue(platform, ServerInfo::ManualHtmlUrl).toString()));
+ .arg(ServerInfo::platformValue(m_platform, ServerInfo::ManualHtmlUrl).toString()));
}
else {
ui.labelPdfManual->setText(tr("Select a device for a link to the correct manual"));
@@ -74,13 +76,13 @@ void ManualWidget::downloadManual(void)
installer->setCache(true);
if(ui.radioPdf->isChecked()) {
- installer->setUrl(ServerInfo::platformValue(platform,
+ installer->setUrl(ServerInfo::platformValue(m_platform,
ServerInfo::ManualPdfUrl).toString());
installer->setLogSection("Manual (PDF)");
installer->setTarget("/" + manual + ".pdf");
}
else {
- installer->setUrl(ServerInfo::platformValue(platform,
+ installer->setUrl(ServerInfo::platformValue(m_platform,
ServerInfo::ManualZipUrl).toString());
installer->setLogSection("Manual (HTML)");
installer->setTarget("/" + manual + "-" + "-html.zip");