Commit graph

9826 commits

Author SHA1 Message Date
Dirk Hohndel
fcc615a497 QML UI: try to remove two binding loops
Let's face it. I have no idea what I'm doing here.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 12:28:08 -08:00
Dirk Hohndel
81999e4667 QML UI: add debug output for echoMode
For some users by default the password characters aren't hidden. Maybe the
debugging output will help us understand what's going on.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 12:20:36 -08:00
Dirk Hohndel
97c23d6ee5 QML UI: cloud credential input: use text input hints
We shouldn't auto-capitalize and the text should only be email address
characters.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 12:19:51 -08:00
Dirk Hohndel
bbcc6fb3c2 QML UI: if remote is same as local cache, don't load / process remote
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 10:06:33 -08:00
Dirk Hohndel
8c1cc4524d Don't reload identical data
If we already have the same SHA loaded and no changes have been made to the
dive list then there is no point in loading the dives again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 10:06:33 -08:00
Dirk Hohndel
bc200c3089 Cloud storage: check the top commit without loading dives
This way we can check if the local cache is in sync with the remote without
always triggering a load of the dives from git.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 10:06:33 -08:00
Dirk Hohndel
739d7d74e7 QML UI: load from cache before trying to sync with the cloud server
This is a simple way to deal with a "no network" situation. But this isn't
ideal, yet, if there is a slow network as the dive list will be reset again
once the sync from the cloud finishes. So there is some more thought needed to
make this work "mostly as expected".

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 10:06:33 -08:00
Dirk Hohndel
83bd46cf79 Add option to not check the remote when loading from git storage
This way we can first load from cache and then update from the network in the
background.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 10:06:33 -08:00
Dirk Hohndel
3a670f8c3b QML UI: don't show "1 of n" for multiple dive computers
This is actually not a change in the QML - it just conditionally compiles out
the code when building Subsurface-mobile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 10:06:32 -08:00
Miika Turkia
de76cb3ebb Fix UDCF import time unit in timedepthmode
The timedepthmode specifies the time in seconds when using si units,
otherwise minutes. This patch implements this support.

Fixes #981

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 23:11:18 -08:00
Dirk Hohndel
99a5a743c4 QML UI: change the way we extract input data from dive edit
Instead of doing the silly "onEditingFinished" we get the strings from the QML
components at the time we commit the change. Much more logical, much more
straight forward, no issues with the TextArea not having an onEditingFinished
signal.

