Skip to content

Commit 3daaa4c

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 432c521 commit 3daaa4c

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
@@ -850,7 +850,7 @@ void BitcoinGUI::aboutClicked()
850850
return;
851851

852852
auto dlg = new HelpMessageDialog(this, /* about */ true);
853-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
853+
GUIUtil::ShowModalDialogAsynchronously(dlg);
854854
}
855855

856856
void BitcoinGUI::showDebugWindow()
@@ -995,7 +995,7 @@ void BitcoinGUI::openOptionsDialogWithTab(OptionsDialog::Tab tab)
995995
connect(dlg, &OptionsDialog::quitOnReset, this, &BitcoinGUI::quitRequested);
996996
dlg->setCurrentTab(tab);
997997
dlg->setModel(clientModel->getOptionsModel());
998-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
998+
GUIUtil::ShowModalDialogAsynchronously(dlg);
999999
}
10001000

10011001
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
@@ -984,7 +984,7 @@ void PrintSlotException(
984984
PrintExceptionContinue(exception, description.c_str());
985985
}
986986

987-
void ShowModalDialogAndDeleteOnClose(QDialog* dialog)
987+
void ShowModalDialogAsynchronously(QDialog* dialog)
988988
{
989989
dialog->setAttribute(Qt::WA_DeleteOnClose);
990990
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
@@ -930,7 +930,7 @@ void SendCoinsDialog::coinControlButtonClicked()
930930
{
931931
auto dlg = new CoinControlDialog(*m_coin_control, model, platformStyle);
932932
connect(dlg, &QDialog::finished, this, &SendCoinsDialog::coinControlUpdateLabels);
933-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
933+
GUIUtil::ShowModalDialogAsynchronously(dlg);
934934
}
935935

936936
// Coin Control: checkbox custom change address

src/qt/transactionview.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ void TransactionView::editLabel()
511511
: EditAddressDialog::EditSendingAddress, this);
512512
dlg->setModel(addressBook);
513513
dlg->loadRow(idx);
514-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
514+
GUIUtil::ShowModalDialogAsynchronously(dlg);
515515
}
516516
else
517517
{
@@ -520,7 +520,7 @@ void TransactionView::editLabel()
520520
this);
521521
dlg->setModel(addressBook);
522522
dlg->setAddress(address);
523-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
523+
GUIUtil::ShowModalDialogAsynchronously(dlg);
524524
}
525525
}
526526
}

src/qt/walletframe.cpp

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

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

232232
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)