mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-09 10:43:19 -05: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
8 changed files with 11 additions and 11 deletions
|
@ -189,7 +189,7 @@ void AddressBookPage::onEditAction()
|
||||||
dlg->setModel(model);
|
dlg->setModel(model);
|
||||||
QModelIndex origIndex = proxyModel->mapToSource(indexes.at(0));
|
QModelIndex origIndex = proxyModel->mapToSource(indexes.at(0));
|
||||||
dlg->loadRow(origIndex.row());
|
dlg->loadRow(origIndex.row());
|
||||||
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
GUIUtil::ShowModalDialogAsynchronously(dlg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddressBookPage::on_newAddress_clicked()
|
void AddressBookPage::on_newAddress_clicked()
|
||||||
|
|
|
@ -853,7 +853,7 @@ void BitcoinGUI::aboutClicked()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto dlg = new HelpMessageDialog(this, /* about */ true);
|
auto dlg = new HelpMessageDialog(this, /* about */ true);
|
||||||
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
GUIUtil::ShowModalDialogAsynchronously(dlg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitcoinGUI::showDebugWindow()
|
void BitcoinGUI::showDebugWindow()
|
||||||
|
@ -998,7 +998,7 @@ void BitcoinGUI::openOptionsDialogWithTab(OptionsDialog::Tab tab)
|
||||||
connect(dlg, &OptionsDialog::quitOnReset, this, &BitcoinGUI::quitRequested);
|
connect(dlg, &OptionsDialog::quitOnReset, this, &BitcoinGUI::quitRequested);
|
||||||
dlg->setCurrentTab(tab);
|
dlg->setCurrentTab(tab);
|
||||||
dlg->setModel(clientModel->getOptionsModel());
|
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)
|
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());
|
PrintExceptionContinue(exception, description.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShowModalDialogAndDeleteOnClose(QDialog* dialog)
|
void ShowModalDialogAsynchronously(QDialog* dialog)
|
||||||
{
|
{
|
||||||
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
dialog->setWindowModality(Qt::ApplicationModal);
|
dialog->setWindowModality(Qt::ApplicationModal);
|
||||||
|
|
|
@ -426,7 +426,7 @@ namespace GUIUtil
|
||||||
/**
|
/**
|
||||||
* Shows a QDialog instance asynchronously, and deletes it on close.
|
* Shows a QDialog instance asynchronously, and deletes it on close.
|
||||||
*/
|
*/
|
||||||
void ShowModalDialogAndDeleteOnClose(QDialog* dialog);
|
void ShowModalDialogAsynchronously(QDialog* dialog);
|
||||||
|
|
||||||
inline bool IsEscapeOrBack(int key)
|
inline bool IsEscapeOrBack(int key)
|
||||||
{
|
{
|
||||||
|
|
|
@ -930,7 +930,7 @@ void SendCoinsDialog::coinControlButtonClicked()
|
||||||
{
|
{
|
||||||
auto dlg = new CoinControlDialog(*m_coin_control, model, platformStyle);
|
auto dlg = new CoinControlDialog(*m_coin_control, model, platformStyle);
|
||||||
connect(dlg, &QDialog::finished, this, &SendCoinsDialog::coinControlUpdateLabels);
|
connect(dlg, &QDialog::finished, this, &SendCoinsDialog::coinControlUpdateLabels);
|
||||||
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
GUIUtil::ShowModalDialogAsynchronously(dlg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Coin Control: checkbox custom change address
|
// Coin Control: checkbox custom change address
|
||||||
|
|
|
@ -511,7 +511,7 @@ void TransactionView::editLabel()
|
||||||
: EditAddressDialog::EditSendingAddress, this);
|
: EditAddressDialog::EditSendingAddress, this);
|
||||||
dlg->setModel(addressBook);
|
dlg->setModel(addressBook);
|
||||||
dlg->loadRow(idx);
|
dlg->loadRow(idx);
|
||||||
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
GUIUtil::ShowModalDialogAsynchronously(dlg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -520,7 +520,7 @@ void TransactionView::editLabel()
|
||||||
this);
|
this);
|
||||||
dlg->setModel(addressBook);
|
dlg->setModel(addressBook);
|
||||||
dlg->setAddress(address);
|
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);
|
auto dlg = new PSBTOperationsDialog(this, currentWalletModel(), clientModel);
|
||||||
dlg->openWithPSBT(psbtx);
|
dlg->openWithPSBT(psbtx);
|
||||||
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
GUIUtil::ShowModalDialogAsynchronously(dlg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WalletFrame::encryptWallet()
|
void WalletFrame::encryptWallet()
|
||||||
|
|
|
@ -208,7 +208,7 @@ void WalletView::encryptWallet()
|
||||||
auto dlg = new AskPassphraseDialog(AskPassphraseDialog::Encrypt, this);
|
auto dlg = new AskPassphraseDialog(AskPassphraseDialog::Encrypt, this);
|
||||||
dlg->setModel(walletModel);
|
dlg->setModel(walletModel);
|
||||||
connect(dlg, &QDialog::finished, this, &WalletView::encryptionStatusChanged);
|
connect(dlg, &QDialog::finished, this, &WalletView::encryptionStatusChanged);
|
||||||
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
GUIUtil::ShowModalDialogAsynchronously(dlg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WalletView::backupWallet()
|
void WalletView::backupWallet()
|
||||||
|
@ -235,7 +235,7 @@ void WalletView::changePassphrase()
|
||||||
{
|
{
|
||||||
auto dlg = new AskPassphraseDialog(AskPassphraseDialog::ChangePass, this);
|
auto dlg = new AskPassphraseDialog(AskPassphraseDialog::ChangePass, this);
|
||||||
dlg->setModel(walletModel);
|
dlg->setModel(walletModel);
|
||||||
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
GUIUtil::ShowModalDialogAsynchronously(dlg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WalletView::unlockWallet()
|
void WalletView::unlockWallet()
|
||||||
|
|
Loading…
Add table
Reference in a new issue