aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets
AgeCommit message (Collapse)Author
2016-04-11Fix seabear import sample overrun bugGravatar Linus Torvalds
The Seabear import fixed up the NDL and TTS in the samples from minutes (in the import) to seconds (our internal format for all time). But it did it with a loop that overran the end of the samples array by one: for(int s_nr = 0 ; s_nr <= dive->dc.samples ; s_nr++) { Fix it to use the proper "<" instead of "<=". Reported-by: Stuart Vernon <stuartv@force2.net> Tested-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05Desktop UI: make sure that git progress is actually shownGravatar Dirk Hohndel
This updates the got progress indicator to the changed interface where we don't pass in an explicit percentage. It also finally fixes an old problem: If we don't allow the Qt main loop to process the events, we'll never see a decent progress indicator... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05Fix compilation with the new folder architectureGravatar Tomaz Canabrava
A few more fixes for things that broke in commit 7be962bfc287 ("Move subsurface-core to core and qt-mobile to mobile-widgets"). [Dirk Hohndel: slightly edited and overlap with Linus' patch removed] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05Fix include pathsGravatar Linus Torvalds
As expected, commit 7be962bfc287 ("Move subsurface-core to core and qt-mobile to mobile-widgets") caused some breakage. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Make gas change events always have a cylinder indexGravatar Linus Torvalds
In commit df4e26c8757a ("Start sanitizing gaschange event information") back about a year and a half ago, I started sanitizing the gas switch event data, allowing gas switches to be associated with a particular cylinder index rather than just the gas mix that is switched to. But that initial step only _allowed_ a gas switch event to be associated with a particular cylinder, the primary model was still to just specify the mix. This finally takes the next step, and *always* associates a gas switch event with a particular cylinder. Instead of then looking up the cylinder by trying to match gas mixes at runtime, subsurface now looks it up when loading the dive initially as part of the dive fixup code. The switch event still has an a separate gas mix associated with it, but this patch also starts preparing for entirely relying on the gas mix in the cylinder itself, by starting to pass in not just the event but also the dive pointer to the routines that look up gas mix details. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Move subsurface-core to core and qt-mobile to mobile-widgetsGravatar Dirk Hohndel
Having subsurface-core as a directory name really messes with autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an autocomplete conflict and also was inconsistent with the desktop-widget name for the directory containing the "other" UI. And while cleaning up the resulting change in the path name for include files, I decided to clean up those even more to make them consistent overall. This could have been handled in more commits, but since this requires a make clean before the build, it seemed more sensible to do it all in one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Don't write back dive data that hasn't changed in gitGravatar Linus Torvalds
This caches the git ID for the dive on load, and avoids building the dive directory and hashing it on save as long as nothing has invalidated the git ID cache. That should make it much faster to write back data to the git repository, since the dive tree structure and the divecomputer blobs in particular are the bulk of it (due to all the sample data). It's not actually the git operations that are all that expensive, it's literally generating the big blob with all the snprintf() calls for the data. The git save used to be a fairly expensive with large data sets, especially noticeable on mobile with much weaker CPU's. This should speed things up by at least a factor of two. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Change the git progress update callback signatureGravatar Dirk Hohndel
This way we can include additional text. This will be used in later patches. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23typo fixGravatar Werner Macho
small typo fix for GUI Signed-off-by: Werner Macho <werner.macho@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23When changing units from psi to bar first change value, then maxGravatar Robert C. Helling
otherwise the max interferes with the value. Furthermore this increases the max values a bit. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-22Don't start Add or Plan while accessing cloud storageGravatar Dirk Hohndel
This avoids a race condition where we get confused about our internal state. Fixes #1031 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-22Make the reserve gas units awareGravatar Robert C. Helling
In the planner, for recreational mode, there is a setting indicating the pressure at which the diver should be back at the surface. This pressure was hardcoded to bar. Fixes #1027 [Dirk Hohndel: small modifications, more reasonable step for psi, more reasonable maxima] Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-22configure OSTC/OSTC3: Bugfix depth parameter unitGravatar Anton Lundin
The unit for the depth parameters ain't meters, its 0.1 meters. This caused the values stored to be out of range. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-19Preferences: fix missing slot problem when creating new accountGravatar Dirk Hohndel
This is still a left over from the damage done when creating the preferences objectification. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Silence warnings in facebook_integration.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Silence warnings in printdialog.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Silence warnings in locationinformation.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Silence warnings in configuredivecomputerdialog.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Silence warnings in divelogexportdialog.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Remove unused member functionGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Silence warnings in divelogimportdialog.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Silence warnings in subsurfacewebservices.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Silence warnings in starwidget.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Silence warnings in simplewidgets.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Silence warnings in modeldelegates.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Silence warnings in mainwindow.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Silence warnings in downloadfromdivecomputer.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Silence warnings in diveshareexportdialog.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Remove unused member functionGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Silence warnings in divelistview.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Silence warnings in subsurfacewebservices.hGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Clean up signedness confusion in statisticswidget.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07Remove unused variableGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-29templatelayout.cpp: fix potential issue in preprocessTemplate()Gravatar Lubomir I. Ivanov
The function preprocessTemplate(), did not account well for indexes in Grantlee variables, such as: dive.weight# (where # is the index) dive.cylinder# To solve the issue the list (QList<QPair<QString, QString> >) for variables to be replaced is populated will all possible indexes: 0 - MAX_WEIGHTSYSTEM for weights 0 - MAX_CYLINDERS for cylinders Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-29templatelayout.cpp: add a HTML preprocessor stageGravatar Lubomir I. Ivanov
The current Grantlee template loading scheme does not allow a preprocessing layer. With the recent DiveObjectHelper changes the layer is required if we don't want to add a set of dummy methods and Q_PROPERTIES which will only inflate the DiveObjectHelper class. Use the already present helper readTemplate() to load the raw HTML template and pass it to a static function which does some variable replacement to accomudate DiveObjectHelper. This change is done for the sake of not breaking the Grantlee HTML variables on the user side! Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-23Divelogs.de import: encode + character on passwordGravatar Miika Turkia
Upload seems to work as is... Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-02Update copyright for 2016Gravatar Jan Mulder
Trival string update. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-31Attempt to detect time format on CSV importGravatar Miika Turkia
This attempts to detect the time format when initially importing a CSV file. Well, only the minutes:seconds notation is detected currently. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-31Attempt to detect date format on CSV importGravatar Miika Turkia
This tries to detect the date format when initially reading a CSV file for importing. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-26Fix build breakageGravatar Dirk Hohndel
Introduced in commit 31462f150dff ("We already have a QNetworkAcessManager global, use it"). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-26Move CloudStorage out of the widgetsGravatar Tomaz Canabrava
Cloud Storage is a non-gui based class, we currently use two different approaches for cloud storage, one on the desktop target and other on the mobile target, we should use only one. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25Start to use the QSettings ObjectWrapperGravatar Tomaz Canabrava
start of the QSettinsg Object Wrapper usage on the code this first patch removes two macros that generated around 200 lines in runtime for something like a quarter of it Basically, whenever we changed anything we called the PreferencesDialog::settingsChanged and connected everythign to that signal, now each setting has it's own changed signal and we can call it directly. The best thing about this approach is that we don't trigger repaints for things that are not directly profile related. ( actually we still do, but the plan is to remove them in due time) this commit breaks correct atualization of the profile (because everything was connected to PreferencesDialog::settingsChanged) and now I need to hunt a bit for the correct connections Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-22configure OSTC/OSTC3: Add safety stop parametersGravatar Anton Lundin
This adds the configure parameters for safety stops on the hwOS(OSTC3) and OSTC computers. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-22configure OSTC3: Add temperature sensor offsetGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-19Fix UI issue with location managementGravatar krisalpha
The index in the fixpopup function was incorrect which caused the user to need TWO cursor down presses to move to the second element. I changed the index value so the user now needs only one key press to traverse up/dowm. Fixes #954 Signed-off-by: krishan Chopra <choprakrishan61@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-17Hide the time from trip tabGravatar Miika Turkia
This hides the start time when viewing trip details. See #964 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-17Mark date field readonly on trip editGravatar Miika Turkia
The date comes from the first dive in trip, thus no need to allow editing (especially since the edited date seems to be discarded in any case). Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-12Be more precise in our language: call it "mean depth"Gravatar krisalpha
As pointed by jwhferguson, I changed "show average depth" to "show mean depth". I modified file preferences_graph.ui and changed the text. This bug was reported on fedora 22. i use ubuntu.layout and justification is nicely displayed. The patch also removes a no longer necessary include. See #922 Signed-off-by: krisalpha <choprakrishan61@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-08Fix memory leak on the printing systemGravatar Tomaz Canabrava
We forgot to delete the Grantlee object before creating a new one Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-08Simplify Finding the TemplatesGravatar Tomaz Canabrava
We don't need a list of QFileInfo if we are not using it much better to have a list of the files directly Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>