summaryrefslogtreecommitdiffstats
path: root/qt-ui/subsurfacewebservices.h
AgeCommit message (Collapse)Author
2014-03-14Convert other users of showError() to the new world orderGravatar Linus Torvalds
The "report_error()" interface is a lot simpler, although some of the C++ code uses QStrings which make them a bit annoying, especially for the varargs model. Still, even with the explicit conversion to UTF8 and "char *", the report_error() model is much nicer. This also just makes refreshDisplay() do the error reporting in the UI automatically, so a number of error paths don't even have to worry. And the multi-line model of error reporting means that it all automatically does the right thing, and reports errors for each file rather than just for the last file that failed to open. So this removes closer to a hundred lines of cruft, while being a simpler interface and doing better error reporting. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27Massive automated whitespace cleanupGravatar Dirk Hohndel
I know everyone will hate it. Go ahead. Complain. Call me names. At least now things are consistent and reproducible. If you want changes, have your complaint come with a patch to scripts/whitespace.pl so that we can automate it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-11Put include guard to every headerGravatar Boris Barbulovski
* ensure include guard to every header * comment endif guard block Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-09Cleanup SubsurfaceWebServices classGravatar Boris Barbulovski
* Remove statuic SubsurfaceWebServices::instance() member. Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Get more descriptive error messages when uploading to divelogs.deGravatar Thiago Macieira
Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Move the divelogs.de preparation function into the C++ classGravatar Thiago Macieira
This is so we can mark the error messages for translation. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Divelogs.de: change the 'Apply' button to 'Done' for uploadGravatar Lubomir I. Ivanov
Post downloading we have an 'Apply' button that can be clicked to apply/merge the downloaded dives. When uploading we rename the button to 'Done' and enable the button if the upload was successful. The 'Cancel' button on the other hand becomes disabled. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Divelogs.de: add a divelist context menu item for uploadGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-03Implement the network part of the support for divelogs.deGravatar Thiago Macieira
This implements support for: * uploading a zip file containing dives - untested (the zip file must have been prepared elsewhere) * downloading the dive list and the dive XML files The networking part is finished, but it's missing the actual import of the XML files sent by divelogs.de. Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03Add support for timing the download outGravatar Thiago Macieira
The time out is 30 seconds from the start of the request or from the last time we got any data from the server. Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03Set the download reply pointer to NULL after dismissing itGravatar Thiago Macieira
QNetworkReply might emit signals after it's been told to go away. We don't want to change the status after that. Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03Properly reset the state of the download dialog before dismissingGravatar Thiago Macieira
Re-enable buttons that should be enabled by default, disable the others, set the status to empty, make the progress bar go back to zero. Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03Make the QNetworkAccessManager a singleton available to allGravatar Thiago Macieira
One of the rules of using QNetworkAccessManager is to share it among all users, since sockets and other state can be shared. Looks like Marble doesn't allow us to set it, though, and it creates multiple instances. I'll prepare an upstream patch to fix that sometime. Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03Whitespace: fix indentation in subsurfacewebservices.* to use tabsGravatar Thiago Macieira
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-10-24Added the skeleton for the Download / Upload from Divelogs.deGravatar Tomaz Canabrava
Added the skeleton code for the Download / Upload from Divelogs. de webservice. Now I need to hoopup things from the .ui side and do the actual implementation of the code. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-24Created a 'WebService' dialog that will handle download and upload.Gravatar Tomaz Canabrava
Created a WebService dialog that will handle download and upload from all child based webservices. Also, ported the currently - only - one webservice to use the new dialog. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-03Make the classes generated by uic be real members of our classesGravatar Thiago Macieira
This means we don't have to new/delete them, which is a waste of overhead. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-06Hoocked up the buttons and the parsing of the XML.Gravatar Tomaz Canabrava
The XML is now being correctly parsed, Clicking on Help will open the browser pointing to the api site, and clicking on cancel will cancel the download. Clicking on Apply still doesn't apply, but that's next. :) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-06Added initial support for download dive info from the subsurface web service.Gravatar Tomaz Canabrava
Added initial support for download dive info from subsurface web service, the current code only downloads and output the xml downloaded in the debug area. Now I need to parse things up and plug the unplugged stuff. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>