@@ -144,7 +144,7 @@ static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTrans
144
144
QApplication::installTranslator (&translator);
145
145
}
146
146
147
- static std::string JoinErrors (const std::vector<std::string>& errors)
147
+ static std::string MakeUnorderedList (const std::vector<std::string>& errors)
148
148
{
149
149
return Join (errors, " \n " , [](const std::string& error) { return " - " + error; });
150
150
}
@@ -158,13 +158,13 @@ static bool InitSettings()
158
158
std::vector<std::string> errors;
159
159
if (!gArgs .ReadSettingsFile (&errors)) {
160
160
bilingual_str error = _ (" Settings file could not be read" );
161
- InitError (Untranslated (strprintf (" %s:\n %s\n " , error.original , JoinErrors (errors))));
161
+ InitError (Untranslated (strprintf (" %s:\n %s\n " , error.original , MakeUnorderedList (errors))));
162
162
163
163
QMessageBox messagebox (QMessageBox::Critical, PACKAGE_NAME, QString::fromStdString (strprintf (" %s." , error.translated )), QMessageBox::Reset | QMessageBox::Abort);
164
164
/* : Explanatory text shown on startup when the settings file cannot be read.
165
165
Prompts user to make a choice between resetting or aborting. */
166
166
messagebox.setInformativeText (QObject::tr (" Do you want to reset settings to default values, or to abort without making changes?" ));
167
- messagebox.setDetailedText (QString::fromStdString (JoinErrors (errors)));
167
+ messagebox.setDetailedText (QString::fromStdString (MakeUnorderedList (errors)));
168
168
messagebox.setTextFormat (Qt::PlainText);
169
169
messagebox.setDefaultButton (QMessageBox::Reset);
170
170
switch (messagebox.exec ()) {
@@ -180,14 +180,14 @@ static bool InitSettings()
180
180
errors.clear ();
181
181
if (!gArgs .WriteSettingsFile (&errors)) {
182
182
bilingual_str error = _ (" Settings file could not be written" );
183
- InitError (Untranslated (strprintf (" %s:\n %s\n " , error.original , JoinErrors (errors))));
183
+ InitError (Untranslated (strprintf (" %s:\n %s\n " , error.original , MakeUnorderedList (errors))));
184
184
185
185
QMessageBox messagebox (QMessageBox::Critical, PACKAGE_NAME, QString::fromStdString (strprintf (" %s." , error.translated )), QMessageBox::Ok);
186
186
/* : Explanatory text shown on startup when the settings file could not be written.
187
187
Prompts user to check that we have the ability to write to the file.
188
188
Explains that the user has the option of running without a settings file.*/
189
189
messagebox.setInformativeText (QObject::tr (" A fatal error occured. Check that settings file is writable, or try running with -nosettings." ));
190
- messagebox.setDetailedText (QString::fromStdString (JoinErrors (errors)));
190
+ messagebox.setDetailedText (QString::fromStdString (MakeUnorderedList (errors)));
191
191
messagebox.setTextFormat (Qt::PlainText);
192
192
messagebox.setDefaultButton (QMessageBox::Ok);
193
193
messagebox.exec ();
0 commit comments