| 152 | } |
| 153 | |
| 154 | static bool ErrorSettingsRead(const bilingual_str& error, const std::vector<std::string>& details) |
| 155 | { |
| 156 | QMessageBox messagebox(QMessageBox::Critical, CLIENT_NAME, QString::fromStdString(strprintf("%s.", error.translated)), QMessageBox::Reset | QMessageBox::Abort); |
| 157 | /*: Explanatory text shown on startup when the settings file cannot be read. |
| 158 | Prompts user to make a choice between resetting or aborting. */ |
| 159 | messagebox.setInformativeText(QObject::tr("Do you want to reset settings to default values, or to abort without making changes?")); |
| 160 | messagebox.setDetailedText(QString::fromStdString(MakeUnorderedList(details))); |
| 161 | messagebox.setTextFormat(Qt::PlainText); |
| 162 | messagebox.setDefaultButton(QMessageBox::Reset); |
| 163 | switch (messagebox.exec()) { |
| 164 | case QMessageBox::Reset: |
| 165 | return false; |
| 166 | case QMessageBox::Abort: |
| 167 | return true; |
| 168 | default: |
| 169 | assert(false); |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | static void ErrorSettingsWrite(const bilingual_str& error, const std::vector<std::string>& details) |
| 174 | { |
nothing calls this directly
no test coverage detected