Commit graph

14223 commits

Author SHA1 Message Date
Dirk Hohndel
45c19fd11e Travis: add Qt 5.9 testing
This is done via Fedora 27 which seemed the easiest way to get a 5.9 based
distro.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-11 13:49:25 -07:00
Dirk Hohndel
8fa9eabb47 Travis: add Qt 5.7 testing
This is done via Fedora 26 which seemed the easiest way to get a 5.7 based
distro.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-11 13:49:25 -07:00
Dirk Hohndel
6a9a185ffc Update mailmap
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-11 12:22:02 -07:00
jan Iversen
b15f6f3d4a core: remove clang warning in divesite.c
Add () in complex condition to avoid clang warning.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-11 12:59:33 +02:00
Dirk Hohndel
0a4dcd59b0 Travis: add Qt 5.6 testing
This is done via OpenSUSE Leap/42.3 which seemed the easiest way to
get a 5.6 based distro.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-10 19:41:43 -07:00
Dirk Hohndel
3b8c576d95 build-system: we always require QtQuick and QtLocation
No point in listing them twice as extra components.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-10 15:44:27 -07:00
jan Iversen
4a4bc1c8f3 core: add version variables to qPref and make it qml loadable
add canonical_version and mobile_version to qPref

Having a property in qPref, allows the use in qml, and prepare the
interface for qml testing.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-10 10:30:50 -07:00
jan Iversen
06593bd642 ssrf: mobile-helper, check return code from qmlRegisterType
add check for return code in qmlRegisterType calls, and log a
message if failed

There are a lot of name restrictions (e.g. must start with a capital letter).

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-10 10:30:50 -07:00
jan Iversen
8d66633fe7 core: make qPref::cloud_status the only version of the enum
add enum to qPref and remove elsewhere
update source core to reference qPref.

the enum cannot be in pref.h because it is to be used in qml and Q_ENUM
need the enum to be defined as part of the class

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-10 10:30:50 -07:00
Miika Turkia
7103f36c7c UDDF import: add support for decimal comma for depth
Depth values might apparently contain decimal comma instead of decimal
point with some locale settings. Thus add support for both of them.

Fixes #1485

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-07-10 10:21:13 -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
Dirk Hohndel
d008a07e2b Latest translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-09 15:49:24 -07:00
Dirk Hohndel
7ab9bf3ad7 Travis: build iOS against Qt 5.11.1
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-09 15:23:49 -07:00
Dirk Hohndel
066e01f66d Travis: build macOS against Qt 5.11.1
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-09 15:23:49 -07:00
Dirk Hohndel
e928c829d3 Travis: install from Homebrew instead of using a cache
Clearly something has changed here. When I first tried to use Homebrew on
Travis the update would take often so long that the build would time out. Now
it is nice and fast. So instead of wasting time with the cache let's just use
Homebrew directly.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-09 15:23:49 -07:00
Dirk Hohndel
054f66bb1e Travis: update to macOS 10.11 based image
Qt 5.11 requires macOS 10.11.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-09 15:23:49 -07:00
Dirk Hohndel
25b78d7379 build.sh: provide usage message and exit on unknown arg
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-09 15:23:49 -07:00
Dirk Hohndel
e15b41827c build-system: allow selection of Debug or Release build
So far we did a rather odd mix by default.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-09 15:23:49 -07:00
Salvador Cuñat
3ec508cdcd user-manual: Update Spanish translation to f3db29846
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2018-07-09 15:23:38 -07:00
Salvador Cuñat
f24f99a80a user-manual: Update Spanish translation to English 220905422
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2018-07-09 09:25:05 -07:00
Berthold Stoeger
6a4f1e0ed3 Update CHANGELOG.md
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-09 09:12:58 -07:00
Berthold Stoeger
a741f505ca Dive pictures: differentiate between IO-error and unknown format
Show different images for IO-error and unknow file format.

Use file-extensions to recognize video files if we couldn't
parse them.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-09 09:12:58 -07:00
Berthold Stoeger
f8f8735cfe Dive pictures: Import unknown-type icon
Import an "unknown-type" icon from the KDE breeze theme, which is
licensed under the LGPL. This icon will be shown for file for which
we couldn't determine whether this is a picture or a video.

Source: https://github.com/KDE/breeze-icons

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-09 09:12:58 -07:00
Alexander Wilms
12519af8b4 Install subsurface.appdata.xml
This is required to make Subsurface show up in Gnome Software & KDE Discover

Signed-off-by: Alexander Wilms <f.alexander.wilms@gmail.com>
2018-07-08 20:24:24 -07:00
Lubomir I. Ivanov
fe2f665ebe CHANGELOG.md: fix bad markdown formatting
The # and <> characters introduced formatting issues,
for those who wanted to view our changelog in the Github
repository.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-07-08 11:06:34 -07:00
Berthold Stoeger
3d7865cf26 Dive pictures: detach ProfileWidget2 from DivePictureModel
As long as ProfileWidget2 and DivePictureModel showed the same set of
pictures and any change would lead to a full recalculation of the set,
it made sense to let ProfileWidget2 use DivePictureModel's data.

Recently, keeping the two lists in sync become more and more of a
burden. Therefore, disconnect ProfileWidget2 and DivePictureModel. This
will lead to some code-duplication and perhaps a temporary drop in
UI-performance, but in the end the code is distinctly simpler and also
more flexible.

