Merge #18927: Pass bilingual_str argument to AbortNode()

5527be0627 refactor: Add AbortError alias (Hennadii Stepanov)
d924f2a596 Drop MSG_NOPREFIX flag (Hennadii Stepanov)
083daf7fba Pass bilingual_str argument to AbortNode() (Hennadii Stepanov)
d1cca129b4 refactor: Use bilingual_str::empty() (Hennadii Stepanov)

Pull request description:

  This PR is a [followup](https://github.com/bitcoin/bitcoin/issues/16218#issuecomment-625919724) of #16224, and it adds `bilingual_str` type argument support to the `AbortNode()` functions.

ACKs for top commit:
  MarcoFalke:
    ACK 5527be0627 👟

Tree-SHA512: bf8b15b14912b1f672e6e588fffa1e6eb6f00b4b23d15d0ced7f18fbdf76919244427feb7217007fe29617049308e13def893a03a87358db819cca9692f59905
This commit is contained in:
MarcoFalke
2020-06-16 08:52:54 -04:00
5 changed files with 28 additions and 38 deletions

View File

@@ -1069,9 +1069,6 @@ void BitcoinGUI::message(const QString& title, QString message, unsigned int sty
int nMBoxIcon = QMessageBox::Information;
int nNotifyIcon = Notificator::Information;
bool prefix = !(style & CClientUIInterface::MSG_NOPREFIX);
style &= ~CClientUIInterface::MSG_NOPREFIX;
QString msgType;
if (!title.isEmpty()) {
msgType = title;
@@ -1079,11 +1076,11 @@ void BitcoinGUI::message(const QString& title, QString message, unsigned int sty
switch (style) {
case CClientUIInterface::MSG_ERROR:
msgType = tr("Error");
if (prefix) message = tr("Error: %1").arg(message);
message = tr("Error: %1").arg(message);
break;
case CClientUIInterface::MSG_WARNING:
msgType = tr("Warning");
if (prefix) message = tr("Warning: %1").arg(message);
message = tr("Warning: %1").arg(message);
break;
case CClientUIInterface::MSG_INFORMATION:
msgType = tr("Information");