Commit graph

541 commits

Author SHA1 Message Date
jan Iversen
4b68329c9d core: create qPrefCloudStorage from SettingsObjectWrapper
Update set/get functions to follow common name scheme:
- get function have same name as in struct preferences
- set function have set_<name> (from struct preferences>)
- signal function have <name>_changed (from struct preferences>)

one class one .h/.cpp is the C++ idiom. Having load/sync of each
variable in 1 functions (in contrast to the distributed way SettingsObjectWrapper
handles it) secures the same storage name is used. Having the set/get/load/sync
functions grouped together makes it easier to get an overview.

REMARK: this commit only defines the class, it is not active in production
Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-21 07:49:25 -07:00
jan Iversen
3c3729711c core: remove QSettings in qPref* and use a shared variable
Add qPrefPrivate class which contains one QSettings variable,
delete QSettings from qPref* class definitions

this secures there are only instance of QSettings
(QSettings needs to be in a QObject class to work)

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-18 10:40:08 -07:00
jan Iversen
3a314c3dec core: copy Animations from SettingsObjectWrapper to qPref as its own class
Update set/get functions to follow common name scheme:
- get function have same name as in struct preferences
- set function have set_<name in struct preferences>
- signal function have <name in struct preferences>_changed

one class one .h/.cpp is the C++ idiom. Having load/sync of each
variable in 1 functions (in contrast to the distributed way SettingsObjectWrapper
handles it) secures the same storage name is used. Having the set/get/load/sync
functions grouped together makes it easier to get an overview.

REMARK: this commit only defines the class, it is not active in production
Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 19:07:49 +02:00
jan Iversen
fe38a768f2 ssrf: move functions from mobile-helper to mobile-main
Move few mobile only functions from mobile-helper to mobile-main

remove subsurface-mobile-helper

file structure is now subsurface-*-main.cpp + subsurface-helper.cpp

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 08:08:00 -07:00
Jocke
8106e533ef Match openssl versions
The versions for openSSL in variables.sh and get-dep-lib.sh needs to match or we end up recloning the repo on every build.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-07-12 07:58:08 -07:00
Jocke
2fa7d3566b Add comment to variables.sh
Add a comment to the variables.sh file so we don't forget to update
qt version in the qt-installer-nontineractive file as well.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-07-12 07:58:08 -07:00
Dirk Hohndel
dc2f0f8e48 Travis: build Android against Qt 5.11.1
Instead of dealing with the challenges of downloading and installing the
official package (which really prefers to be run interactively and
frequently caused Travis failures) we get the pre-packed bits from our
cache instead.  Less data to transfer, quicker install.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-09 22:20:18 -07:00
Dirk Hohndel
c62ce43ecf Android: update to use Qt5.11.1
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-09 16:01:29 -07:00
jan Iversen
e5dace2233 core: copy Display from SettingsObjectWrapper to qPref as its own class
copy Display from SettingsObjectWrapper to qPref as its own class
file. Update Display to use a common load/sync scheme.

Update set/get functions to follow common name scheme:
- get function have same name as in struct preferences
- set function have set_<name in struct preferences>
- signal function have <name in struct preferences>_changed

one class one .h/.cpp is the C++ idiom. Having load/sync of each
variable in 1 functions (in contrast to the distributed way SettingsObjectWrapper
handles it) secures the same storage name is used. Having the set/get/load/sync
functions grouped together makes it easier to get an overview.

