aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-03-07Silence warnings in git-access.cGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07Silence warnings in gaspressures.cGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07Fix annoyances on file.cGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07Silence more warningsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07Clean up more unused variablesGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> 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-03-07Simplify Q_FOREACHGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07Silence warnings for the GpsLocationGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07Create a constructor with default parameters for some structsGravatar Tomaz Canabrava
Structs and classes in C++ are basically the same thing and we want to create a few zero-initialized values for some of them; Sadly, C++ doesn't have the nice static struct initialization that C has. One way to deal with that is to create a constructor and pass default values to it, another is lambda-initialization, but we don't use C++11, yet. Since we initializate stuff on the constructor, we don't need to re-initializate things again on the initialization list (which is also why I removed the QStrings from the initialization lists, they are automatically initialized to empty) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07Silence warning about unused parameterGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06iOS build: show correct program name on launch screenGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06iOS build: bundle application icons and Info.plistGravatar Dirk Hohndel
This way the iDevice will show the correct name and icon for Subsurface-mobile. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06iOS build: restructure build.sh to create fat librariesGravatar Dirk Hohndel
This way QtCreator can successfully link and deploy the app. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06iOS build: more build.sh hackingGravatar Dirk Hohndel
This now can create all the support libraries in armv7, but that isn't sufficient for QtCreator which wants fat libraries with both armv7 and arm64 in them. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06Revert "iOS build: add the pri file for generating the version"Gravatar Dirk Hohndel
This reverts commit 7fac2a38b2c5a744e1292b37dc0e1e71d3fcf333. Oops, that should have been dropped in the rebase before pushing the changes. I did this instead in commit 99d1d8876eb4 ("iOS build: create ssrf-version.h by hand")
2016-03-06iOS build: create ssrf-version.h by handGravatar Dirk Hohndel
It grabs the mobile version from the cmake file via grep. :facepalm: Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06iOS build: add the pri file for generating the versionGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06iOS build: fix libdivecomputer buildGravatar Dirk Hohndel
This uses new configure options added to the Subsurface-branch of libdivecomputer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06iOS build: fix loading iconsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06qt-gui.h shouldn't include QApplicationGravatar Tomaz Canabrava
[Dirk Hohndel: refactored the iOS patches] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06iOS build: don't include CoreServices on iOSGravatar Tomaz Canabrava
[Dirk Hohndel: refactored the iOS patches] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06Clean up handling of various include fileGravatar Tomaz Canabrava
This is in the context of the iOS port and shouldn't impact any of the other builds. [Dirk Hohndel: refactored the iOS patches] Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06iOS build: add various support filesGravatar Tomaz Canabrava
It's unclear why the build fails if we don't add the sample app files as well. [Dirk Hohndel: refactored the patches] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06iOS build: Updated build scriptGravatar Tomaz Canabrava
This now only builds all the prerequisits but not the actual Subsurface binaries - that will be done with qmake (oh the irony) in a later commit. [Dirk Hohndel: refactored the patches] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-05Android build: pass in build nrGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-05Android build: automate setting the right version numberGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-05Introduce separate version number for Subsurface-mobileGravatar Dirk Hohndel
This is hard coded in version.cmake for now. The intent is to go to 1.0 in the first release version and to increment from there whenever we create an update. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-05QML UI: small modification to About screenGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-04Rewrite the Subsurface-mobile user manualGravatar Dirk Hohndel
This brings the text closer to the current version of Subsurface-mobile, but a lot more fine tuning will be required (and of course the images need to be updated to reflect the current UI). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-04gas model: use virial cubic polynomial formGravatar Linus Torvalds
The "virial" form of the Z compression factor is of the form Z = 1.0 + A*p + B*p^2 + C*p^3 + .. and it's considered the "right" polynomial form to use. It happens to also make for one constant less per gas (since the 1.0 can be added later), and can be used to simplify the expression and avoid a few floating point operations. However, in order for that kind of expression simplification to make sense, we need to make sure that we don't calculate the powers of the pressure multiple times either, and that means we have to inline all the actual calculations. Our compiler options still mean that the generated code isn't optimal, but that's a separate issue. And it is a lot better than it used to be. Being clever about this does potentially make the code a tiny bit less legible, but maybe that's not too bad for something that we'd expect to not ever touch once we get it right. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-03QML UI: make sure the drawer is closed after going back to dive listGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-03QML UI: brute force around Qt 5.6.0 bugGravatar Dirk Hohndel
With the current release candidate of Qt 5.6.0 we get into an infinite recursion of the grid layout engine. This had happened before (prior to the 5.6 beta) and it appeared that setting the maximum width of the columns was sufficient to fix this. But with the RC even that isn't sufficient, so now we give up on having QML figure out the best possible column width and hard code both preferred and maximum width to the same, predefined values. That's a total shame, but at least now we can build against Qt 5.6 without infinite recursions and crashes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-03QML UI: remove commented out / unused codeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-03Build scripts: work with both Qt 5.5 and 5.6Gravatar Dirk Hohndel
This is all a bit hackish but seems to work Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-03Don't access undefined diveGravatar Dirk Hohndel
When walking the dive table we need to stop before accessing the yet-to-be-added new dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-03Avoid dangling else warningsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-03gas model: simplify and improve our Z factor calculationsGravatar Linus Torvalds
Lubomir found better compressibility data for the pure gases that we need for scuba, making the air table superfluous: we get good values from just regular linear mixing of the Oxygen, Nitrogen and Helium calculations. Also, rather than using a quintic polynomial, a cubic one does sufficiently well, making for smaller code and fewer coefficients. And judging by the reactions from people on G+ (as well as just looking at how good the fit is with the air data), this is all the right way to do this, and this thus removes the Redlich-Kwong equation. All-credit-goes-to: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-03QML UI: try to avoid binding loopGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-03use the global showPassiveNotification functionGravatar Marco Martin
don't create a local PassiveNotification copy, use the global show/hidePassiveNotification from ApplicationWindow, now that it works Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-03QML UI: remove incorrect statementGravatar Dirk Hohndel
Not sure what this was even supposed to do... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-03QML UI: show notification for saving dives to cloud as wellGravatar Dirk Hohndel
Fixes #1014 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-03QML UI: ensure that cloud notification is always clearedGravatar Dirk Hohndel
All error cases need to reset it as well. And it's easier to reset it right after we come back from parse_file() instead of trying to track all the exit cases after that. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-02gas model: add polynomials for Z factors of oxygen/nitrogen/heliumGravatar Linus Torvalds
.. and use a linear mix of them for arbitrary gas mixes. For the special case of air, we continue to use the air-specific polynomial. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-02gas model: replace Redlich-Kwong with least-square quinticGravatar Linus Torvalds
This goes back to just doing air compressibility, but using the least-squares quintic polynomial equation that Lubomir generated based on the Wikipedia table for air at 300K in the 1-500 bar range. We might be able to do similar things for mixed gases.. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-02gas model: split up gas compressibility into a file of its ownGravatar Linus Torvalds
The gas compressibility is such a specialized thing that I really prefer having it separate. This keeps Robert's Redlich-Kwong equation as-is, but let's experiment with other models soon... Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-02QML UI: show notification when cloud is accessedGravatar Dirk Hohndel
And hide the notification either after 5 seconds or once we are done. This requires an extension to the Kirigami components that isn't upstream, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-02QML UI: new property to tell the UI that we are accessing cloud storageGravatar Dirk Hohndel
This can then be used to give the user visual feedback (instead of them just thinking the app is hung). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-02QML UI: resolve confusion about dive list model orderingGravatar Dirk Hohndel
Oops, I forgot to take the sort model on top of the model into account. Now everything should stay consistent - ListView order when accessed from QML, but internal order when accessing the underlying array. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-02QML UI: update profile when editing duration of manually added diveGravatar Dirk Hohndel
We need to make sure that a new fake DC is created after the duration was changed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-02QML UI: update the correct dive in the model when committing a changeGravatar Dirk Hohndel
When manually adding a dive and moving it in the dive list (by editing it's start time) we could create a situation where the dive list internally was correct, but the dive list model on screen showed an incorrect dive list with the new dive in two different spots. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>