mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Move helper functions around
We had a ton of helper functions in qt-gui.cpp which really didn't make much sense. So I moved them all into qthelper.cpp. Also moved the UserAgent helper that didn't belong in the UpdateHandler to begin with - that's a generic helper used in many places... With this we can successfully build using cmake again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
62999c866f
commit
ddc01e39e7
9 changed files with 405 additions and 386 deletions
|
@ -1,5 +1,6 @@
|
|||
#include "updatemanager.h"
|
||||
#include "usersurvey.h"
|
||||
#include "helpers.h"
|
||||
#include <QtNetwork>
|
||||
#include <QMessageBox>
|
||||
#include <QUuid>
|
||||
|
@ -53,7 +54,7 @@ void UpdateManager::checkForUpdates(bool automatic)
|
|||
QNetworkRequest request;
|
||||
request.setUrl(url);
|
||||
request.setRawHeader("Accept", "text/xml");
|
||||
QString userAgent = UserSurvey::getUserAgent();
|
||||
QString userAgent = getUserAgent();
|
||||
request.setRawHeader("User-Agent", userAgent.toUtf8());
|
||||
connect(SubsurfaceWebServices::manager()->get(request), SIGNAL(finished()), this, SLOT(requestReceived()), Qt::UniqueConnection);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue