Skip to content

Commit 702a243

Browse files
committed
scripted-diff: Rename ShowModalDialogAndDeleteOnClose
-BEGIN VERIFY SCRIPT- sed -i 's/ShowModalDialogAndDeleteOnClose/ShowModalDialogAsynchronously/' -- $(git grep -l -e "ShowModalDialogAndDeleteOnClose") -END VERIFY SCRIPT- It is important to highlight that a modal dialog is showed asynchronously as there are cases when the synchronous QDialog::exec() is required.
1 parent f406f3b commit 702a243

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

src/qt/addressbookpage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ void AddressBookPage::onEditAction()
189189
dlg->setModel(model);
190190
QModelIndex origIndex = proxyModel->mapToSource(indexes.at(0));
191191
dlg->loadRow(origIndex.row());
192-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
192+
GUIUtil::ShowModalDialogAsynchronously(dlg);
193193
}
194194

195195
void AddressBookPage::on_newAddress_clicked()

src/qt/bitcoingui.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ void BitcoinGUI::aboutClicked()
856856
return;
857857

858858
auto dlg = new HelpMessageDialog(this, /* about */ true);
859-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
859+
GUIUtil::ShowModalDialogAsynchronously(dlg);
860860
}
861861

862862
void BitcoinGUI::showDebugWindow()
@@ -1001,7 +1001,7 @@ void BitcoinGUI::openOptionsDialogWithTab(OptionsDialog::Tab tab)
10011001
connect(dlg, &OptionsDialog::quitOnReset, this, &BitcoinGUI::quitRequested);
10021002
dlg->setCurrentTab(tab);
10031003
dlg->setModel(clientModel->getOptionsModel());
1004-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
1004+
GUIUtil::ShowModalDialogAsynchronously(dlg);
10051005
}
10061006

10071007
void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVerificationProgress, bool header, SynchronizationState sync_state)

src/qt/guiutil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ void PrintSlotException(
979979
PrintExceptionContinue(exception, description.c_str());
980980
}
981981

982-
void ShowModalDialogAndDeleteOnClose(QDialog* dialog)
982+
void ShowModalDialogAsynchronously(QDialog* dialog)
983983
{
984984
dialog->setAttribute(Qt::WA_DeleteOnClose);
985985
dialog->setWindowModality(Qt::ApplicationModal);

src/qt/guiutil.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ namespace GUIUtil
426426
/**
427427
* Shows a QDialog instance asynchronously, and deletes it on close.
428428
*/
429-
void ShowModalDialogAndDeleteOnClose(QDialog* dialog);
429+
void ShowModalDialogAsynchronously(QDialog* dialog);
430430

431431
inline bool IsEscapeOrBack(int key)
432432
{

src/qt/sendcoinsdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ void SendCoinsDialog::coinControlButtonClicked()
917917
{
918918
auto dlg = new CoinControlDialog(*m_coin_control, model, platformStyle);
919919
connect(dlg, &QDialog::finished, this, &SendCoinsDialog::coinControlUpdateLabels);
920-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
920+
GUIUtil::ShowModalDialogAsynchronously(dlg);
921921
}
922922

923923
// Coin Control: checkbox custom change address

src/qt/transactionview.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ void TransactionView::editLabel()
510510
: EditAddressDialog::EditSendingAddress, this);
511511
dlg->setModel(addressBook);
512512
dlg->loadRow(idx);
513-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
513+
GUIUtil::ShowModalDialogAsynchronously(dlg);
514514
}
515515
else
516516
{
@@ -519,7 +519,7 @@ void TransactionView::editLabel()
519519
this);
520520
dlg->setModel(addressBook);
521521
dlg->setAddress(address);
522-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
522+
GUIUtil::ShowModalDialogAsynchronously(dlg);
523523
}
524524
}
525525
}

src/qt/walletframe.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ void WalletFrame::gotoLoadPSBT(bool from_clipboard)
223223

224224
auto dlg = new PSBTOperationsDialog(this, currentWalletModel(), clientModel);
225225
dlg->openWithPSBT(psbtx);
226-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
226+
GUIUtil::ShowModalDialogAsynchronously(dlg);
227227
}
228228

229229
void WalletFrame::encryptWallet()

src/qt/walletview.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ void WalletView::encryptWallet()
208208
auto dlg = new AskPassphraseDialog(AskPassphraseDialog::Encrypt, this);
209209
dlg->setModel(walletModel);
210210
connect(dlg, &QDialog::finished, this, &WalletView::encryptionStatusChanged);
211-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
211+
GUIUtil::ShowModalDialogAsynchronously(dlg);
212212
}
213213

214214
void WalletView::backupWallet()
@@ -235,7 +235,7 @@ void WalletView::changePassphrase()
235235
{
236236
auto dlg = new AskPassphraseDialog(AskPassphraseDialog::ChangePass, this);
237237
dlg->setModel(walletModel);
238-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
238+
GUIUtil::ShowModalDialogAsynchronously(dlg);
239239
}
240240

241241
void WalletView::unlockWallet()

0 commit comments

Comments
 (0)