Persist generated device serial on Ubuntu Phone

pull/634/head
Michael Zanetti 2021-08-10 16:30:25 +02:00
parent 83df1b780b
commit b27ef6cd31
1 changed files with 4 additions and 1 deletions

View File

@ -16,5 +16,8 @@ QString PlatformHelperUBPorts::platform() const
QString PlatformHelperUBPorts::deviceSerial() const
{
QSettings s;
return s.value("deviceSerial", QUuid::createUuid()).toString();
if (!s.contains("deviceSerial")) {
s.setValue("deviceSerial", QUuid::createUuid());
}
return s.value("deviceSerial").toString();
}