mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
refs #450 Last-minute fix for settings synchronization logic.
This commit is contained in:
@@ -75,7 +75,7 @@ namespace BlackCore
|
||||
void CContextApplicationProxy::synchronizeLocalSettings()
|
||||
{
|
||||
// note this proxy method does not call synchronizeLocalSettings in core
|
||||
CSettingsCache::instance()->insertValues(this->getAllSettings());
|
||||
CSettingsCache::instance()->changeValuesFromRemote(this->getAllSettings(), CIdentifier::anonymous());
|
||||
}
|
||||
|
||||
BlackMisc::CStatusMessage CContextApplicationProxy::saveSettings(const QString &keyPrefix)
|
||||
|
||||
@@ -22,6 +22,19 @@ namespace BlackMisc
|
||||
m_processId(QCoreApplication::applicationPid())
|
||||
{ }
|
||||
|
||||
CIdentifier CIdentifier::anonymous()
|
||||
{
|
||||
static CIdentifier id;
|
||||
if (id.m_processId)
|
||||
{
|
||||
id.m_processId = 0;
|
||||
id.m_processName = "";
|
||||
id.m_machineName = "";
|
||||
id.m_machineIdBase64 = "";
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
QByteArray CIdentifier::getMachineId() const
|
||||
{
|
||||
return QByteArray::fromBase64(m_machineIdBase64.toLocal8Bit());
|
||||
|
||||
@@ -46,6 +46,9 @@ namespace BlackMisc
|
||||
//! Constructor.
|
||||
CIdentifier(const QString &name = QString());
|
||||
|
||||
//! Returns an anonymous identifier.
|
||||
static CIdentifier anonymous();
|
||||
|
||||
//! Name
|
||||
QString getName() const { return m_name; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user