aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-08-06 21:49:14 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-08-06 21:49:14 +0300
commit6a5ccd65c704253b7442b54064f5ba281c34fd26 (patch)
treeaad30deab9c06bcdab9e5b48b1428706b71e37cf
parent03826aecc56c5c5c76570805897c2ddf92e11ab6 (diff)
downloadbitcoin-6a5ccd65c704253b7442b54064f5ba281c34fd26.tar.xz
scripted-diff: Rename JoinErrors in more general MakeUnorderedList
-BEGIN VERIFY SCRIPT- sed -i -e 's/JoinErrors/MakeUnorderedList/' -- src/qt/bitcoin.cpp -END VERIFY SCRIPT-
-rw-r--r--src/qt/bitcoin.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 89b5ec6f4a..ababab31d3 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -144,7 +144,7 @@ static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTrans
QApplication::installTranslator(&translator);
}
-static std::string JoinErrors(const std::vector<std::string>& errors)
+static std::string MakeUnorderedList(const std::vector<std::string>& errors)
{
return Join(errors, "\n", [](const std::string& error) { return "- " + error; });
}
@@ -158,13 +158,13 @@ static bool InitSettings()
std::vector<std::string> errors;
if (!gArgs.ReadSettingsFile(&errors)) {
bilingual_str error = _("Settings file could not be read");
- InitError(Untranslated(strprintf("%s:\n%s\n", error.original, JoinErrors(errors))));
+ InitError(Untranslated(strprintf("%s:\n%s\n", error.original, MakeUnorderedList(errors))));
QMessageBox messagebox(QMessageBox::Critical, PACKAGE_NAME, QString::fromStdString(strprintf("%s.", error.translated)), QMessageBox::Reset | QMessageBox::Abort);
/*: Explanatory text shown on startup when the settings file cannot be read.
Prompts user to make a choice between resetting or aborting. */
messagebox.setInformativeText(QObject::tr("Do you want to reset settings to default values, or to abort without making changes?"));
- messagebox.setDetailedText(QString::fromStdString(JoinErrors(errors)));
+ messagebox.setDetailedText(QString::fromStdString(MakeUnorderedList(errors)));
messagebox.setTextFormat(Qt::PlainText);
messagebox.setDefaultButton(QMessageBox::Reset);
switch (messagebox.exec()) {
@@ -180,14 +180,14 @@ static bool InitSettings()
errors.clear();
if (!gArgs.WriteSettingsFile(&errors)) {
bilingual_str error = _("Settings file could not be written");
- InitError(Untranslated(strprintf("%s:\n%s\n", error.original, JoinErrors(errors))));
+ InitError(Untranslated(strprintf("%s:\n%s\n", error.original, MakeUnorderedList(errors))));
QMessageBox messagebox(QMessageBox::Critical, PACKAGE_NAME, QString::fromStdString(strprintf("%s.", error.translated)), QMessageBox::Ok);
/*: Explanatory text shown on startup when the settings file could not be written.
Prompts user to check that we have the ability to write to the file.
Explains that the user has the option of running without a settings file.*/
messagebox.setInformativeText(QObject::tr("A fatal error occured. Check that settings file is writable, or try running with -nosettings."));
- messagebox.setDetailedText(QString::fromStdString(JoinErrors(errors)));
+ messagebox.setDetailedText(QString::fromStdString(MakeUnorderedList(errors)));
messagebox.setTextFormat(Qt::PlainText);
messagebox.setDefaultButton(QMessageBox::Ok);
messagebox.exec();