mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Add workaround for QProgressDialog bug on macOS
See: QTBUG-65750, QTBUG-70357.
This commit is contained in:
@@ -305,24 +305,19 @@ void WalletView::usedReceivingAddresses()
|
||||
|
||||
void WalletView::showProgress(const QString &title, int nProgress)
|
||||
{
|
||||
if (nProgress == 0)
|
||||
{
|
||||
progressDialog = new QProgressDialog(title, "", 0, 100);
|
||||
if (nProgress == 0) {
|
||||
progressDialog = new QProgressDialog(title, tr("Cancel"), 0, 100);
|
||||
GUIUtil::PolishProgressDialog(progressDialog);
|
||||
progressDialog->setWindowModality(Qt::ApplicationModal);
|
||||
progressDialog->setMinimumDuration(0);
|
||||
progressDialog->setAutoClose(false);
|
||||
progressDialog->setValue(0);
|
||||
progressDialog->setCancelButtonText(tr("Cancel"));
|
||||
}
|
||||
else if (nProgress == 100)
|
||||
{
|
||||
if (progressDialog)
|
||||
{
|
||||
} else if (nProgress == 100) {
|
||||
if (progressDialog) {
|
||||
progressDialog->close();
|
||||
progressDialog->deleteLater();
|
||||
}
|
||||
}
|
||||
else if (progressDialog) {
|
||||
} else if (progressDialog) {
|
||||
if (progressDialog->wasCanceled()) {
|
||||
getWalletModel()->wallet().abortRescan();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user