REMARK: this commit are made to show the use of the low level LOADSYNC macros, which will
be used for special cases. This class is NOT linked into the live system.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-07 09:44:06 -07:00
Dirk Hohndel
e0bb8eab15 build-system/macOS: update the signing script
This really isn't useful for anyone but me as I create official binaries.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-06 22:16:47 -07:00
Dirk Hohndel
80bc47fa13 build-system/macOS: update make-package.sh to use macOS 10.11 as base version
Qt 5.11 no longer supports macOS 10.10.
Also use the new long path to identify the SDK.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-06 17:22:35 -07:00
Joakim Bygdell
5fc2e0f80f Shellcheck
Code cleanup using shellcheck.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-07-04 13:11:21 -07:00
Joakim Bygdell
b1de856595 Update android build env.
Update the scripts used to build subsurface-mobile for
andriod to use the variables file.
Removed checks for obsolete Qt versions.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-07-04 13:11:21 -07:00
Joakim Bygdell
e6e9470f81 Add build variables file
This adds a file that contains the variables used in
the android-build-wrapper and build scripts.
This gives a single location for setting which versions
of Qt, NDK and SDK we use when building the mobile app on linux.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-07-04 13:11:21 -07:00
Dirk Hohndel
63297562e6 iOS: find translations again
commit ec0511e824 ("ios: concentrate build dirs") moved the translations around
without updating the way they are accessed, causing our release 2.1.0 on iOS to
not be localized.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-03 14:58:00 -07:00
Dirk Hohndel
15cbbc8cf9 macOS: we don't need to bundle QtDBus
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-03 14:58:00 -07:00
Dirk Hohndel
5a22611c33 macOS: we no longer need libssh2
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-03 14:58:00 -07:00
jan Iversen
d02a03983d core: add qPref.h_and qPrefprivate.h
add 2 header files and 1 cpp file (qPrefPrivate does not have an implementation)

The rewrite/consoliadation of SettingsObjectWrapper, qmlmanager, qmlpref and planner
needs a place to put common private parts (qPrefPrivate) and 1 common class (qPref).

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-04 05:32:30 +08:00
Dirk Hohndel
d6b043cd37 build-system: tell Travis to wait longer for downloads
But simply ignore when building outside of Travis.
Of course since we are building Android in a container, we need to first pass
the environment variable to the container...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-03 14:24:18 -07:00
Dirk Hohndel
d35c3c0fbf build-system: detect libdivecomputer changes in MXE build
Automatically trigger a rebuild of libdivecomputer if it has changed
since the last build.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-25 20:21:13 +08:00
Anton Lundin
d853c477b7 build-system: Only run autoreconf when needed
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-06-22 02:47:58 -07:00
jan Iversen
ff88e7ee99 mobile: remove MapWidget from mobile-resources.qrc
remove MapWidget entries from mobile-resources.qrc, and
reference map-widget.qrc in Subsurface-mobile.pro for iOS

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-21 20:27:58 -07:00
jan Iversen
38bf351cc1 mobile/ios: correct whitespaces to coding standard
correct whitespaces to coding standard
in translations.qrc, qml.qrc and deployment.pri

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-21 04:25:21 +09:00
jan Iversen
d0e9f62624 mobile: add qmlprefs class
add class to cmake and pro
register class

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-15 14:12:14 -07:00
jan Iversen
abc3125b8e ios: add -all to build.sh
-all will build debug and release for the choosen architectures
armv7,arm64,x86_64 without extra parameter and only
x86_64 with -simulator

Use -all to prebuild all 6 variants we support.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-11 09:45:12 -07:00
jan Iversen
ec0511e824 ios: concentrate build dirs
update build.sh to make all builds in build-ios
to keep the git dir as clean as possible

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09 17:18:41 +02:00
jan Iversen
fe7655155f ios: share clones with desktop
Change src dir for clones to subsurface/.. in order to share with
desktop

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09 17:18:41 +02:00
jan Iversen
aab8f0dcf6 profile: make profile self contained
move qmlprofile.* to profile dir, to keep all parts of the
widget in one place.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09 17:16:53 +02:00
jan Iversen
64c0881e9f mobile: decoupled ssrf.qrc and mobile.qrc
remove /subsurface.qrc from .pro
copy missing mapwidget icon references to mobile-resources.pro

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08 17:04:43 +02:00
jan Iversen
771bd4bce4 iOS: move get-dep-lib outside ARCH loop
Fetch all 3rd party libs before entering ARCH loop

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-07 18:43:17 +02:00
Berthold Stoeger
36b9e5e31e Cleanup: fold core/helpers.h into core/qthelper.h
helpers.h included qthelper.h and all functions declared in helpers.h
were defined in qthelper.h. Therefore fold the former into the latter,
since the split seems completely arbitrary.

