aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletview.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <[email protected]>2018-12-26 22:19:14 +0200
committerHennadii Stepanov <[email protected]>2019-01-15 01:28:00 +0200
commit7c572c488dcf84438d64da4ca920a48810044a72 (patch)
tree3e60394551f0dfa6e9a14e6900604dc4c1b09cb3 /src/qt/walletview.cpp
parentMerge #15164: qa: Ignore shellcheck warning SC2236 (diff)
downloaddiscoin-7c572c488dcf84438d64da4ca920a48810044a72.tar.xz
discoin-7c572c488dcf84438d64da4ca920a48810044a72.zip
Add workaround for QProgressDialog bug on macOS
See: QTBUG-65750, QTBUG-70357.
Diffstat (limited to 'src/qt/walletview.cpp')
-rw-r--r--src/qt/walletview.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp
index dd089d831..5f6f93d94 100644
--- a/src/qt/walletview.cpp
+++ b/src/qt/walletview.cpp
@@ -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 {