Thus, for example the DivePhotoTab could be changed to support headings
without having to touch ProfileWidget2 at all.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-08 11:00:44 -07:00
Berthold Stoeger
b28dba6087 Dive pictures: Recognize video files
When generating thumbnails, test for video files. If it is, use
a dummy-thumbnail. Write only the type (video), but no image to
the thumbnail cache, for forward-compatibility.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-08 07:41:15 -07:00
Berthold Stoeger
9a844a075c Dive pictures: Import video icon
Import a video icon from the KDE breeze theme, which is licensed
under the LGPL. This icon will be used as a dummy-placeholder
for video files.

Source: https://github.com/KDE/breeze-icons

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-08 07:41:15 -07:00
Lubomir I. Ivanov
22ed70d6fb CHANGELOG.md: update with the recent save-git fix
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-07-07 17:42:10 -07:00
Lubomir I. Ivanov
94d6e5d851 save-git: allocate user_info members on the heap
subsurface_user_info() only works on Linux (linux.c),
but it doesn't allocate values on the heap.

Solve this ownership problem by always allocating
.name and .email on the heap in subsurface_user_info()
and freeing in the caller.

If subsurface_user_info() did not modify any of the
values from NULL, use default ones, but allocate them
on the heap too.

Ref #1346

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-07-07 17:42:10 -07:00
Dirk Hohndel
2de5b95acf build-system/macOS: don't get libgit2 from pkgconfig when building it ourselves
Doing that confuses the build setup and as a result the library isn't found at
runtime without some fixups.

Fixes #1469

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-07 11:32:43 -07:00
Dirk Hohndel
5c403edf79 build-system/macOS: fix up the id of libssh2 as well
For some reason we only tried to fix libgit2 but not the libssh2 that it depend
on. Weird.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-07 11:32:14 -07:00
Dirk Hohndel
c0a08b889e build-system/macOS: correctly test if we need to adjust the id of libgit2
The existing test was backwards and never worked.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-07 10:59:53 -07:00
jan Iversen
516e3421b1 core: update qPrefDisplay.cpp to use all qPref macros.
change qPrefDisplay.cpp to use qPref_private macros, for each variable. The macros
used depend on how standard the variable is handled.

Remark: this commit is production code, but qPrefDisplay is NOT integrated into
SettingsObjectWrapper and thus not active in the live system

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-07 09:44:06 -07:00
jan Iversen
2971984687 core: add macros to handle get/set/loadsync functions
Add macros to handle get/set/loadsync function set functions in qPref

These macros are only convinience functions to write less for all those
variables who are traited standardized.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-07 09:44:06 -07:00
jan Iversen
e3767fdc43 core: add macros to handle setter functions
Add macros to handle full function set functions in qPref

Remark: the function name is fixed to be "set_<name>" where name is
identical to the variable in struct preferences

This is not our standard naming, but is consistent with struct
preferences (that also use different name schemes).

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-07 09:44:06 -07:00
jan Iversen
7ee1aab728 core: add macros to replace getter functions
Add macros to handle full getter functions

Remark: it is assumed the name of getter function is identical to
the name in struct preferences.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-07 09:44:06 -07:00
jan Iversen
ce358fdb68 core: qPref private add macros to replace disk* functions
Use a private QSettings variable, instead of declaring it each time

Add macros to handle full disk* functions

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-07 09:44:06 -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
jan Iversen
55c3afc075 core: pref.h rename showDeveloper to show_developer
change to use same name pattern as other variables.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-07 09:44:06 -07:00
Dirk Hohndel
cd5eed4605 git storage: avoid warning about "Unmatched action 'hash'"
In commit f3ef38ca0d ("Dive pictures: remove hashes") we removed picture
hashes, but removing them from the git parser causes an ugly red warning when
opening an existing cloud storage repo. With this patch we just silently ignore
the hash.

Fixes #1473

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-07 07:35:45 -07:00
Dirk Hohndel
03bc40194d core: don't crash on merge of non-existing dive site
While we shouldn't have a dive that references a dive site that doesn't exist,
if we do, we shouldn't crash. And a dive site that doesn't exist is most
definitely 'empty'.

Reported-by: Benjamin Fogel <nystire@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-06 22:40:18 -07:00
Dirk Hohndel
7297c5991b build-system/macOS: remove outdated message about errors
This hasn't been true for a long time.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-06 22:18:38 -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
4595ccb9f9 build-system/macOS: copy one more library when building against Qt5.11
I don't quite understand why this one is missing, but otherwise the map doesn't work.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-06 17:23:54 -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
Dirk Hohndel
0620c81594 build-system/macOS: try both possitble locations for googlemaps
And don't show an error for the one where it isn't.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-06 17:20:53 -07:00
jan Iversen
d1ee789558 ssrf: remove LIBRARY_PATH from makefile
build.sh (line 468,469) uses LIBRARY_PATH, but make can do without.

Removed LIBRARY_PATH

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-06 08:04:20 -07:00
jan Iversen
70c000c905 ssrf: add "make check" to central makefile
extend ssrf/makefile with "make check" option.

This is just a convinience function, to not need to "cd build" first

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-06 08:04:20 -07:00