This still has a few open todos: the temperatures aren't parsed, the edit
screen is missing depth and duration, we can't edit the dive time (and it isn't
passed in on the commit). But it's progress.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 22:57:47 -08:00
Dirk Hohndel
9be42fff81 QML UI: correct text for context drawer when adding dive
This needs to say "Save" to indicate that you are saving the data that was
entered.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 21:56:45 -08:00
Dirk Hohndel
0962b504ce QML UI: get add dive closer to being useful
Now we at least start out with the corret date, time and number. This still
isn't functional as a lot of the data aren't used and the way you save the data
is completely silly, but it's another step in the right direction.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 21:37:18 -08:00
Dirk Hohndel
dc0be271bd QML UI: set up time and dive number when adding dive
Most likely when you manually add a dive on a device it is just about to happen
or just ended, so starting out with the current time is likely a good guess.
Which makes it the last dive in the dive list, so give it the next sequential
number.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 21:34:45 -08:00
Dirk Hohndel
dce3869339 QML UI: don't crash when committing changes and unable to find the dive
This mainly happens because add dive is completely broken right now, but in
general it seems to be good policy not to blindly dereference this pointer...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 21:24:29 -08:00
Dirk Hohndel
ce2b910cdb Two more helper functions for the QML manager
I'm not sure this is the best way to do this - QML should be able to get to the
model data directly (I hope?). But this seems to work and I need it to make Add
Dive be semi-correct.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 20:02:23 -08:00
Dirk Hohndel
763986b683 QML UI: when adding a dive, start in edit mode
Obviously we don't want to "view" a new dive, we want to "edit" it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 17:06:52 -08:00
Dirk Hohndel
9db615a004 QML UI: show app name in the top bar as Subsurface mobile
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 13:47:23 -08:00
Dirk Hohndel
6b10c45b2f QML UI: mark locations with GPS data
In the dive detail view, if a location has an associated GPS location, show the
name of the location underlined so the user knows that tapping on it will open
a browser window with a map picture.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 13:33:11 -08:00
Dirk Hohndel
bf239e7c42 QML-UI: add hacky, useless way to show the GPS location of a dive
This is of course stupid and NOT what we want to do, but one could argue it's
better than nothing (well, not sure, whatever). If we have a GPS location
associated with a dive and you tap on the location name when showing the dive
details, it opens a static image of a satellite map with a marker for the dive
site.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 13:33:11 -08:00
Dirk Hohndel
7ffe7a8c8a Dive list model: add GPS string access
If the QML UI needs the GPS information, we need a way to get to it.
I'm not convinced that having it as comma separated string is the best way to
go, but that's what I need for the Google API so that's what I picked for now.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 13:33:10 -08:00
Dirk Hohndel
07a0ef2139 QML-UI: attempt to improve profile scaling
This still doesn't address all the issues, but appears to be a step
forward. It also contains some debug output to better understand what's
going on.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 09:03:33 -08:00
Dirk Hohndel
320ff2eba3 Android build: use better sed syntax
There is no reason to use '!' as separator and in some shell environments this
can cause problems.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-25 21:58:30 -08:00
Dirk Hohndel
8e299727df QML-UI: fix black squares on some Android devices
It appears that one some Android devices there is an interaction between
Qt and the GL implementation that results in black squares instead of
icons being shown on the screen.

Disabling the GammaAdjust avoids running the shader and fixes this
problem.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-24 17:57:40 -08:00
Dirk Hohndel
b747e1bc72 Android build: more tweaking
Don't ever link against a shared libcrypt. One of the recent changes to
make things build on the various Linux build systems apparently broke the
Android build as it now adds an extra -lcrypt right after the correct
static link to libcrypt.a. Instead of fiddling even more with this and
re-breaking all the other builds I just hack around it here and remove any
calls to a simply -lcrypt as that won't work on Android.

This also passes through the remaining options on the command line to make
so we can do things like VERBOSE=1 or -j12

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-24 09:52:56 -08:00
Dirk Hohndel
697bd94198 Android build: allow selecting Debug / Release build
And never build the tests. Makes no sense to do so when cross building for
Android.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-24 09:48:44 -08:00
Dirk Hohndel
b87df3ecaa Cmake: don't add the BT_SUPPORT define too early
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-21 10:53:55 -08:00
Dirk Hohndel
a7cf7eb967 iOS build: more progress
Most of the dependencies build now.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 14:46:59 -08:00
Dirk Hohndel
0873d46a64 iOS build: only build the parts of openssl that we need
No point in creating the apps, etc.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 13:36:12 -08:00
Tomaz Canabrava
63b01b7510 iOS build: make it possible to compile openssl
It compiles but the link stage fails because of a missing -LSystem
but its a baby step.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 12:16:12 -08:00
Dirk Hohndel
813e49d202 iOS build: baby steps
Get a couple more dependencies built. These were easy.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 10:25:13 -08:00
Dirk Hohndel
8ddb2ebd6b iOS build: hack to build and install libsqlite3.a
Building the iOS command line utility fails. But frankly, we don't need that,
anyway. I cannot figure out how to tell sqlite that all I want is the library,
so I'm working around that by first building the library, then pretending that
sqlite3 was indeed built in order to be able to run make install. Horrible,
ugly, stupid. But it seems to work.

Also cleaned up the whitespace.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 10:25:10 -08:00
Dirk Hohndel
b5c30971b6 iOS build: make the README a bit more useful
Still not all that useful, though.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 08:28:53 -08:00
Dirk Hohndel
55b6eaae0b iOS build: fix typo in CFLAGS argument
This way the gethostuuid workaround actually works. It still doesn't compile,
though.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 08:26:30 -08:00
Tomaz Canabrava
2316390c1f Rework the env - variables to produce a working cross compile script
The cross compile script kind of works right now, it's missing
something that I'm really not sure where or what it is.

