aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/updatemanager.cpp
AgeCommit message (Collapse)Author
2015-10-30Move qt-ui to desktop-widgetsGravatar Tomaz Canabrava
Since we have now destkop and mobile versions, 'qt-ui' was a very poor name choice for a folder that contains only destkop-enabled widgets. Also, move the graphicsview-common.h/cpp to subsurface-core because it doesn't depend on qgraphicsview, it merely implements all the colors that we use throughout Subsurface, and we will use colors on both desktop and mobile versions Same thing applies for metrics.h/cpp Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31Remove unneeded includesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-10Don't show the update messages in the mobile appGravatar Dirk Hohndel
Android provides update notifications already. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-22Address uninitialized member warningsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-23Move helper functions aroundGravatar Dirk Hohndel
We had a ton of helper functions in qt-gui.cpp which really didn't make much sense. So I moved them all into qthelper.cpp. Also moved the UserAgent helper that didn't belong in the UpdateHandler to begin with - that's a generic helper used in many places... With this we can successfully build using cmake again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15add and use a version.c / version.h pairGravatar Lubomir I. Ivanov
version.c is now object code which is recompiled each time ssrf-version.h changes, while the interface file version.h remains that same at all times and files which include it will not need to be recompiled. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-30Minor whitespace change - this line was getting longGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-30Fix update message popping up when there is no new versionGravatar Dirk Hohndel
I was just missing one key phrase to check for. Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-25Changing the way we tell Linux users about new versionsGravatar Dirk Hohndel
We no longer encourage people to check with their OS vendor. We want them to check our download page. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-25Also don't show the beta response when auto-checking for updatesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-25Add unique but random UUID to server queriesGravatar Dirk Hohndel
With this we can easily eliminate duplicates from our user statistics. The UUID is completely random and there is no way to link it back to a specific user. By deleting the settings a user can force a new UUID. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-25Clean up the update checking logicGravatar Dirk Hohndel
If update checking is allowed we want to do so but we want to be careful, which messages we show - specifically we don't want to show "your version is newer" unless it's a manual check. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Clean up the header filesGravatar Dirk Hohndel
Lots and lots and lots of header files were being included without being needed. This attempts to clean some of that crud up. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-03Fix the update check logicGravatar Dirk Hohndel
Oops. That was supposed to do the opposite of what it ended up doing. The goal was to NOT check for two weeks when the user updates to a new version. Instead it always checked when the user updated to a new version. This mostly would hit developers... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-01Automatic update check with an opt outGravatar Dirk Hohndel
Store the last version used, the next time we can check, and the decision if the user does or does not want these checks in the settings. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-01Update check: better message when running development versionGravatar Dirk Hohndel
This isn't an error. The server tells us what it knows. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-01Use the canonical version when checking for updatesGravatar Dirk Hohndel
This is in the form major.minor.subminor.commit_nr and makes it easy for the backend process on the server to figure out what to do. This changes the query argument from ver to version so the backend knows that this is now a canonical version. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-25Match agreed captalisation styleGravatar Tim Wootton
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-18Move update check and survey to the new domainGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-26Fix missing translations for webservice responsesGravatar Dirk Hohndel
The webservice backend sends responses in English. Let's do a better job presenting those in the users preferred language. Fixes #714 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-08Better User Agent for SubsurfaceGravatar Dirk Hohndel
This one is less verbose and very easy to parse. It's guaranteed to have five components, separated by ':' with no other ':' in the string: Subsurface:<version>:<PrettyOSName>:<appCpuArch[/osCpuArch]>:<UILang> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-08Fix possible crash attempting network connectionGravatar Dirk Hohndel
If we didn't get back a JSON encoded string (i.e., if the response contained no '"') we would access a QList past its boundary. I'm somewhat hopeful that this is a last second fix for an annoying bug I've been trying to figure out for a while. See #514 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-31Give Subsurface a distinct User Agent stringGravatar Dirk Hohndel
When accessing websites (divelogs.de, subsurface website) we shouldn't pretend to be Mozilla 5. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-18Add missing application iconGravatar Sergey Starosek
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Rely on QNetworkReply finished() signal instead of AccessManager oneGravatar Tomaz Canabrava
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>
2014-07-09Remove HTML from translated stringsGravatar Dirk Hohndel
In some strings that won't be possible as the translation needs to be aware of line breaks, etc. But for these strings it seems like the right thing to do. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-22Gratuitous whitespace changesGravatar Dirk Hohndel
I keep trying to get to consistenct. Completely hopeless. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-02Update manager: report Linux separatelyGravatar Dirk Hohndel
I know the plan is to do much better OS detection - but at least Linux in general should be called out and not be treated as "unknown". Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-02Add "Check for updates" FeatureGravatar Joshua Joseph
This patch adds a check for updates feature. It connects to http://subsurface.hohndel.org/updatecheck.html to check for any new versions. It then prompts the user with a download link if an update is available. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>