| 281 | } |
| 282 | |
| 283 | void OptionsModel::SetPruneEnabled(bool prune, bool force) |
| 284 | { |
| 285 | QSettings settings; |
| 286 | settings.setValue("bPrune", prune); |
| 287 | const int64_t prune_target_mib = PruneGBtoMiB(settings.value("nPruneSize").toInt()); |
| 288 | std::string prune_val = prune ? ToString(prune_target_mib) : "0"; |
| 289 | if (force) { |
| 290 | gArgs.ForceSetArg("-prune", prune_val); |
| 291 | return; |
| 292 | } |
| 293 | if (!gArgs.SoftSetArg("-prune", prune_val)) { |
| 294 | addOverriddenOption("-prune"); |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | void OptionsModel::SetPruneTargetGB(int prune_target_gb, bool force) |
| 299 | { |
nothing calls this directly
no test coverage detected