While doing so, change the return-type of get_dc_nichname from
"const QString" to "QString".

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-06-04 08:50:10 -07:00
jan Iversen
a658f80e27 iOS: updated launchscreen so it is more centered.
The text and icon was so low, that the page started to scroll on
an iPhone (at least on a model 6s).

Anchored Text to top, and icon to text.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-24 10:19:08 -07:00
jan Iversen
46ff506096 build-system: iOS only turn off specific warnings
Turning off all warnings (-w) was too radical.

Only turning off specific warnings.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21 07:26:56 -07:00
jan Iversen
d7e31ebbcd iOS: get rid of ios/Subsurface-mobile
Having a split between ios and ios/Subsurface-mobile is just confusing
and without a practical reason

Move files from ios/Subsurface-mobile to ios and update .gitignore

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-20 11:35:28 -07:00
jan Iversen
16555e663b iOS: remove duplicate of deployment.pri
one deployment.pri is enough

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-20 11:35:28 -07:00
Dirk Hohndel
dce7e46766 Mac: don't try to copy libraries we got from Homebrew
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-19 21:22:31 -07:00
jan Iversen
95bfd3af29 iOS, supress warnings.
Changed .pro file to supress warnings
clang does not allow all of the issued warnings to be
supressed with -Wno-foo, so instead doing -w

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-19 14:05:23 -07:00
jan Iversen
090eb1ee34 iOS, remove linker warnings (version mismatch).
The Qt libraries are compiled as iOS 10.0, we link
as iOS 8.0, this is a problem waiting to happen. First
time we use a Qt function that uses a iOS 10.0 specific
function the app will crash.

Bumping iOS minimum version from 8.0 to 10.0
Removing the 76x icon, which are not valid from 10.0 and forward

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-19 14:05:23 -07:00
jan Iversen
ffdaba6c84 build-system: added get-dep-lib to android/build.sh
Integrated get-dep-lib in android/build.sh

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-18 16:58:16 -07:00
jan Iversen
77b9a62f7f iOS: added get-dep-lib to build.sh
Removed all 3rd party download/clone, and used common
get-dep-lib instead

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-17 11:16:50 -07:00
Anton Lundin
a2065334bb android-build: Remove old libgit2 special handling
And replace it with something that works on a modern cmake.

The upside with using the right linker, we get the symbols resolved
correctly so we don't need to regex the code.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-17 07:36:44 -07:00
Anton Lundin
75205240df android-build: Stop installing ant, we're using grade
Since about a year ago qt-android-cmake shifted to using gradle instead
of ant, and the android sdk's stopped supporting ant to.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-17 07:36:44 -07:00
Anton Lundin
05e6c2dfaa android-build: Simplify and correct
This simplifies the code and uses correct quoting for variables.

This also fixes the sha1-stampfile handling so that we don't build
libdivecomputer every time.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-17 07:36:44 -07:00
Anton Lundin
a8c47cb75d android-build: Build googlemaps plugin same way as others
This reworks the googlemaps build to be more like the other builds, with
the same pattern and way of detecting what we need to do, and when we
need to rebuild it.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-17 07:36:44 -07:00
Anton Lundin
d12e842c68 android-build: Use sed -i instead of home rolled variant
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-17 07:36:44 -07:00
Anton Lundin
fa95a7c56a android-build: Use subsurface source variable
We already have a variable pointing to the source dir for subsurface, so
use it.

This way we can build out of tree, in any directory.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-17 07:36:44 -07:00
jan Iversen
facb524585 iOS, update Info.plist.in note
Info.plist is no longer generated by qmake but by build.sh,
and it is more interesting to highlight the fact that it is
open software

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-17 07:29:49 -07:00
jan Iversen
b39e7ac281 iOS: update weigth... weight to avoid warning
Seems the pro file was forgotten with the rename of weightsysteminfomodel.h

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-11 07:37:18 -07:00
jan Iversen
8341165999 iOS: corrected ^space to tab
Corrected to use correct code style.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-11 07:23:08 -07:00
Dirk Hohndel
2c29cc96a3 Whitespace
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-10 20:46:02 -07:00