Skip to content

Commit 8d6cfd7

Browse files
hebastoUdjinM6
authored andcommitted
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 2c312dc commit 8d6cfd7

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
@@ -192,7 +192,7 @@ void AddressBookPage::onEditAction()
192192
dlg->setModel(model);
193193
QModelIndex origIndex = proxyModel->mapToSource(indexes.at(0));
194194
dlg->loadRow(origIndex.row());
195-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
195+
GUIUtil::ShowModalDialogAsynchronously(dlg);
196196
}
197197

198198
void AddressBookPage::on_newAddress_clicked()

src/qt/bitcoingui.cpp

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

11251125
auto dlg = new HelpMessageDialog(this, HelpMessageDialog::about);
1126-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
1126+
GUIUtil::ShowModalDialogAsynchronously(dlg);
11271127
}
11281128

11291129
void BitcoinGUI::showDebugWindow()
@@ -1385,7 +1385,7 @@ void BitcoinGUI::openOptionsDialogWithTab(OptionsDialog::Tab tab)
13851385
connect(dlg, &OptionsDialog::appearanceChanged, [this]() {
13861386
updateWidth();
13871387
});
1388-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
1388+
GUIUtil::ShowModalDialogAsynchronously(dlg);
13891389

13901390
updateCoinJoinVisibility();
13911391
}

src/qt/guiutil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1950,7 +1950,7 @@ void PrintSlotException(
19501950
PrintExceptionContinue(std::make_exception_ptr(exception), description.c_str());
19511951
}
19521952

1953-
void ShowModalDialogAndDeleteOnClose(QDialog* dialog)
1953+
void ShowModalDialogAsynchronously(QDialog* dialog)
19541954
{
19551955
dialog->setAttribute(Qt::WA_DeleteOnClose);
19561956
dialog->setWindowModality(Qt::ApplicationModal);

src/qt/guiutil.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ namespace GUIUtil
613613
/**
614614
* Shows a QDialog instance asynchronously, and deletes it on close.
615615
*/
616-
void ShowModalDialogAndDeleteOnClose(QDialog* dialog);
616+
void ShowModalDialogAsynchronously(QDialog* dialog);
617617

618618
} // namespace GUIUtil
619619

src/qt/sendcoinsdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ void SendCoinsDialog::coinControlButtonClicked()
940940
{
941941
auto dlg = new CoinControlDialog(*m_coin_control, model);
942942
connect(dlg, &QDialog::finished, this, &SendCoinsDialog::coinControlUpdateLabels);
943-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
943+
GUIUtil::ShowModalDialogAsynchronously(dlg);
944944
}
945945

946946
// Coin Control: checkbox custom change address

src/qt/transactionview.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ void TransactionView::editLabel()
516516
: EditAddressDialog::EditSendingAddress, this);
517517
dlg->setModel(addressBook);
518518
dlg->loadRow(idx);
519-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
519+
GUIUtil::ShowModalDialogAsynchronously(dlg);
520520
}
521521
else
522522
{
@@ -525,7 +525,7 @@ void TransactionView::editLabel()
525525
this);
526526
dlg->setModel(addressBook);
527527
dlg->setAddress(address);
528-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
528+
GUIUtil::ShowModalDialogAsynchronously(dlg);
529529
}
530530
}
531531
}

src/qt/walletframe.cpp

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

289289
auto dlg = new PSBTOperationsDialog(this, currentWalletModel(), clientModel);
290290
dlg->openWithPSBT(psbtx);
291-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
291+
GUIUtil::ShowModalDialogAsynchronously(dlg);
292292
}
293293

294294
void WalletFrame::encryptWallet()

src/qt/walletview.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ void WalletView::encryptWallet()
299299
auto dlg = new AskPassphraseDialog(AskPassphraseDialog::Encrypt, this);
300300
dlg->setModel(walletModel);
301301
connect(dlg, &QDialog::finished, this, &WalletView::encryptionStatusChanged);
302-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
302+
GUIUtil::ShowModalDialogAsynchronously(dlg);
303303
}
304304

305305
void WalletView::backupWallet()
@@ -326,7 +326,7 @@ void WalletView::changePassphrase()
326326
{
327327
auto dlg = new AskPassphraseDialog(AskPassphraseDialog::ChangePass, this);
328328
dlg->setModel(walletModel);
329-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
329+
GUIUtil::ShowModalDialogAsynchronously(dlg);
330330
}
331331

332332
void WalletView::unlockWallet(bool fForMixingOnly)

0 commit comments

Comments
 (0)