From 73ffbdebe49cc3c4eb28ccf6e632792227a59db3 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 25 Jan 2015 22:19:05 -0800 Subject: Changing the way we tell Linux users about new versions We no longer encourage people to check with their OS vendor. We want them to check our download page. Signed-off-by: Dirk Hohndel --- qt-ui/updatemanager.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/updatemanager.cpp b/qt-ui/updatemanager.cpp index 35e47441a..ba10fd46b 100644 --- a/qt-ui/updatemanager.cpp +++ b/qt-ui/updatemanager.cpp @@ -88,30 +88,25 @@ void UpdateManager::requestReceived() + "

" + tr("Please check your internet connection.") + ""; } else { //No network error - QString response(reply->readAll()); - QString responseBody; - if (response.contains('"')) - responseBody = response.split("\"").at(1); - else - responseBody = response; + QString responseBody(reply->readAll()); + QString responseLink; + if (responseBody.contains('"')) + responseLink = responseBody.split("\"").at(1); msgbox.setIcon(QMessageBox::Information); - if (responseBody == "OK") { msgText = tr("You are using the latest version of Subsurface."); - } else if (responseBody.startsWith("http")) { + } else if (responseBody.startsWith("[\"http")) { haveNewVersion = true; msgText = tr("A new version of Subsurface is available.
Click on:
%1
to download it.") - .arg(responseBody); + .arg(responseLink); } else if (responseBody.startsWith("Latest version")) { // the webservice backend doesn't localize - but it's easy enough to just replace the // strings that it is likely to send back haveNewVersion = true; - responseBody.replace("Latest version is ", ""); - responseBody.replace(". please check with your OS vendor for updates.", ""); msgText = QString("") + tr("A new version of Subsurface is available.") + QString("

") + - tr("Latest version is %1, please check with your OS vendor for updates.") - .arg(responseBody); + tr("Latest version is %1, please check %2 our download page %3 for information in how to update.") + .arg(responseLink).arg("").arg(""); } else { // the webservice backend doesn't localize - but it's easy enough to just replace the // strings that it is likely to send back -- cgit v1.2.3-70-g09d2