aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/subsurfacewebservices.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-07-16 17:20:21 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-16 13:56:46 -0700
commit0dd40b7a514a2ea02c2f4160a74b23c0fb9a41dd (patch)
tree466d6e7e87c7a8a808a87484555431dad535e13d /qt-ui/subsurfacewebservices.cpp
parentbbbb4ced241c156a2500334ff29ba0ea496d3811 (diff)
downloadsubsurface-0dd40b7a514a2ea02c2f4160a74b23c0fb9a41dd.tar.gz
Rely on QNetworkReply finished() signal instead of AccessManager one
The access manager is only one, while we can make requests from different parts of the application, so relying on the manager finished() signal to see if something was done or not was a not very good move. The QNetworkReply is created when a get() is invocked on the AccessManager and that's unique. connect it's finished() signal instead. bonus: code cleanup. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/subsurfacewebservices.cpp')
-rw-r--r--qt-ui/subsurfacewebservices.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp
index 23972587e..daeb5385c 100644
--- a/qt-ui/subsurfacewebservices.cpp
+++ b/qt-ui/subsurfacewebservices.cpp
@@ -917,10 +917,11 @@ UserSurveyServices::UserSurveyServices(QWidget *parent, Qt::WindowFlags f) : Web
}
-void UserSurveyServices::sendSurvey(QString values)
+QNetworkReply* UserSurveyServices::sendSurvey(QString values)
{
QNetworkRequest request;
request.setUrl(QString("http://subsurface.hohndel.org/survey?%1").arg(values));
request.setRawHeader("Accept", "text/xml");
reply = manager()->get(request);
+ return reply;
}