mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +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()
|
void CContextApplicationProxy::synchronizeLocalSettings()
|
||||||
{
|
{
|
||||||
// note this proxy method does not call synchronizeLocalSettings in core
|
// 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)
|
BlackMisc::CStatusMessage CContextApplicationProxy::saveSettings(const QString &keyPrefix)
|
||||||
|
|||||||
@@ -22,6 +22,19 @@ namespace BlackMisc
|
|||||||
m_processId(QCoreApplication::applicationPid())
|
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
|
QByteArray CIdentifier::getMachineId() const
|
||||||
{
|
{
|
||||||
return QByteArray::fromBase64(m_machineIdBase64.toLocal8Bit());
|
return QByteArray::fromBase64(m_machineIdBase64.toLocal8Bit());
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ namespace BlackMisc
|
|||||||
//! Constructor.
|
//! Constructor.
|
||||||
CIdentifier(const QString &name = QString());
|
CIdentifier(const QString &name = QString());
|
||||||
|
|
||||||
|
//! Returns an anonymous identifier.
|
||||||
|
static CIdentifier anonymous();
|
||||||
|
|
||||||
//! Name
|
//! Name
|
||||||
QString getName() const { return m_name; }
|
QString getName() const { return m_name; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user