MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / uploadValue

Method uploadValue

src/sync/WizSync.cpp:343–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341}
342
343bool WizKMSync::uploadValue(const QString& strKey)
344{
345 if (!m_pDatabase)
346 return FALSE;
347
348 __int64 nLocalVersion = m_pDatabase->getLocalValueVersion(strKey);
349 if (-1 != nLocalVersion)
350 return TRUE;
351
352 QString strValue = m_pDatabase->getLocalValue(strKey);
353
354 DEBUG_TOLOG(WizFormatString1("Upload key: %1", strKey));
355 DEBUG_TOLOG(strValue);
356
357 __int64 nServerVersion = 0;
358 if (m_server.setValue(strKey, strValue, nServerVersion))
359 {
360 m_pDatabase->setLocalValueVersion(strKey, nServerVersion);
361 }
362 else
363 {
364 m_pEvents->onError(WizFormatString1("Can't upload settings: %1", strKey));
365 }
366
367 return TRUE;
368}
369
370bool WizKMSync::downloadValue(const QString& strKey)
371{

Callers

nothing calls this directly

Calls 6

WizFormatString1Function · 0.85
getLocalValueVersionMethod · 0.80
getLocalValueMethod · 0.80
setValueMethod · 0.80
setLocalValueVersionMethod · 0.80
onErrorMethod · 0.80

Tested by

no test coverage detected