Skip to content

Commit 70e4706

Browse files
committed
Revert "refactor: Remove never used default parameter"
This reverts commit 7d0a8f4.
1 parent 219417b commit 70e4706

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/qt/bitcoingui.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
10271027
progressBar->setToolTip(tooltip);
10281028
}
10291029

1030-
void BitcoinGUI::message(const QString& title, QString message, unsigned int style)
1030+
void BitcoinGUI::message(const QString& title, QString message, unsigned int style, bool* ret)
10311031
{
10321032
// Default title. On macOS, the window title is ignored (as required by the macOS Guidelines).
10331033
QString strTitle{PACKAGE_NAME};
@@ -1081,7 +1081,9 @@ void BitcoinGUI::message(const QString& title, QString message, unsigned int sty
10811081
showNormalIfMinimized();
10821082
QMessageBox mBox(static_cast<QMessageBox::Icon>(nMBoxIcon), strTitle, message, buttons, this);
10831083
mBox.setTextFormat(Qt::PlainText);
1084-
mBox.exec();
1084+
int r = mBox.exec();
1085+
if (ret != nullptr)
1086+
*ret = r == QMessageBox::Ok;
10851087
} else {
10861088
notificator->notify(static_cast<Notificator::Class>(nNotifyIcon), strTitle, message);
10871089
}

src/qt/bitcoingui.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,9 @@ public Q_SLOTS:
219219
@param[in] message the displayed text
220220
@param[in] style modality and style definitions (icon and used buttons - buttons only for message boxes)
221221
@see CClientUIInterface::MessageBoxFlags
222+
@param[in] ret pointer to a bool that will be modified to whether Ok was clicked (modal only)
222223
*/
223-
void message(const QString& title, QString message, unsigned int style);
224+
void message(const QString& title, QString message, unsigned int style, bool* ret = nullptr);
224225

225226
#ifdef ENABLE_WALLET
226227
void setCurrentWallet(WalletModel* wallet_model);

0 commit comments

Comments
 (0)