mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Replace the spinner with a progress dialog for cloud storage access
Since the spinner caused all kinds of problems inside VMs, wasn't shown at all for some people on Win10 and appeared to get stuck a lot and still left people with the perception that Subsurface was hung, this patch takes a more traditional approach and gives the user a progress dialog. An additional benefit of this is that the user now can cancel a hung transfer. The slightly weird passing in of the callback allows for the separation of UI and core logic code... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2c74a8c315
commit
2025bc1b2b
4 changed files with 82 additions and 26 deletions
|
@ -11,11 +11,11 @@
|
|||
#include <QAction>
|
||||
#include <QUrl>
|
||||
#include <QUuid>
|
||||
#include <QProgressDialog>
|
||||
|
||||
#include "ui_mainwindow.h"
|
||||
#include "notificationwidget.h"
|
||||
#include "windowtitleupdate.h"
|
||||
#include "qtwaitingspinner.h"
|
||||
|
||||
struct DiveList;
|
||||
class QSortFilterProxyModel;
|
||||
|
@ -174,6 +174,7 @@ slots:
|
|||
void on_actionConfigure_Dive_Computer_triggered();
|
||||
void setDefaultState();
|
||||
void setAutomaticTitle();
|
||||
void cancelCloudStorageOperation();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *);
|
||||
|
@ -193,8 +194,6 @@ slots:
|
|||
void planCreated();
|
||||
void setEnabledToolbar(bool arg1);
|
||||
void setPlanNotes();
|
||||
void startSpinner();
|
||||
void stopSpinner();
|
||||
|
||||
private:
|
||||
Ui::MainWindow ui;
|
||||
|
@ -208,6 +207,8 @@ private:
|
|||
bool askSaveChanges();
|
||||
bool okToClose(QString message);
|
||||
void closeCurrentFile();
|
||||
void showProgressBar();
|
||||
void hideProgressBar();
|
||||
void writeSettings();
|
||||
int file_save();
|
||||
int file_save_as();
|
||||
|
@ -249,7 +250,6 @@ private:
|
|||
QHash<QByteArray, PropertiesForQuadrant> stateProperties;
|
||||
|
||||
WindowTitleUpdate *wtu;
|
||||
QtWaitingSpinner *spinner;
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue