Commit graph

249 commits

Author SHA1 Message Date
Berthold Stoeger
9ed886e4be Cleanup: lower-case filenames in core/subsurface-qt/
We tend to use lower-case filenames. Let's do it for these files
as well. Simple search & replace.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-04 02:16:46 +01:00
jan Iversen
6cd46bee06 divesummary: add DiveSummary class to shared and backend
Create DiveSummary class in backend-shared and make the DiveSummary calculation
results available to QML.

This adds a loop over all dives (could have been done with a model, but the
models available to mobile are very limited, so use the basic way).

[Dirk Hohndel: renamed the results variable and combined a couple of commits]

Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-27 14:25:03 -08:00
jan Iversen
9de296f3dd mobile-widgets: add themeInterface
Currently subsurfaceTheme resides in main.qml, where it does not naturally
belong.

Add C++ class that will replace subsurfaceTheme in main.qml in a 1-1 manner.

This opens future posibilities
- on top of the 3 themes, allow users to select colors/fonts
- add stylesheets to Template* components
- make day/night shift automatically.

Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-26 16:42:35 -08:00
jan Iversen
fdc2fd35bf mobile-widgets: add pure interface for passing values to QML
Add a header file that contains a duplicate of the enums,
that are needed in QML in one class.
the unit enums are added imidiatly, since they are needed
or will be neede shortly in Settings and DivePlannerSettings

This class will also contain Q_PROPERTY and signal/slot for
variables used in QML. This is done to allow e.g.

deco_mode qPrefUnits::planner_deco_mode()
void qPrefUnits::set_planner_deco_mode(deco_mode)
as strongly typed in C++
and
DECO_MODE planner_deco_mode()
void set_planner_deco_mode(DECO_MODE)
as strongly typed in QML
Remark: wrong assignments gives errors in QML

The advantage over using strings or the value directly is that
QML detects typos and flags them as errors/warnings.

It is important to note that the class may only contain
a) a function call to the implementation
b) a reference to a global variable e.g. prefs.

Added note to the original definitions of the enums that they
have been duplicated.

Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-18 17:31:58 -08:00
jan Iversen
360add37a8 mobile-widgets: remove qmlprefs.*
class is not longer used, remove it.
(also from qml)

Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29 12:20:19 -08:00
jan Iversen
d90a2ca008 build-system: add missing models for iOS build
Append missing models to Qt creator project

Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-26 08:38:08 -08:00
willemferguson
6212bb6721 Preferences UI: final cleanup
This commit does some final cleaning up to the code, mostly deleting
white space and comments.

Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-25 02:57:42 +09:00
jan Iversen
7751ec1c78 build-system: move plannerShared to backend-shared
WARNING: multi directory commit, needed to secure it builds.

move the core/plannerShared.* to backend-shared.

update CMakeLists.txt to include backend-shared lib in link process.

update ios project to reflect new directory

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24 08:44:23 +09:00
jan Iversen
9c52aaf043 build-system: move exportfuncs to backend-shared
WARNING: multi directory commit, needed to secure it builds.

move the core/exportfuncs.* to backend-shared.

update backend-shared/CMakeLists.txt to generate backend-shared lib

update CMakeLists.txt to include backend-shared lib in link process.

update ios project to reflect new directory

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24 08:44:23 +09:00
jan Iversen
3930cc42a5 build-system: add diveplanner to iOS build
Update iOS project solution file

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24 06:30:57 +09:00
jan Iversen
0ab5810a87 build-system: iOS, activate qml compiler
Activate use of qml compiler, which provides:
- more error detection at compile time
- fast qml
- smaller footprint

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-24 03:52:40 +09:00
jan Iversen
7eddaeea21 build-system: iOS, change location of 3rd party builds
move location of 3rd build to follow same pattern as desktop/mobile build

update central .gitignore to silence libdivecomputer/build-ios, this should
really be in libdivecomputer, but it is more easy to put it in a subsurface
controlled file.

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-18 13:29:25 +09:00
jan Iversen
fa8c7ecc58 build-system: iOS, change location of install-root
move from build-ios/install-root/<arch> to
SSRF_CLONE/install-root/ios/<arch>

move fat libraries, include and bin to SSRF_CLONE/install-root/ios

Call "make" and not "make qmake_all" which is just a FORCE dependency.

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-18 13:29:25 +09:00
jan Iversen
543e65e987 build-system: iOS, use ~/Qt
packaging/ios/build.sh expected a link ./Qt to the Qt installation.
scripts/build.sh expect ~/Qt to contain the Qt installation

