| 236 | #endif |
| 237 | |
| 238 | bool 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 | |
| 260 | void BitcoinApplication::createWindow(const NetworkStyle *networkStyle) |
| 261 | { |