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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>