mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
bbbb4ced24
commit
0dd40b7a51
6 changed files with 11 additions and 19 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue