Changeset 6afe6ba in subsurface


Ignore:
Timestamp:
Jun 18, 2017, 1:46:49 AM (2 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
47a01b1d
Parents:
2b01ab7
Message:

Desktop UI: reset cloud storage progress 'percentage'

The fake percentage needs to at least start at 0 for every cloud interaction.
Yes, the file global variable is ugly. So sue me.

Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • desktop-widgets/mainwindow.cpp

    rb2b51c8 r6afe6ba  
    6767bool progressDialogCanceled = false;
    6868
     69static int progressCounter = 0;
     70
    6971extern "C" int updateProgress(const char *text)
    7072{
    71         static int progress = 0;
    7273        if (verbose)
    7374                qDebug() << "git storage:" << text;
    7475        if (progressDialog) {
    7576                progressDialog->setLabelText(text);
    76                 progressDialog->setValue(++progress);
    77                 if (progress == 100)
    78                         progress = 0; // yes this is silly, but we really don't know how long it will take
     77                progressDialog->setValue(++progressCounter);
     78                if (progressCounter == 100)
     79                        progressCounter = 0; // yes this is silly, but we really don't know how long it will take
    7980        }
    8081        qApp->processEvents();
     
    20192020        progressDialog->setMinimumDuration(0);
    20202021        progressDialogCanceled = false;
     2022        progressCounter = 0;
    20212023        connect(progressDialog, SIGNAL(canceled()), this, SLOT(cancelCloudStorageOperation()));
    20222024}
Note: See TracChangeset for help on using the changeset viewer.