currently sqlite will not build because:
	error: gethostuuid is not defined in iOS

This bug was already opened on sqlite bugtracker for about a year, the
workaround is to pass -DDSQLITE_ENABLE_LOCKING_STYLE=0 to the compilation
flags, which I did but did not work for some reason.

Which is a good error - it shows us that we are actually trying to compile
for iOS.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 08:07:11 -08:00
Tomaz Canabrava
105d698759 Start the iOS cross compile
The build.sh and readme files are the same as the Android ones
and I'll be changing them over time.

The configure-for-ios.sh script is a file that manages to set
everything, compilers frameworks and such, for iOS compilation.

I'll probably dissecate the configure-for-ios.sh file and put it
back on the build.sh, but not now.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 08:06:29 -08:00
Dirk Hohndel
a639332edf QML-UI: log the full version at start
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 08:02:05 -08:00
Dirk Hohndel
2882a1ef41 Remove the non-canonical Subusrface version
It no longer makes sense to lie about the version. If you are running a product
build, then the canonical version is the same version as the plain version used
to be. And in either case it makes much more sense to simply log the full
version information.

We used to have the differently styled versions for different OSs, but I don't
think this is needed anymore. Let's hope this doesn't go down as one of these
"famous last words" moments...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 07:59:50 -08:00
Dirk Hohndel
c819d40c19 Cmake: don't use wildcards when deleting debug components
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-19 22:09:31 -08:00
Dirk Hohndel
dbe0d844f7 Trying to fix persistent build problems
This shouldn't hurt on any platform, but it may help on a couple of
platforms where it appears we are missing libcrypto on the link line.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-19 22:04:20 -08:00
Robert C. Helling
20fa943d25 Don't complain about missing GPS source unless mobile
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-19 19:08:37 -08:00
Dirk Hohndel
c3ebeadb34 QML-UI: allow toggling verbose mode from the UI
Hidden in the Developer menu.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-19 18:41:50 -08:00
Dirk Hohndel
41c59c1c8d QML-UI: more log message when retrieving web user id
At least one tester cannot retrieve their web user id. This should help us
collect more data and figure out why this fails.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-19 16:20:20 -08:00
Dirk Hohndel
b9cd6bf38e QML-UI: actually show the right text for missing cloud credentials
If we have no credentials or invalid credentials, update the text on the start
page accordingly.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-19 16:08:10 -08:00
Dirk Hohndel
e2d5bef073 Switch the Android build.sh to set up mobile build correctly
We now need to set SUBSURFACE_TARGET_EXECUTABLE to MobileExecutable.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-18 07:46:00 -08:00
Dirk Hohndel
dd1c1359a1 Cmake: successfully create the subsurface.nsi file
More issues with the static cmake files. Again we were missing a variable
and needed less quoting. Additionally there was dead / redundant code.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-17 17:06:23 -08:00
Dirk Hohndel
c7278cd9ed Cmake: adjust dlllist.cmake to no longer be created on the fly
Because of this a bunch of variables need to be passed in and the quoting
changes in rather subtle ways.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-17 15:59:15 -08:00
Dirk Hohndel
63290e3155 Cmake: fix variable name case confusion
I don't know why on one of my Macs (running El Capitan, XCode 7.2, cmake 3.4.1)
I get Libssh2_FOUND instead of LIBSSH2_FOUND, but this hack works around the
problem.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-17 12:03:40 -08:00
Dirk Hohndel
88d5fc0fbc Cmake: more use of SUBSURFACE_TARGET and more complete macdepoyqt args
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-17 11:50:41 -08:00
Dirk Hohndel
7c095419f7 Cmake: consistently use SUBSURFACE_TARGET and get the capitalization right
Also clean up a bit of the whitespace mess right where I'm making changes

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-17 11:49:58 -08:00