| 341 | } |
| 342 | |
| 343 | bool 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 | |
| 370 | bool WizKMSync::downloadValue(const QString& strKey) |
| 371 | { |
nothing calls this directly
no test coverage detected