MCPcopy Create free account
hub / github.com/Windscribe/Desktop-App / getDeviceId

Method getDeviceId

src/client/engine/engine/getdeviceid.cpp:5–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include <QUuid>
4
5QString GetDeviceId::getDeviceId()
6{
7 QMutexLocker locker(&mutex_);
8
9 QSettings s;
10 if (s.contains("deviceId"))
11 {
12 return s.value("deviceId").toString();
13 }
14 else
15 {
16 QUuid id = QUuid::createUuid();
17 QString strId = id.toString();
18 strId = strId.remove(0, 1);
19 strId = strId.remove(strId.length() - 1, 1);
20 s.setValue("deviceId", strId);
21 return strId;
22 }
23}
24
25GetDeviceId::GetDeviceId()
26{

Callers 1

EngineMethod · 0.80

Calls 3

toStringMethod · 0.80
setValueMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected