Persist generated device serial on Ubuntu Phone

This commit is contained in:
Michael Zanetti 2021-08-10 16:30:25 +02:00
parent 83df1b780b
commit b27ef6cd31

View File

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