Make progress dialog show up more reliably

Counterintuitively, setting the minimum duration to 200ms actually makes
the dialog show up while waiting for the first progress signal. I had
thought that setting it to 0 would make it show up right away, but with a
value of 0 it waits for the first progress notification and with slow
internet connections that can take quite a while (and with some git
operations no progress notification will be sent out the whole time).

So this should make the situation with the progress bar a little better.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-09-28 06:54:55 -04:00
parent 2c0123c677
commit 8b4d502f24

View file

@ -1828,7 +1828,7 @@ void MainWindow::showProgressBar()
progressDialog = new QProgressDialog(tr("Contacting cloud service..."), tr("Cancel"), 0, 100, this);
progressDialog->setWindowModality(Qt::WindowModal);
progressDialog->setMinimumDuration(0);
progressDialog->setMinimumDuration(200);
progressDialogCanceled = false;
connect(progressDialog, SIGNAL(canceled()), this, SLOT(cancelCloudStorageOperation()));
}