change to ~/Qt and thus no longer need link

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-18 13:29:25 +09:00
jan Iversen
a637415de1 build-system: add uploadDiveLogsDE to iOS build
Update iOS project solution file

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11 12:36:43 -05:00
jan Iversen
2949ea0fd9 build-system: add uploadDiveShare to iOS build
Update iOS project solution file

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11 11:08:51 -05:00
Berthold Stoeger
4b1a3a1a6e Selection: move selection functions from divelist.c to selection.c
Since we now have a selection.c translation unit, put the selection-
related functions there.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-12-04 13:00:23 +01:00
jan Iversen
06973d7ea0 packaging/ios: add new export files in core to project
Update Subsurface-mobile.pro to contain the new exportfuncs
and referenced files.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-03 21:30:39 -08:00
Dirk Hohndel
6eca1b3ead iOS: fix handling of version option to build.sh
This makes it much more consistent and avoids a silly warning.

Also some small README updates.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
db706193e1 iOS: update Info.plist with better text and missing description key
The NOTICE and copyright are freeform. The new description key is required for
iOS 13, but of course the redundant old key is still required for older
builds...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
3afcff56d4 iOS: build the debug version of Google maps library if needed
When trying to debug on device Xcode really wants a debug build (which is
nearly unusably slow, but that's a different issue).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
a0c47e0fbc iOS: explicitly disable open source SSL implementations
Those aren't allowed on iOS and adding these two flags removes some confusing
warnings that look like errors in the build log.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
3265efcd96 iOS: small change to storeIcon
This was updated by Xcode - just checking it in so that running Xcode doesn't
cause dirty source tree.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
39203a7ebd GitHub Action: add iOS build
This is incredibly brute force, downloading a 3+GB installer and
installing all of the Qt/iOS binaries.

This first attempt is mainly to get an idea how long this will take and
if this will fit within the size constraints of the build VM.  This
commit doesn't even try to build, yet.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-19 08:55:31 -04:00
Berthold Stoeger
619d3fb1fd Cleanup: move gas-functions to own translation unit
But only functions that operate only on gases. Functions concerning
cylinders or dives remain in dive.c or are moved to equipment.c

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-19 13:11:10 -07:00
Berthold Stoeger
bff80cf462 Cleanup: move unit-related functions to own translation unit
Create a units.c translation unit.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-19 13:11:10 -07:00
Berthold Stoeger
7f4d9db962 Cleanup: move trip-related functions into own translation unit
These functions were spread out over dive.c and divelist.c.
Move them into their own file to make all this a bit less monolithic.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-19 13:11:10 -07:00
Berthold Stoeger
6200909ba4 Cleanup: move tag functions into own translation unit
Make dive.h a bit slimmer. It's only a drop in the bucket - but at
least when modifying tag functions not the *whole* application is
rebuilt anymore.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-19 13:11:10 -07:00
Berthold Stoeger
75767c456a Turn application state into enum
The application state was encoded in a QByteArray. Thus, there was
no compile-time checking. Typos would lead to silent failures.

Turn the application state into an enum. Use the enum-class construct,
so that the values don't polute the global namespace. Moreover,
this makes them strongly typed, i.e. they don't auto-convert to
integers.

A disadvantage is that the enums now have to be cast to int
explicitly when used to index an array.

Replace two hash-maps in MainWindow to arrays of fixed sizes.

Move the application-state details into their own files.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-05-12 12:33:55 -07:00
Berthold Stoeger
926b6895bb Build: add DiveListNotifier.cpp to qmake project file
In the future, we will need DiveListNotifier.cpp in mobile builds.
Therefore, add it to the qmake project file for iOS.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-04-12 18:19:07 +03:00
Rolf Eike Beer
d104506f98 CMake: use builtin method to not use BZip2
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-21 19:30:14 -07:00
Lubomir I. Ivanov
a1ffe115cf facebook: remove the featute from the code base
Remove from:
- unit tests
- desktop widgets
- preferences
- core intergration
- cmakefiles
- build scripts
- icons
- docs

Also remove the plugins and social network integration.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2019-02-01 17:16:43 -08:00
jan Iversen
5dd0981961 core/tests: remove QSettings from testgitstorage
update testgitstorage.cpp to use qPrefProxy and qPrefCloudStorage
remove core/prefs-macros.h since it is unused

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25 11:49:47 -07:00
jan Iversen
ebc0e6d3f3 core/tests: merge Animations and add vars. to qPrefDisplay
Add class variable tooltip_position to qPrefDisplay
Add class variable lastDir to qPrefDisplay
qPrefDisplay is updated to use new qPrefPrivate functions
Adjust test cases incl. qml tests

qPrefAnimations only has 1 variable, that really is a display variable
Merge the variable into qPrefDisplay, to simplify setup (and avoid loading
extra page in qml).

correct theme to save in correct place, and make it a static
class variable

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25 11:49:47 -07:00
jan Iversen
da4ced9bdf core: remove SettingsObjectWrapper.*
remove unused files SettingsObjectWrapper.*

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-15 16:11:39 -07:00
jan Iversen
4a7864444b core: create qPrefGeneral from SettingsObjectWrapper
Update set/get functions to follow common name scheme:
- get function have same name as in struct diveComputer
- set function have set_<name>
- signal function have <name>_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-08-14 09:09:06 -07:00
jan Iversen
881395318c core: create qPrefPartialPressureGas from SettingsObjectWrapper
Update set/get functions to follow common name scheme:
- get function have same name as in struct diveComputer
- set function have set_<name>
- signal function have <name>_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-08-14 07:12:41 -07:00
jan Iversen
3cd698361c core: create qPrefGeocoding 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>
- signal function have <name>_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-08-13 15:04:50 -07:00
jan Iversen
63fa532b15 core: create qPrefLanguage 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>
- signal function have <name>_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-08-13 11:49:32 -07:00
jan Iversen
2b11fd4cc8 core: create qPrefLocationService from SettingsObjectWrapper
Update set/get functions to follow common name scheme:
- get function have same name as in struct prefs
- set function have set_<name>
- signal function have <name>_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-08-12 11:30:19 -07:00
jan Iversen
b98ba9ba94 core: create qPrefTechnicalDetails from SettingsObjectWrapper
Update set/get functions to follow common name scheme:
- get function have same name as in struct diveComputer
- set function have set_<name>
- signal function have <name>_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-08-12 07:36:10 -07:00
jan Iversen
e673a3558e core: create qPrefUpdateManager from SettingsObjectWrapper
Update set/get functions to follow common name scheme:
- get function have same name as in struct diveComputer
- set function have set_<name>
- signal function have <name>_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-08-09 08:45:02 -07:00
jan Iversen
357510b9cd core: create qPrefDivePlanner from SettingsObjectWrapper
Update set/get functions to follow common name scheme:
- get function have same name as in struct diveComputer
- set function have set_<name>
- signal function have <name>_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-08-08 14:29:50 +02:00
Dirk Hohndel
7b4d661ff2 iOS: quiet verbose warnings for libzip
And don't try to build manuals, regression tests and examples, while we are at
it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-05 17:54:01 -07:00
Dirk Hohndel
d81a2c812b iOS: fix libzip build instructions
Recent libzip no longer supports autotools.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-04 15:07:04 -07:00
jan Iversen
54335e1ec6 core: create qPrefUnit from SettingsObjectWrapper
Update set/get functions to follow common name scheme:
- get function have same name as in struct diveComputer
- set function have set_<name>
- signal function have <name>_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-08-02 08:59:56 -07:00
jan Iversen
f4f798f8dd core: create qPrefProxy from SettingsObjectWrapper
Update set/get functions to follow common name scheme:
- get function have same name as in struct prefs
- set function have set_<name>
- signal function have <name>_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-30 07:43:22 -07:00
jan Iversen
e0f1817fdc core: create qPrefFacebook from SettingsObjectWrapper
Update set/get functions to follow common name scheme:
- get function have same name as in struct diveComputer
- set function have set_<name>
- signal function have <name>_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-27 12:36:20 -07:00
jan Iversen
0002cd2d20 core: create qPrefDiveComputer from SettingsObjectWrapper
Update set/get functions to follow common name scheme:
- get function have same name as in struct diveComputer
- set function have set_<name>
- signal function have <name>_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-25 08:35:04 -07:00
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
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
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
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
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
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
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
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
jan Iversen
1d5d7d0c47 iOS: cleaned/bumped versions
Made versioning identical to scripts/build.sh

Having the same version of 3rd party libraries across platforms
secures a more stable product.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10 20:43:22 -07:00
jan Iversen
6019688b98 iOS: removed local build of libxml2
script/build.sh uses the builtin libxml2 and do not build locally,
    updated build.sh and Subsurface-mobile.pro to to the same.

    sadly enough xslt is not distributed for iOS so it must be built.

    Apart from simplifying the script it saves build time

    Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10 20:43:22 -07:00
jan Iversen
5aa5398624 iOS: removed local build of sqllite3
script/build.sh uses the builtin sqllite3 and do not build locally,
updated build.sh and Subsurface-mobile.pro to to the same.

Apart from simplifying the script it saves build time

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10 20:43:22 -07:00
jan Iversen
a0030a488a iOS: build.sh does not run configure for libdivecomputer
In a "virgin" repo incl. libdivecomputer, starting by running
ios/build.sh caused an error in libdivecomputer,
because autoreconf was never run.

Changed build.sh to check if libdivecomputer/configure exist, if
not run autoreconf

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10 20:43:22 -07:00
jan Iversen
ff15d48f69 iOS: Allow change of bundle identifier
This patch allows users to set a bundle identifier,
without opening Xcode (set as env. variable).

If the env. variable is not set (like e.g. on Travis) it defaults
to org....

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10 20:40:45 -07:00
Murillo Bernardes
7d6a48b59f iOS: use recommended variable for bundle ID
We used to hard-code the bundle ID which meant that developers always had to
manually override the bundle ID in order to be able to sign the iOS app for
local testing.  With this change, the official builds will continue to work
without manually opening the project in Xcode, yet other developers will use
the Apple-recommended format in order to set their own bundle ID.

This is based on a suggestion by Murillo Bernardes.

See #1246

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-10 08:19:33 -07:00
jan Iversen
161e5e94fc iOS: update build script
Use git repos and checkout corresponding tags where possible.
Use more reliable servers to download source from.

[Dirk Hohndel: refactored Jan's original commit in #1241]

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-09 14:40:31 +02:00
jan Iversen
a351393739 iOS: update build instractions
Updated INSTALL to point at packaging/ios/README
Updated README to 'facts'
Deleted ios_build_instructions as they are covered in README

[Dirk Hohndel: refactored Jan's original commit in #1241]

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-09 14:40:31 +02:00
jan Iversen
c9cb95ba99 iOS, set lowest deployment target to 8.0
Define deployment target, instead of using user default.

iOS 8.0 is the oldest supported platform

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-09 06:28:25 +02:00
Dirk Hohndel
b9e57dbeab iOS: fix typo in build script
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-27 11:54:01 -07:00
Dirk Hohndel
2137b21e1b iOS: allow building for the simulator & switch debug/release builds
It makes sense to be able to control this with command line options.
On Travis this avoids the signing problem and makes the build much faster.
Still should be enough to catch iOS breakage.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-24 15:47:25 -07:00
Dirk Hohndel
2cba24fa1a iOS: don't show all the libgit2 warnings
We aren't concerned about the code quality of libgit2 and with these warnings
the build log overflows.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-24 15:45:35 -07:00
Dirk Hohndel
09edf25366 iOS: build Release by default
And add -debug option to build.sh for debug builds.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-23 09:28:41 -07:00
Dirk Hohndel
f28266bb19 iOS: fix info.plist
Xcode happily accepted the incorrect plist syntax for a boolean and the app
did the right thing when installed locally - but once you upload to the
iTunes store the error causes that to fail.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-14 21:05:49 -07:00
Dirk Hohndel
27b921fb1d iOS: make logfile accessible to user
By creating it in the Documents path and setting the two magic keys,
iOS will make the log file available to the user.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-13 17:07:43 -07:00
Dirk Hohndel
f693678235 iOS: create our own OS support file
Up until now we just reused the macos.c file for convenience, hard coding a
specific file path that may or may not work on iOS.  Instead get the preferred
path from Qt and for this we need to be able to call into Qt, so this needs to
be a C++ file.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-13 17:07:43 -07:00
Dirk Hohndel
a529381af2 iOS: fix build script
The code for building libxml2 and libxslt was broken.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-13 17:07:43 -07:00
Berthold Stoeger
5afe1a53d8 Cleanup: Move *_loc formatting functions into new format.cpp file
qthelper.cpp is already quite voluminous. Move the recently
introduced localized versions of (v)snprintf() and put_format()
into their own translation unit.

Moreover, adopt C-style semantics for asprintf_loc(). This function
will be used to remove fixed-size buffers in core/plannernotes.c.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-04-09 11:29:43 -07:00
Murillo Bernardes
b257b7a027 ios: Link to static googlemaps library
Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-04-06 10:31:07 -07:00
Murillo Bernardes
882120ba65 ios: remove googlemaps unecessary multiple builds
googlemaps archive is a fat file already, containing
armv7, arm64 and x86-64, so no need to build it
multiple times.

Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-04-06 10:31:07 -07:00
Dirk Hohndel
9e457e092c iOS: add MapLocationModel and corresponding helper
Thanks to Murillo Bernardes for reminding me to add the .h files as well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 07:34:46 -07:00
Dirk Hohndel
ce8cad615a iOS: build googlemaps
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 07:33:54 -07:00
Dirk Hohndel
6c3cd24ef8 Android/iOS build: get libxml2 and libxslt from GitHub
The xmlsoft.org links sometimes time out. Sadly, GitHub API gives us an
oddly named top level directory in the tar file, so lets strip that and
replace it with the "usual" name.

Also, for the "raw" tar files from GitHub we need to run autoreconf
ourselves.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-19 12:03:22 -07:00