MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / sync

Method sync

src/common/settings/settings.cpp:290–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288}
289
290bool Settings::sync()
291{
292 if (!d->syncEnabled)
293 return true;
294
295 const QByteArray &json = d->toJson(d->settingData);
296 QFile file(d->settingFile);
297 if (!file.open(QFile::WriteOnly))
298 return false;
299
300 bool ok = file.write(json) == json.size();
301 if (ok)
302 d->enableSync(false);
303 file.close();
304 return ok;
305}
306
307bool Settings::isAutoSync()
308{

Callers 2

initConnectMethod · 0.45

Calls 6

enableSyncMethod · 0.80
toJsonMethod · 0.45
openMethod · 0.45
writeMethod · 0.45
sizeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected