User survey: actually collect and send the data to the backend

This switches the QTextEdit fields to QPlainTextEdit (I don't see a reason
why we should allow HTML here), no longer tries to have a default text but
instead adds labels for the two fields, connects the UI so th data is
collected and uses a bastardized WebServices subclass to send the data to
our backend.

Fixes #546

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-06-30 07:19:22 -07:00
parent bc1e9edd5d
commit b2f473d927
5 changed files with 122 additions and 28 deletions

View file

@ -911,3 +911,16 @@ void DivelogsDeWebServices::buttonClicked(QAbstractButton *button)
break;
}
}
UserSurveyServices::UserSurveyServices(QWidget *parent, Qt::WindowFlags f) : WebServices(parent, f)
{
}
void 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);
}