MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / createOptionsModel

Method createOptionsModel

src/qt/bitcoin.cpp:238–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236#endif
237
238bool BitcoinApplication::createOptionsModel(bool resetSettings)
239{
240 optionsModel = new OptionsModel(node(), this);
241 if (resetSettings) {
242 optionsModel->Reset();
243 }
244 bilingual_str error;
245 if (!optionsModel->Init(error)) {
246 fs::path settings_path;
247 if (gArgs.GetSettingsPath(&settings_path)) {
248 error += Untranslated("\n");
249 std::string quoted_path = strprintf("%s", fs::quoted(fs::PathToString(settings_path)));
250 error.original += strprintf("Settings file %s might be corrupt or invalid.", quoted_path);
251 error.translated += tr("Settings file %1 might be corrupt or invalid.").arg(QString::fromStdString(quoted_path)).toStdString();
252 }
253 InitError(error);
254 QMessageBox::critical(nullptr, CLIENT_NAME, QString::fromStdString(error.translated));
255 return false;
256 }
257 return true;
258}
259
260void BitcoinApplication::createWindow(const NetworkStyle *networkStyle)
261{

Callers 2

GuiMainFunction · 0.80
appTestsMethod · 0.80

Calls 7

UntranslatedFunction · 0.85
quotedFunction · 0.85
PathToStringFunction · 0.85
InitErrorFunction · 0.85
GetSettingsPathMethod · 0.80
ResetMethod · 0.45
InitMethod · 0.45

Tested by 1

appTestsMethod · 0.64