Cloud storage: modify protocol for checking cloud connectivity

In order to allow the backend to match account in multi user mode, it
needs to know if the requests are coming from the same instance of
Subsurface. Since I had to change the backend to add the ability to
retrieve a location service userid I added this capability at the same
time.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-11-18 17:57:13 -08:00
parent d9ded26b86
commit d70f85ce35
6 changed files with 20 additions and 18 deletions

View file

@ -1,5 +1,6 @@
#include "updatemanager.h"
#include "helpers.h"
#include "qthelper.h"
#include <QtNetwork>
#include <QMessageBox>
#include <QUuid>
@ -60,22 +61,6 @@ void UpdateManager::checkForUpdates(bool automatic)
connect(SubsurfaceWebServices::manager()->get(request), SIGNAL(finished()), this, SLOT(requestReceived()), Qt::UniqueConnection);
}
QString UpdateManager::getUUID()
{
QString uuidString;
QSettings settings;
settings.beginGroup("UpdateManager");
if (settings.contains("UUID")) {
uuidString = settings.value("UUID").toString();
} else {
QUuid uuid = QUuid::createUuid();
uuidString = uuid.toString();
settings.setValue("UUID", uuidString);
}
uuidString.replace("{", "").replace("}", "");
return uuidString;
}
void UpdateManager::requestReceived()
{
bool haveNewVersion = false;