Commit graph

14295 commits

Author SHA1 Message Date
jan Iversen
aa0a918082 core: qPrefDisplay update CHANGELOG.md
added note about "show developer" menu being stored on disk

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 19:01:31 +02:00
jan Iversen
b41fa07efa tests: add qPrefDisplay qml testcases
add test of qml C++ interface

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 19:01:31 +02:00
jan Iversen
1ef3f61cc9 tests: add qPrefDisplay testcases
remove test macro, split in functions and add test cases

the existing test macro does not work because
sync() does not save these variables to disk (set* does)

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 19:01:21 +02:00
jan Iversen
8f7f1cacd6 tests: make qprefdisplay test file
Remove display tests from testpreferences and make a new file

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 18:44:31 +02:00
jan Iversen
928fc1ee79 core: move load of display variables to qPrefDisplay from SettingsObjectWrapper
ensure SettingsObjectWrapper load() loads all display variables.

Copy font setting code from SettingsObjectWrapper to qPrefDisplay

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 18:44:31 +02:00
jan Iversen
9732194bf8 core: sync display variables from struct preferences when ssrf terminates
Add qPrefDisplay sync to sync in SettingsObjectWrapper.

If a program part change display variables in struct preferences, they would
not be saved on disk.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 18:44:31 +02:00
jan Iversen
da61c1714f core: activate qPrefDisplay in SettingsObjectWrapper
add the prepared class qPrefDisplay to SettingsObjectWrapper and thereby making it active.

As a consequence of the uniform naming standard desktop-widgets/preferences_defaults.cpp and
tests/testpreferences.cpp have been updated.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 18:44:31 +02:00
jan Iversen
d7fed0bcb7 tests: update testqml to use shared register_qml_types()
add subsurface-helper.cpp to TestQML target
remove local qmlRegisterType() and add register_qml_types() instead

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 18:34:54 +02:00
jan Iversen
f354592050 ssrf: prepare subsurface_helper.cpp to be used by testqml
add test for SUBSURFACE_TEST_DATA to exclude functions not used when testing

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 18:34:49 +02:00
jan Iversen
35eecaa82a tests: add .gitignore to ignore qmlc files
With Qt 5.11 the qml compiler is included and qmlc files created in the same
directory as the qml file (at least for the qml test harness).

ignore *.qmlc

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 17:12:56 +02:00
jan Iversen
b05e4c7b5f tests: make qml test harness
build a qml test runner that includes ssrf interface

The qml test runner allows having qml test files.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 17:12:56 +02:00
jan Iversen
55f0b3b1f8 ssrf: add QuickTest to test libraries.
QuickTest enables QML TestCase which are used for qml testing

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 17:12:56 +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
2c402b0fcf ssrf: combine subsurface-*-helper into subsurface-helper
combine shared functions like init_ui and run_ui in one file

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 08:08:00 -07:00
jan Iversen
ab05fe3cf8 desktop-widget: move qmlRegister from mapwidget to shared helper
Remove qmlRegister in desktop-widgets/mapwidget in order to have a shared
registration in subsurface-helper.cpp

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 08:08:00 -07:00
jan Iversen
8cc0b6dbc1 ssrf: add shared helper file
add subsurface-helper.cpp to share functions between mobile and desktop

move mobile qml registrations to a shared function (avoiding differences in registrations)

Target is to replace current subsurface-desktop-main + subsurface-desktop-helper and
subsurface-mobile-main + subsurface-mobile-helper with
subsurface-*-main + subsurface-helper

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 08:08:00 -07:00
Jocke
a56a7c51f6 Add comment to get-dep-lib.sh
Add a comment so we remember to change the version number in versions.sh also.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-07-12 07:58:08 -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
Jocke
feb256f61e Update non-interactive qt installation
With commit c62ce43 the Qt version where updated to 5.11.1,
this updates the qt install script to match the versions of the Qt parts we want.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-07-12 07:58:08 -07:00
Jocke
59465b85f6 Don't show decimals on pressures
As per discussion in #1460 there is no point in showing decimal values
for pressures in the equipment tab on desktop or in the dive edit view on 
mobile.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-07-12 17:15:05 +03:00
Berthold Stoeger
a8bfa5f053 Dive media: add ".mov" to list of known video extensions
This was an oversight in b28dba6087.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-12 02:18:09 +03:00
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