aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/updatemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/updatemanager.cpp')
-rw-r--r--qt-ui/updatemanager.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/qt-ui/updatemanager.cpp b/qt-ui/updatemanager.cpp
index f92eeb873..47554fcc5 100644
--- a/qt-ui/updatemanager.cpp
+++ b/qt-ui/updatemanager.cpp
@@ -1,4 +1,5 @@
#include "updatemanager.h"
+#include "usersurvey.h"
#include <QtNetwork>
#include <QMessageBox>
#include "subsurfacewebservices.h"
@@ -24,7 +25,12 @@ void UpdateManager::checkForUpdates()
QString version = VERSION_STRING;
QString url = QString("http://subsurface.hohndel.org/updatecheck.html?os=%1&ver=%2").arg(os, version);
- connect(SubsurfaceWebServices::manager()->get(QNetworkRequest(QUrl(url))), SIGNAL(finished()), this, SLOT(requestReceived()));
+ QNetworkRequest request;
+ request.setUrl(url);
+ request.setRawHeader("Accept", "text/xml");
+ QString userAgent = UserSurvey::getVersion().replace("\n", " ");
+ request.setRawHeader("User-Agent", userAgent.toUtf8());
+ connect(SubsurfaceWebServices::manager()->get(request), SIGNAL(finished()), this, SLOT(requestReceived()));
}
void UpdateManager::requestReceived()