mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 02:53:24 +00:00
Cleanup SubsurfaceWebServices class
* Remove statuic SubsurfaceWebServices::instance() member. Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a8823c1793
commit
9eb47602dd
3 changed files with 4 additions and 10 deletions
|
@ -277,7 +277,9 @@ void MainWindow::on_actionDownloadDC_triggered()
|
||||||
|
|
||||||
void MainWindow::on_actionDownloadWeb_triggered()
|
void MainWindow::on_actionDownloadWeb_triggered()
|
||||||
{
|
{
|
||||||
SubsurfaceWebServices::instance()->exec();
|
SubsurfaceWebServices dlg(this);
|
||||||
|
|
||||||
|
dlg.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionDivelogs_de_triggered()
|
void MainWindow::on_actionDivelogs_de_triggered()
|
||||||
|
|
|
@ -310,13 +310,6 @@ void WebServices::resetState()
|
||||||
// #
|
// #
|
||||||
// #
|
// #
|
||||||
|
|
||||||
SubsurfaceWebServices* SubsurfaceWebServices::instance()
|
|
||||||
{
|
|
||||||
static SubsurfaceWebServices *self = new SubsurfaceWebServices(mainWindow());
|
|
||||||
self->setAttribute(Qt::WA_QuitOnClose, false);
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
SubsurfaceWebServices::SubsurfaceWebServices(QWidget* parent, Qt::WindowFlags f)
|
SubsurfaceWebServices::SubsurfaceWebServices(QWidget* parent, Qt::WindowFlags f)
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
|
|
|
@ -47,7 +47,7 @@ protected:
|
||||||
class SubsurfaceWebServices : public WebServices {
|
class SubsurfaceWebServices : public WebServices {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
static SubsurfaceWebServices* instance();
|
explicit SubsurfaceWebServices(QWidget* parent = 0, Qt::WindowFlags f = 0);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void startDownload();
|
void startDownload();
|
||||||
|
@ -56,7 +56,6 @@ private slots:
|
||||||
void downloadError(QNetworkReply::NetworkError error);
|
void downloadError(QNetworkReply::NetworkError error);
|
||||||
void startUpload(){} /*no op*/
|
void startUpload(){} /*no op*/
|
||||||
private:
|
private:
|
||||||
explicit SubsurfaceWebServices(QWidget* parent = 0, Qt::WindowFlags f = 0);
|
|
||||||
void setStatusText(int status);
|
void setStatusText(int status);
|
||||||
void download_dialog_traverse_xml(xmlNodePtr node, unsigned int *download_status);
|
void download_dialog_traverse_xml(xmlNodePtr node, unsigned int *download_status);
|
||||||
unsigned int download_dialog_parse_response(const QByteArray& length);
|
unsigned int download_dialog_parse_response(const QByteArray& length);
|
||||||
|
|
Loading…
Add table
Reference in a new issue