Mostly replace "return (expression);" by "return expression;" and one
case of "function((parameter))" by "function(parameter)".
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
And another one. The SwipeListItem also needs to have a set
background color. Unfortunately, the lines between the
individual SwipeListItem disappeared, so, set the
smallest possible border on these items.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Also, this got broken after the Kirigami to verion 2.2 in main.qml.
So, set the header background color according to our theme setting.
Notice, that there is a remaining issue here. We could color the
text color in the header, but now, this seems impossible (or I
do not understand how and where to set this).
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
For some reason, after the update of the main.qml to version 2.2,
all Kirigami Pages and scrollablePages show up plain white.
So now, set a proper background for these pages.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This is subtle one. With the changing of the theme color, it
appeared that the hover and selected colors in the divelist
where wrong (as in, always blue-ish). This is easily solved
by setting the activeBackgroundColor to our theme color, and
Kirigami does the rest (tint and opaque settings for the
different states a selected dive can be in).
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This is a long standing issue. I wish to keep up with Kirigami developments
including new versions of their controls, but this is not always easy.
While we upgraded to Kirigmi 2.2 for most of our QML earlier, using this
new version of main.qml breaks numerous stuff. In fact, so much that
we just needed to wait.
With the progress in Kirigmi, it is now possible to upgrade, with still
some issues on our side to be fixed, but this is manageble now.
The main show-stopper was a construct to set our theme colors, for example:
Kirigami.Theme.highlightColor = Qt.binding(...)
This is not posssible any more, as the Kirigami.Theme has made these
readonly on their end.
This commit just removes the assignments to the now readonly theme
items. And the setting of a correct theme color for the action button.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This unifies behavior of XML & git saving. Now, in both cases, the
picture hash is extracted from the filename-to-hash map instead of
using the picture structure.
This seems more robust, because the picture structure is not necessarily
updated by learnHash(). The latter may operate on a copy of the picture
structure.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The following statement in the hashstring() function:
return hashOf[QString(filename)].toHex().data();
returns data of the temporary QByteArray generated by toHex().
Thus, the caller will access released memory, which could lead to
data corruption.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Cleanup only. It seems a little weird to first define a
CMAKE_MODULE_PATH search path and then explicitly include
files including a hard coded path instead of letting the
include command search for the modules we like to include.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This is definitely a hack.
Do not include the Kirigami resources (on static build). It causes
double defined symbols in our setting. I would like a nicer fix for this
issue, but failed to find one. For example, not adding the resource in
our build causes the qrc file not to be generated. Manual generation
of the resource file (using rcc) introduces the double symbols again.
so it seems some Kirigami weirdness (but their staticcmake example compiles
correctly).
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
While most new commits are QML improvements, there is a change
in the Kirigami build related to static building (like we do),
and Cmake restyles to make things more Qt compliant.
As now the (generated) qrc_kirigami.cpp is included from
kirigamiplugin.cpp, for static builds, our build failes on
double defined symbols.
Following commit deals with this fail.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This is a rough conversion from cuft to liters. Should be close enough
when we don't have working pressure to do the real calculation. (As far
as I know, this is the case with UDCF.)
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Not really surprising, but a sample log that I received used different
case for unit than I had expected.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Simplify depth conversion from by using the unit variable and allowing
dephtConvert template to do the work.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
With DECO_CALC_DEBUG != 0, divelist.c and profile.c have calls
to dump_tissues() without passing a 'struct deco_state' argument.
Fixes#1105
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
In commits eccd4b993 to 8f81a22e7 global error buffer and get_error_string()
func, were moved to a call back function.
This patch makes smtk2ssrf suport those changes and build again.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
As far as I know, Qt's emit is defined to nothing.
Thus, the construct "emit(lastError);" is compiled to
"(lastError);", which is a no-op.
Obviously "emit error(lastError)" was meant.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Trivial removal of 2 unused Kirigami actions. These were leftovers
from the time we had a very different style of cloud account
management.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This should fix the Shearwater download bug that I introduced
to the Subsurface-branch of libdivecomputer.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The images to load are kept in a set to avoid multiple loading of
the same picture. The set was protected with a mutex.
Problem: the mutex was not released before loading the picture,
effectively serializing the loading of pictures.
Therefore unlock the mutex once the set is updated.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
In core/imagedownloader.cpp the helpers cloudImageUrl() and loadPicture()
are made of static linkage.
The global variables queuedPictures and pictureQueueMutex were moved
into the loadPicture() function, because they are used only there.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
When adding a dive manually, you might clear the "duration" field and fill
in your value by hand. Unfortunately, commit #1052 produced a bug that
practically limited the dive duration to 6 minutes once the field was cleared.
Signed-off-by: Oliver Schwaneberg <oliver.schwaneberg@gmail.com>
MainWindow is a "singleton" and has an instance() member function.
No point in keeping a second static pointer in subsurface-desktop-helper.cpp.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>