From a1082e9f41ac2bb64ef88b6149bd3e3410290131 Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 21 May 2015 21:44:29 +0000 Subject: [PATCH] fixed bug due to using a static in the wrong place git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8285 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/settings/ServerPage.cpp | 5 ++++- retroshare-gui/src/gui/settings/ServerPage.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/settings/ServerPage.cpp b/retroshare-gui/src/gui/settings/ServerPage.cpp index b7dcf9952..05f4fa3ad 100755 --- a/retroshare-gui/src/gui/settings/ServerPage.cpp +++ b/retroshare-gui/src/gui/settings/ServerPage.cpp @@ -54,6 +54,8 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags) connect( ui.cleanKnownIPs_PB, SIGNAL( clicked( ) ), this, SLOT( clearKnownAddressList() ) ); connect( ui.testIncomingTor_PB, SIGNAL( clicked( ) ), this, SLOT( updateTorInProxyIndicator() ) ); + manager = NULL ; + QTimer *timer = new QTimer(this); timer->connect(timer, SIGNAL(timeout()), this, SLOT(updateStatus())); timer->start(1000); @@ -709,7 +711,8 @@ void ServerPage::updateTorInProxyIndicator() if(!mIsHiddenNode) return ; - static QNetworkAccessManager *manager = new QNetworkAccessManager(this); + if(manager == NULL) + manager = new QNetworkAccessManager(this); QNetworkProxy proxy ; diff --git a/retroshare-gui/src/gui/settings/ServerPage.h b/retroshare-gui/src/gui/settings/ServerPage.h index 0f81cd24c..206c74ebe 100755 --- a/retroshare-gui/src/gui/settings/ServerPage.h +++ b/retroshare-gui/src/gui/settings/ServerPage.h @@ -27,6 +27,7 @@ #include "RsAutoUpdatePage.h" class QNetworkReply; +class QNetworkAccessManager; class ServerPage: public ConfigPage { @@ -68,6 +69,7 @@ private: Ui::ServerPage ui; + QNetworkAccessManager *manager ; bool mIsHiddenNode; };