mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
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.
This commit is contained in:
parent
5d7666b151
commit
f730bd7d58
@ -189,7 +189,7 @@ void AddressBookPage::onEditAction()
|
||||
dlg->setModel(model);
|
||||
QModelIndex origIndex = proxyModel->mapToSource(indexes.at(0));
|
||||
dlg->loadRow(origIndex.row());
|
||||
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
||||
GUIUtil::ShowModalDialogAsynchronously(dlg);
|
||||
}
|
||||
|
||||
void AddressBookPage::on_newAddress_clicked()
|
||||
|
@ -853,7 +853,7 @@ void BitcoinGUI::aboutClicked()
|
||||
return;
|
||||
|
||||
auto dlg = new HelpMessageDialog(this, /* about */ true);
|
||||
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
||||
GUIUtil::ShowModalDialogAsynchronously(dlg);
|
||||
}
|
||||
|
||||
void BitcoinGUI::showDebugWindow()
|
||||
@ -998,7 +998,7 @@ void BitcoinGUI::openOptionsDialogWithTab(OptionsDialog::Tab tab)
|
||||
connect(dlg, &OptionsDialog::quitOnReset, this, &BitcoinGUI::quitRequested);
|
||||
dlg->setCurrentTab(tab);
|
||||
dlg->setModel(clientModel->getOptionsModel());
|
||||
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
||||
GUIUtil::ShowModalDialogAsynchronously(dlg);
|
||||
}
|
||||
|
||||
void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVerificationProgress, bool header, SynchronizationState sync_state)
|
||||
|
@ -984,7 +984,7 @@ void PrintSlotException(
|
||||
PrintExceptionContinue(exception, description.c_str());
|
||||
}
|
||||
|
||||
void ShowModalDialogAndDeleteOnClose(QDialog* dialog)
|
||||
void ShowModalDialogAsynchronously(QDialog* dialog)
|
||||
{
|
||||
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
dialog->setWindowModality(Qt::ApplicationModal);
|
||||
|
@ -426,7 +426,7 @@ namespace GUIUtil
|
||||
/**
|
||||
* Shows a QDialog instance asynchronously, and deletes it on close.
|
||||
*/
|
||||
void ShowModalDialogAndDeleteOnClose(QDialog* dialog);
|
||||
void ShowModalDialogAsynchronously(QDialog* dialog);
|
||||
|
||||
inline bool IsEscapeOrBack(int key)
|
||||
{
|
||||
|
@ -930,7 +930,7 @@ void SendCoinsDialog::coinControlButtonClicked()
|
||||
{
|
||||
auto dlg = new CoinControlDialog(*m_coin_control, model, platformStyle);
|
||||
connect(dlg, &QDialog::finished, this, &SendCoinsDialog::coinControlUpdateLabels);
|
||||
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
||||
GUIUtil::ShowModalDialogAsynchronously(dlg);
|
||||
}
|
||||
|
||||
// Coin Control: checkbox custom change address
|
||||
|
@ -511,7 +511,7 @@ void TransactionView::editLabel()
|
||||
: EditAddressDialog::EditSendingAddress, this);
|
||||
dlg->setModel(addressBook);
|
||||
dlg->loadRow(idx);
|
||||
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
||||
GUIUtil::ShowModalDialogAsynchronously(dlg);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -520,7 +520,7 @@ void TransactionView::editLabel()
|
||||
this);
|
||||
dlg->setModel(addressBook);
|
||||
dlg->setAddress(address);
|
||||
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
||||
GUIUtil::ShowModalDialogAsynchronously(dlg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ void WalletFrame::gotoLoadPSBT(bool from_clipboard)
|
||||
|
||||
auto dlg = new PSBTOperationsDialog(this, currentWalletModel(), clientModel);
|
||||
dlg->openWithPSBT(psbtx);
|
||||
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
||||
GUIUtil::ShowModalDialogAsynchronously(dlg);
|
||||
}
|
||||
|
||||
void WalletFrame::encryptWallet()
|
||||
|
@ -208,7 +208,7 @@ void WalletView::encryptWallet()
|
||||
auto dlg = new AskPassphraseDialog(AskPassphraseDialog::Encrypt, this);
|
||||
dlg->setModel(walletModel);
|
||||
connect(dlg, &QDialog::finished, this, &WalletView::encryptionStatusChanged);
|
||||
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
||||
GUIUtil::ShowModalDialogAsynchronously(dlg);
|
||||
}
|
||||
|
||||
void WalletView::backupWallet()
|
||||
@ -235,7 +235,7 @@ void WalletView::changePassphrase()
|
||||
{
|
||||
auto dlg = new AskPassphraseDialog(AskPassphraseDialog::ChangePass, this);
|
||||
dlg->setModel(walletModel);
|
||||
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
||||
GUIUtil::ShowModalDialogAsynchronously(dlg);
|
||||
}
|
||||
|
||||
void WalletView::unlockWallet()
|
||||
|
Loading…
Reference in New Issue
Block a user