Import data from Scubapro Aladin Sport Matrix

2017-10-15 Thread Berthold Stoeger
Dear all, I'm trying to import dive logs from a Scubapro Aladin Sport Matrix according to the manual. This is on Kubuntu 17.04 and subsurface compiled from source. Pairing with bluetoothctl works as described, with the exception that I have to remove the device before pairing. Nevertheless, i

Re: Import data from Scubapro Aladin Sport Matrix

2017-10-15 Thread Berthold Stoeger
Dear Linus, On Sonntag, 15. Oktober 2017 18:31:34 CEST Linus Torvalds wrote: > So I think you have two issues that make it but work for you. > > The first and more fundamental is that we haven't done the BLE support for > the Aladin Sport at all yet, unless somebody did it without me even > noti

Re: Import data from Scubapro Aladin Sport Matrix

2017-10-15 Thread Berthold Stoeger
Dear all, On Sonntag, 15. Oktober 2017 22:08:52 CEST Berthold Stoeger wrote: > By the way, there seems to be a strange bug(?): for the first failed > download I get an information window. For each subsequent retry there is an > additional window. E.g. for the 5th failed download i

Re: Import data from Scubapro Aladin Sport Matrix

2017-10-16 Thread Berthold Stoeger
Hi Dirk, On Montag, 16. Oktober 2017 11:05:49 CEST you wrote: > > On Oct 16, 2017, at 2:06 AM, Berthold Stoeger > > wrote: > > Answering to myself here: The issue seems to be the > > > > connect(&thread, SIGNAL(finished()), ...); > > > > call in

Re: Import data from Scubapro Aladin Sport Matrix

2017-10-18 Thread Berthold Stoeger
On Sonntag, 15. Oktober 2017 18:31:34 CEST Linus Torvalds wrote: > So I think you have two issues that make it but work for you. > > The first and more fundamental is that we haven't done the BLE support for > the Aladin Sport at all yet, unless somebody did it without me even > noticing. > > Be

Re: Import data from Scubapro Aladin Sport Matrix

2017-10-19 Thread Berthold Stoeger
On Donnerstag, 19. Oktober 2017 00:45:37 CEST Berthold Stoeger wrote: > > On the Aladin Sport there is a single non-standard "service" > {fdcdeaaa-295d-470e-bf15-04217b7aa0a0}. > This service has two "characteristics": > 1) {a188b7dd-debb-449a-852d-c243d

Re: Import data from Scubapro Aladin Sport Matrix

2017-10-21 Thread Berthold Stoeger
On Freitag, 20. Oktober 2017 12:58:15 CEST Linus Torvalds wrote: > On Thu, Oct 19, 2017 at 5:51 PM, Berthold Stoeger > > wrote: > > Sorry, I confused dec 18 with hex 18. The second characteristic is notify > > and read. This is clearly a read/write pair. > > So that

Re: Import data from Scubapro Aladin Sport Matrix

2017-10-22 Thread Berthold Stoeger
On Sonntag, 22. Oktober 2017 04:31:39 CEST Linus Torvalds wrote: > so you literally *could* try to claim it's a G2 and try to see how far > it downloads. The handshake is different. The G2 client sends 1b and 1c1027 and expects 01 as the answer twice. The Aladin Sport returns 00 in both case

Re: Import data from Scubapro Aladin Sport Matrix

2017-10-23 Thread Berthold Stoeger
On Montag, 23. Oktober 2017 00:55:37 CEST Berthold Stoeger wrote: > Only the dates are incorrect - I will try to figure out what is going on. Sigh. This was probably also me sending random commands. :( It somehow reset the date to 1.1.2000 and I think this messed with the dive timestamps. In

Re: Import data from Scubapro Aladin Sport Matrix

2017-10-23 Thread Berthold Stoeger
On Montag, 16. Oktober 2017 08:06:55 CEST Berthold Stoeger wrote: > Dear all, > > On Sonntag, 15. Oktober 2017 22:08:52 CEST Berthold Stoeger wrote: > > By the way, there seems to be a strange bug(?): for the first failed > > download I get an information window. For each s

Attempted fix of resource leak in qt-ble.c

2017-10-24 Thread Berthold Stoeger
ownership subtleties. Berthold >From 93a12815e293952f25d7ec2cad7778804ae9ed6b Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 24 Oct 2017 17:42:07 +0200 Subject: [PATCH 1/3] Fix resource leak in qt-ble.cpp Destroy QLowEnergyService objects in destructor of BLEObject. Signed-off

Re: Attempted fix of resource leak in qt-ble.c

2017-10-24 Thread Berthold Stoeger
On Dienstag, 24. Oktober 2017 21:35:24 CEST Berthold Stoeger wrote: > Dear all, > > in a previous email I reported leaking resources in qt-ble.c. Here is my > attempt at a fix. I reckon this ideally has no user-visible effect (i.e. is > gratuitous), yet is risky. Therefore some

Re: Import data from Scubapro Aladin Sport Matrix

2017-10-29 Thread Berthold Stoeger
On Sonntag, 29. Oktober 2017 15:23:42 CET Linus Torvalds wrote: > I've merged this, and also merged Jef's patch to fix the date handling > problem I noticed on the trip. So current libdivecomputer should > handle the Aladin Sport Matrix correctly, and also fix the date > downloading problems you h

Thread related crash on failed dive computer download

2017-10-31 Thread Berthold Stoeger
Dear all, I tried to reset my git repository to head and now I'm getting a crash which I didn't get before. I tried "git clean -fx", but that didn't help. The crash happens when using invalid Bluetooth addresses. Call trace: - core/qt-ble.c l.326: report_error(...) - core/errorhelper.c l.43: er

Re: Import data from Scubapro Aladin Sport Matrix

2017-10-31 Thread Berthold Stoeger
Hi Jef, On Dienstag, 31. Oktober 2017 11:29:00 CET Jef Driesen wrote: > On 2017-10-23 00:55, Berthold Stoeger wrote: > > On Sonntag, 22. Oktober 2017 04:31:39 CEST Linus Torvalds wrote: > >> so you literally *could* try to claim it's a G2 and try to see how far > >

Re: Thread related crash on failed dive computer download

2017-10-31 Thread Berthold Stoeger
Hi Dirk, On Dienstag, 31. Oktober 2017 13:52:45 CET you wrote: > > On Oct 31, 2017, at 4:43 AM, Jan Mulder wrote: > > > > On 31-10-17 12:05, Jan Mulder wrote: > > Sounds like a fundamental problem, with the new way of error reporting ... > > but not sure ... > Yes, that makes sense. Doing the sh

Re: Thread related crash on failed dive computer download

2017-10-31 Thread Berthold Stoeger
On Dienstag, 31. Oktober 2017 19:25:03 CET Dirk Hohndel wrote: > On Tue, Oct 31, 2017 at 03:52:28PM +0100, Berthold Stoeger wrote: > > As a FYI, the patch attached, though without commit-message because it is > > simply too ugly. It works for my particular test case, but... >

Re: Thread related crash on failed dive computer download

2017-10-31 Thread Berthold Stoeger
Hi Dirk, On Dienstag, 31. Oktober 2017 20:41:32 CET Dirk Hohndel wrote: > On Tue, Oct 31, 2017 at 08:10:32PM +0100, Berthold Stoeger wrote: > > To be honest, apart from the errors mentioned above, I'm not even sure > > that > > the idea behind the code is sound.

Re: Thread related crash on failed dive computer download

2017-10-31 Thread Berthold Stoeger
On Dienstag, 31. Oktober 2017 21:00:37 CET Berthold Stoeger wrote: > So in the attachment is a different approach: don't output errors if not in > the main thread. Someone who generates a thread is responsible of flushing > the errors later. Sounds much less brittle to me. It works

Re: Import data from Scubapro Aladin Sport Matrix

2017-10-31 Thread Berthold Stoeger
On Dienstag, 31. Oktober 2017 11:29:00 CET Jef Driesen wrote: > I believe you have the model number wrong. I think it should be 0x17, > and your test seems to confirm that: Well, I put a printf directly after "rc = scubapro_g2_transfer (device, cmd_model, sizeof (cmd_model), model, sizeof (model

Re: Import data from Scubapro Aladin Sport Matrix

2017-11-01 Thread Berthold Stoeger
On Mittwoch, 1. November 2017 09:42:04 CET Jef Driesen wrote: > On 31-10-17 23:35, Berthold Stoeger wrote: > > On Dienstag, 31. Oktober 2017 11:29:00 CET Jef Driesen wrote: > >> I believe you have the model number wrong. I think it should be 0x17, > > > >> an

Re: Import data from Scubapro Aladin Sport Matrix

2017-11-01 Thread Berthold Stoeger
> @Linus: patch attached. Sorry about that. Forgot to commit one file... Berthold >From 27562a715bdd4955f665d376d2103efc2e236142 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 1 Nov 2017 10:16:51 +0100 Subject: [PATCH] Fix model number of the Scubapro Aladin Sport Matrix. The

[RFC] Make the report_error(), get_error_string() code thread safe

2017-11-01 Thread Berthold Stoeger
QString anyway. This necessitates a kludge of declaring get_error_string() only for C++ code and makes dive.h inconsistent. So what do you think? Berthold>From 9e7f35b0fa3ee5865700e4fa17204f734f6b1b1b Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 1 Nov 2017 09:30:56 +0100 Subject

Re: [RFC] Make the report_error(), get_error_string() code thread safe

2017-11-01 Thread Berthold Stoeger
On Mittwoch, 1. November 2017 15:28:28 CET Dirk Hohndel wrote: > On Wed, Nov 01, 2017 at 01:54:17PM +0100, Berthold Stoeger wrote: > > 1) errorhelper.c is turned into C++ code. > > Linus will love that :-) I sense some sarcasm. ;) I can relate. When using a full blown cross-platfo

[RFC] Changes to Bluetooth device selection dialog

2017-11-05 Thread Berthold Stoeger
gButtonBox(?), but here I opt for the less intrusive change. Thank you, Berthold>From 2a2c69c13d926ddd0b9a95d3b53baf82c18da221 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 3 Nov 2017 09:05:25 +0100 Subject: [PATCH 1/5] Initialize Bluetooth device lis

Re: AppImages and continuous integration

2017-11-06 Thread Berthold Stoeger
On Montag, 6. November 2017 09:19:44 CET Martin Měřinský wrote: > > I would really ask as many of you as possible (those with access to > > Linux systems) to try the AppImage and report back which Linux distro > > you tried this with. > > Hi, > Ubuntu 17.04 seems to work, but gives long output of

Re: Scubapro Aladin Square

2017-11-10 Thread Berthold Stoeger
On Freitag, 10. November 2017 22:32:14 CET Linus Torvalds wrote: > On Fri, Nov 10, 2017 at 1:21 PM, vavincavent wrote: > > After udev rules with Jef recommandation, the subsurface.log : > Ok, so it doesn't work like the G2. > > That 011B thing is the hanshake (01 = one byte command, 1b is the > h

Re: Scubapro Aladin Square

2017-11-11 Thread Berthold Stoeger
Hi Vincent, On Samstag, 11. November 2017 09:26:55 CET vavincavent wrote: > Can we begin to make a new entry for this computer in libdivecomputer > library? (scubapro_square.c and scubapro_square.h but i think it's not > just this...) Actually it's much simpler. You'd add an entry to the descript

Re: [RFC] Changes to Bluetooth device selection dialog

2017-11-11 Thread Berthold Stoeger
On Sonntag, 5. November 2017 22:59:07 CET Berthold Stoeger wrote: > I tried to modify the behavior of the Bluetooth (BT) device selection dialog > and would need some feedback. Unfortunately, BT is highly platform > dependent and I have no idea how this behaves with non-Bluez 5 backends.

Replace repetitive code in SettingsObjectWrapper.cpp by functions?

2017-11-18 Thread Berthold Stoeger
cept and I probably introduced numerous bugs. But if you think this is a good idea, I can try to go over each case and check it for plausibility. Berthold >From b8db2aa26dc5db064397041e958ef1a3232a464d Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 18 Nov 2017 08:23:15 +0100 Su

bool different in C and C++?

2017-11-18 Thread Berthold Stoeger
Dear all, in core/pref.h we find the comment /* can't use 'bool' for the boolean values - different size in C and C++ */ Ironically, the same file is full of bool struct members, so it seems to rely on the fact that this comment is wrong. The fact is confirmed by my tests: #include #include i

Re: bool different in C and C++?

2017-11-18 Thread Berthold Stoeger
On Samstag, 18. November 2017 17:34:59 CET Lubomir I. Ivanov wrote: > On 18 November 2017 at 18:19, Berthold Stoeger > > On the other hand, many of the boolean settings are indeed defined as > > short. Shouldn't this be made consistent? > > both sizeof(short) and sizeo

Re: Replace repetitive code in SettingsObjectWrapper.cpp by functions?

2017-11-18 Thread Berthold Stoeger
Hi Dirk, On Samstag, 18. November 2017 16:53:43 CET Dirk Hohndel wrote: > > On Nov 18, 2017, at 12:02 AM, Berthold Stoeger > > wrote: > > Side note: Unfortunately, in some cases representations in pref and > > SettingsObjectWrapper differ. :( > > Yes - and in mos

Re: Replace repetitive code in SettingsObjectWrapper.cpp by functions?

2017-11-18 Thread Berthold Stoeger
On Samstag, 18. November 2017 17:23:05 CET Lubomir I. Ivanov wrote: > On 18 November 2017 at 17:53, Dirk Hohndel wrote: > >> On Nov 18, 2017, at 12:02 AM, Berthold Stoeger wrote: > > > >> For consistency, I made a few C-strings non-const. And ultimately a

Re: bool different in C and C++?

2017-11-18 Thread Berthold Stoeger
On Samstag, 18. November 2017 19:11:53 CET Linus Torvalds wrote: > On Sat, Nov 18, 2017 at 9:26 AM, Berthold Stoeger > > wrote: > > Sure, but can these definitions be different for C and C++ on any sane > > platform? > > Historically, yes, very much. Thank you, t

Re: Replace repetitive code in SettingsObjectWrapper.cpp by functions?

2017-11-18 Thread Berthold Stoeger
On Samstag, 18. November 2017 19:21:34 CET Lubomir I. Ivanov wrote: > On 18 November 2017 at 20:19, Berthold Stoeger > > wrote: > > On Samstag, 18. November 2017 17:23:05 CET Lubomir I. Ivanov wrote: > >> On 18 November 2017 at 17:53, Dirk Hohndel wrote: > >>

Re: Replace repetitive code in SettingsObjectWrapper.cpp by functions?

2017-11-18 Thread Berthold Stoeger
On Samstag, 18. November 2017 20:25:37 CET Lubomir I. Ivanov wrote: > On 18 November 2017 at 21:21, Lubomir I. Ivanov wrote: > > On 18 November 2017 at 21:17, Berthold Stoeger > > > > wrote: > >> OK, prepared such a PR. > > > > as noted at the PR comm

Suspicious if/else constructs

2017-11-18 Thread Berthold Stoeger
Dear all, at the suggestion of Lubomir I compiled with -Wall and I got two g++ warnings, which indeed point to two highly suspicious if/else constructs. The first one is trivial (PR submited). For the second one, I simply don't understand the intent of the indent (heh): In qt-models/diveplanner

Re: Replace repetitive code in SettingsObjectWrapper.cpp by functions?

2017-11-19 Thread Berthold Stoeger
Hi Dirk, On Sonntag, 19. November 2017 01:52:10 CET Dirk Hohndel wrote: > > On Nov 18, 2017, at 11:17 AM, Berthold Stoeger > > wrote: > > 1) In getCloudURL() in core/qthelper.cpp, the cloud_storate_email_encoded > > member is set, but it seems not to be written to dis

Re: Suspicious if/else constructs

2017-11-19 Thread Berthold Stoeger
Hi Stefan, On Samstag, 18. November 2017 22:05:59 CET Stefan Fuchs wrote: > Am 18.11.2017 um 21:50 schrieb Berthold Stoeger: > > In qt-models/diveplannermodel.cpp:341, the if is indented as if it was > > part of the outer if. But it isn't owing to missing braces. Since

Re: Replace repetitive code in SettingsObjectWrapper.cpp by functions?

2017-11-19 Thread Berthold Stoeger
On Sonntag, 19. November 2017 21:18:11 CET Dirk Hohndel wrote: > > On Nov 19, 2017, at 4:07 AM, Berthold Stoeger wrote: > >>> 1) In getCloudURL() in core/qthelper.cpp, the > >>> cloud_storate_email_encoded > >>> member is set, but it seems not to be wr

Re: bool different in C and C++?

2017-11-19 Thread Berthold Stoeger
Hi Stefan, On Sonntag, 19. November 2017 23:07:43 CET Stefan Fuchs wrote: > Am 18.11.2017 um 19:40 schrieb Berthold Stoeger: > >> [...] > >> In fact, even when you can depend on a modern compiler, it's usually > >> best to restrict "bool" use entirely

SHA comparison in parse_file

2017-12-09 Thread Berthold Stoeger
Dear all, While trying to understand/simplify the cloud code I noticed that in parse_file() there is code to check if the currently loaded data is the same data as in the git repository. It does this by comparing SHAs. If they are the same, no loading of data is performed. But, at least on the

Re: Subsurface libdivecomputer branch merged with upstream..

2017-12-13 Thread Berthold Stoeger
Hi, On Mittwoch, 13. Dezember 2017 06:18:22 CET Dirk Hohndel wrote: > That did indeed work really well. I fixed a compile problem on Android, > I reviewed the merge itself, I tested Android and Mac... it all looks good. > > I think the only way to get broad test coverage against many dive > comp

Re: Subsurface libdivecomputer branch merged with upstream..

2017-12-13 Thread Berthold Stoeger
On Mittwoch, 13. Dezember 2017 20:23:53 CET Miika Turkia wrote: > The log states that libdivceomputer/version.h is not found. Suggest, that > the submodule is not initialized correctly. In subsurface directory run > following: > > git submodule init > git submodule update --recursive That worked

Warnings (was: Subsurface libdivecomputer branch merged with upstream..)

2017-12-15 Thread Berthold Stoeger
On Mittwoch, 13. Dezember 2017 23:34:32 CET Dirk Hohndel wrote: > > On Dec 13, 2017, at 11:31 AM, Berthold Stoeger > > wrote:> > > PS: compilation of libdivecomputer produces tons of warnings. :-o > > Yes, Jef cranked up the warning level quite a bit. > I actuall

Q_PROPERTYs in preferences code

2017-12-16 Thread Berthold Stoeger
Hi all, Short question: Are the numerous Q_PROPERTY macros in core/subsurface-qt/ SettingsObjectWrapper.h needed for the mobile version? If I remove them, the desktop version compiles and works just fine. Somehow this all seems redundant: Each property has a WRITE method and a NOTIFY signal, bu

Re: Warnings (was: Subsurface libdivecomputer branch merged with upstream..)

2017-12-16 Thread Berthold Stoeger
On Freitag, 15. Dezember 2017 15:04:49 CET Lubomir I. Ivanov wrote: > On 15 December 2017 at 11:24, Berthold Stoeger > > wrote: > > On Mittwoch, 13. Dezember 2017 23:34:32 CET Dirk Hohndel wrote: > >> > On Dec 13, 2017, at 11:31 AM, Berthold Stoeger > > > &g

Re: Warnings (was: Subsurface libdivecomputer branch merged with upstream..)

2017-12-17 Thread Berthold Stoeger
Hi Robert, On Sonntag, 17. Dezember 2017 10:03:22 CET Robert Helling wrote: > Hi, > > > On 16. Dec 2017, at 20:29, Lubomir I. Ivanov wrote: > > > > so yes, "float" is like a non-default sized type e.g. "short", yet > > one's variable might fit in a "short" and it's perfectly fine to use > > the

Re: Q_PROPERTYs in preferences code

2017-12-17 Thread Berthold Stoeger
On Samstag, 16. Dezember 2017 20:35:29 CET Lubomir I. Ivanov wrote: > On 16 December 2017 at 14:26, Berthold Stoeger > > wrote: > > Somehow this all seems redundant: Each property has a WRITE method and a > > NOTIFY signal, but the signal is raised in the WRITE method an

Uninitialized variable in profile.c

2017-12-17 Thread Berthold Stoeger
Hi Rick, In current master, gcc produces an uninitialized variable warning in profile.c, which seems correct to me. In l.1044 last_ceiling is compared to first_ceiling, but last_ceilng is set first in l.1056. I guess decoMode() cannot change in this function, so gcc's analysis seems correct.

Re: Uninitialized variable in profile.c

2017-12-17 Thread Berthold Stoeger
On Sonntag, 17. Dezember 2017 19:43:11 CET Robert C. Helling wrote: > Hi, > > > Am 17.12.2017 um 19:11 schrieb Dirk Hohndel : > >> On Dec 17, 2017, at 8:06 AM, Robert Helling wrote: > >> > >> Hi, > >> > >>> On 17. Dec 2017, at 14:19,

Re: Warnings (was: Subsurface libdivecomputer branch merged with upstream..)

2017-12-17 Thread Berthold Stoeger
On Sonntag, 17. Dezember 2017 22:00:43 CET Linus Torvalds wrote: > On Sun, Dec 17, 2017 at 4:38 AM, Berthold Stoeger > > wrote: > > I tried to look at the assembler output and the first thing I noted is > > that we don't compile with -O2? Is that on purpose? > >

Re: Qt models uniquely for mobile or desktop

2018-01-10 Thread Berthold Stoeger
Hi Jan, On Mittwoch, 10. Jänner 2018 12:43:53 CET Jan Mulder wrote: > On 09-01-18 10:36, Jan Mulder wrote: > > I found out (more or less accidentally) that, for example, the > > divelistmodel.h/cpp code is uniquely used in mobile only. It is highly > > likely that this is true for more models, or

Re: Qt models uniquely for mobile or desktop

2018-01-21 Thread Berthold Stoeger
On Sonntag, 21. Jänner 2018 14:59:06 CET Jan Mulder wrote: > On 21-01-18 14:09, Tomaz Canabrava wrote: > > On Sun, Jan 21, 2018 at 1:30 PM, Jan Mulder > > > > wrote: > > On 21-01-18 12:50, Tomaz Canabrava wrote: > > This is something that I didn't wanted to

Re: Device mount point is disabled (and fixed to wrong device)

2018-02-03 Thread Berthold Stoeger
Hi Rob, On Samstag, 3. Februar 2018 12:57:18 CET Rob Mason wrote: > Hi, > > I'm running Version 4.7.6 on linux Mint 18.3 - using a Subgear XP-10 > (infrared). > > My infrared adapter is found on /dev/ttyUSB1, but the 'Device or Mount > Point' drop down list is disabled and fixed to /dev/ttyS30.

Re: Device mount point is disabled (and fixed to wrong device)

2018-02-03 Thread Berthold Stoeger
think the XP-Air is), change the device and then go back to the XP-10. This should be saved to the preferences, so you only have to do it once (until you change dive computer). Berthold > Rob Mason > 07770 578764 > > On 3 February 2018 16:43:14 GMT+00:00, Berthold Stoeger > wrot

Roll our own qUtf8Printable()?

2018-02-25 Thread Berthold Stoeger
Dear all, In many places, QStrings are converted to C-style strings with an expression of the kind s.toUf8().data() I have a patch replacing all of them with qUtf8Printable(s) The idea is that - according to the documentation - this is equivalent to s.toUtf8().constData() The latter should

Re: Roll our own qUtf8Printable()?

2018-02-25 Thread Berthold Stoeger
Hi, On Sonntag, 25. Februar 2018 22:40:00 CET Lubomir I. Ivanov wrote: > On 25 February 2018 at 21:39, Berthold Stoeger > > wrote: > > Dear all, > > Much to my surprise, qUtf8Printable() produced larger code. The reason is > > that it is defined as a macro in : >

Re: Roll our own qUtf8Printable()?

2018-02-25 Thread Berthold Stoeger
On Montag, 26. Februar 2018 02:13:11 CET Thiago Macieira wrote: > On domingo, 25 de fevereiro de 2018 15:00:38 PST Lubomir I. Ivanov wrote: > > wrote: > > > Dear all, > suggested here: > > > So what do you think about rolling our own helper function: > > > > > > inline const char *qstring2c(cons

Re: Roll our own qUtf8Printable()?

2018-02-25 Thread Berthold Stoeger
On Montag, 26. Februar 2018 03:19:48 CET Thiago Macieira wrote: > On domingo, 25 de fevereiro de 2018 17:13:11 PST Thiago Macieira wrote: > > But there's another option, which is to avoid a copy of the QString if the > > input is already a QString. Let me try a few variations of possible > > soluti

Re: Roll our own qUtf8Printable()?

2018-02-25 Thread Berthold Stoeger
On Montag, 26. Februar 2018 02:33:58 CET Thiago Macieira wrote: > > [Sidenote: There's a reason the C++-standard disallows reference counting > > for its string class.] > > There is, but this isn't it. The concern is the unexpected memory allocation > when calling a non-const function. The standa

Re: Roll our own qUtf8Printable()?

2018-02-26 Thread Berthold Stoeger
On Montag, 26. Februar 2018 10:04:23 CET Lubomir I. Ivanov wrote: > On 26 February 2018 at 08:49, Berthold Stoeger > > wrote: > > On Montag, 26. Februar 2018 02:33:58 CET Thiago Macieira wrote: > >> > [Sidenote: There's a reason the C++-standard disallows referenc

snprintf cascades

2018-03-12 Thread Berthold Stoeger
Dear all, In the files core/plannernotes.c, core/statistics.c and core/uemis- downloader.c, we have code of the kind snprintf(buffer + len, sz_buffer - len, ...); I think this is wrong because the second argument to snprintf is size_t, i.e. unsigned. For len > sz_buffer, this will happily writ

Re: Formatting Dive tags string

2018-04-04 Thread Berthold Stoeger
Hi Jérémie, On Mittwoch, 4. April 2018 11:36:18 CEST Jérémie Guichard wrote: > > Lubomir mentioned he could look into this 'issue' but did not have much > free time, since I do have some on my side I can look into this change. I > do prefer to consult the community before doing it though. Here ar

Re: Formatting Dive tags string

2018-04-05 Thread Berthold Stoeger
Hi Jérémie, On Donnerstag, 5. April 2018 16:58:47 CEST Jérémie Guichard wrote: > Hello Thiago, > > In order to not mix the two topics in the same change, I decided to keep > the conversion to QString as it was in the original code, see: > https://github.com/Subsurface-divelog/subsurface/blob/12dc

Re: Formatting Dive tags string

2018-04-05 Thread Berthold Stoeger
Hi, On Donnerstag, 5. April 2018 19:28:28 CEST Thiago Macieira wrote: > On Thursday, 5 April 2018 10:25:37 PDT Berthold Stoeger wrote: > > It's fine as it is, since all C-strings are supposed to be UTF-8 encoded. > > The only use I see for fromLatin1() et al. would be im

Re: Formatting Dive tags string

2018-04-05 Thread Berthold Stoeger
On Donnerstag, 5. April 2018 19:45:31 CEST Thiago Macieira wrote: > On Thursday, 5 April 2018 10:32:37 PDT Berthold Stoeger wrote: > > Hi, > > > > On Donnerstag, 5. April 2018 19:28:28 CEST Thiago Macieira wrote: > > > On Thursday, 5 April 2018 10:25:37 PDT Bertho

Re: Mares Quad with BLE Interface

2018-04-10 Thread Berthold Stoeger
On Dienstag, 10. April 2018 22:10:23 CEST Dirk Hohndel wrote: > The question is, can any of this be well documented or even automated? > Berthold, any suggestions? Well, ultimately my endeavours were not really successful, as I never managed to get the app to respond to my messages. All I got wa

Re: Segfault

2018-05-02 Thread Berthold Stoeger
89e2a4f0) > at /data/ss/subsurface/profile-widget/profilewidget2.cpp:1204 as a quick-fix, please consider the attached patch. But there are other occurrences of current_dc, which will have to be scrutinized. Berthold>From bbbc8ed381f56ae6fd4fee3563633eef44383ecb Mon Sep 17 00:00:00 2001 From: B

Re: Planner: Bug in PR by bstoeger

2018-05-18 Thread Berthold Stoeger
;From d7158dfdfeca7ea8e73cadb1cb2a77b057e84278 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 18 May 2018 11:44:11 +0200 Subject: [PATCH] Plannernotes: '\0'-terminate ICD-buffer When creating the ICD-notes the membuffer was not '\0'-terminated, leading to outp

Hashing videos

2018-05-22 Thread Berthold Stoeger
Dear all, I'm currently implementing addition of videos to the dive photos. This happens to be dog-slow, because we calculate hashes of the file contents. As you can imagine, addition of multiple videos with a few GB each is a major CPU hog. Granted, the UI stays responsive, since this is done

Re: Hashing videos

2018-05-22 Thread Berthold Stoeger
Hi Lubomir and Willem, On Dienstag, 22. Mai 2018 23:06:03 CEST Lubomir I. Ivanov wrote: > i was thinking about running hashes on the thumbnails but that has a > couple of problems: I think generating hashes of thumbnails is out of the question. Not only, as you note, may Qt's scaling algorithm

Re: Hashing videos

2018-05-23 Thread Berthold Stoeger
Hi Robert, On Mittwoch, 23. Mai 2018 10:01:20 CEST Robert Helling wrote: > Hi, > > > On 23. May 2018, at 07:22, Berthold Stoeger > > wrote: > > > > 1) They have the same filename (modulo path and case) > > 2) They have the same length > > 3) They h

Re: Hashing videos

2018-05-23 Thread Berthold Stoeger
On Mittwoch, 23. Mai 2018 16:31:54 CEST Robert Helling wrote: > > On 23. May 2018, at 15:23, Berthold Stoeger > > wrote: > > I don’t think backwards compatibility is any problem at all: At worst, with > a new version of hashes we get some cache misses and have to once load

Re: Segfault with Qt-5.11.0

2018-05-24 Thread Berthold Stoeger
eteLater() is evil. Berthold >From 479eccd89ae138ecab5bf6513d5ee5051137797e Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 24 May 2018 22:57:02 +0200 Subject: [PATCH] Cleanup: Don't defer deletion of oldModel in DiveListView::reload() There seems to be no point in using delet

Segfault after upgrade to Kubuntu BionicBeaver

2018-05-25 Thread Berthold Stoeger
Dear all, after upgrading to recent Kubuntu (which also destroyed my TeX installation, which is essential for work), subsurface crashes somewhere in the GoogleMaps thing. I removed the build, cmake and googlemaps directories and rebuilt. No change. Backtrace: (gdb) run Starting program: /home

Re: Segfault after upgrade to Kubuntu BionicBeaver

2018-05-25 Thread Berthold Stoeger
Hi Lubomir, On Freitag, 25. Mai 2018 13:52:47 CEST Lubomir I. Ivanov wrote: > On 25 May 2018 at 12:01, Berthold Stoeger wrote: > which Qt version is used for building the plugin? > better check if you are building everything with the same Qt version. I think there is some problem

Re: Problems - user manual

2018-05-31 Thread Berthold Stoeger
Hi Willem, On Donnerstag, 31. Mai 2018 09:41:23 CEST Willem Ferguson wrote: > In the latest master of the desktop version, the manual does not open > when one selects Help->User manual. > > Code was compiled with -build-with-webkit > > Any idea about the cause of this? Thanks for noting this.

Find moved images: match path instead of hashes?

2018-06-09 Thread Berthold Stoeger
Dear all, In a previous mail I noted that the current file-hashing of images is a disaster when it comes to video support. Moreover, the complexity of the hashing-code caused me quite some headache and the current implementation is buggy (different hashes for original and local filename). Inste

Re: Find moved images: match path instead of hashes?

2018-06-09 Thread Berthold Stoeger
On Samstag, 9. Juni 2018 13:53:31 CEST Berthold Stoeger wrote: > And certainly, the user should be presented > the list of new associations, before actually applying them. I implemented a quick-and-dirty mockup of such an interface in PR#1349. > To emulate the old behavior, *all* pict

Re: Find moved images: match path instead of hashes?

2018-06-09 Thread Berthold Stoeger
Hi Willem, On Samstag, 9. Juni 2018 19:24:04 CEST Willem Ferguson wrote: > I would support any move to simplify a complex process such as hashing > and looking for files across the while directory tree. My problem is > that I have many files with the same name. They are in different dives, > but t

Re: [TEST REQUEST] Windows Bluetooth LE build

2018-06-11 Thread Berthold Stoeger
On Montag, 11. Juni 2018 20:50:56 CEST Linus Torvalds wrote: > BLE is kind of odd. We also do things kind of oddly, because the way > we generate that 16-bit value is with > > QByteArray::fromHex("0100") I think the idiomatic way to do this is the QByteArrayLiteral("\x01\x00") macro invoc

Re: new releases

2018-06-16 Thread Berthold Stoeger
aps try to finally get PR#799 out (or trashed)? I have access to a Windows-PC, but I need feedback / suggestions. Berthold >From c1b89465957c2014ea5a2a593d1423e82dd82da0 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 16 Jun 2018 10:50:30 +0200 Subject: [PATCH] libdc interface: remove

Re: new releases

2018-06-19 Thread Berthold Stoeger
On Sonntag, 17. Juni 2018 14:16:30 CEST Dirk Hohndel wrote: > > On Jun 17, 2018, at 9:06 PM, Stefan Fuchs wrote: > > > > Hallo Dirk, > > > > Am 16.06.2018 um 01:16 schrieb Dirk Hohndel: > >> What other bugs do we know of for either desktop or mobile? > > > > One doubt: I remember that with some

Re: developer video call anyone?

2018-06-27 Thread Berthold Stoeger
Hi, On Mittwoch, 27. Juni 2018 18:21:11 CEST Dirk Hohndel wrote: > So a couple of people have suggested this, most recently Jan. And since I > just had yet another incident of "words written don't always do a good job > of conveying intention" (sorry Berthold) I figured I should just go ahead > an

Re: Split a dive by time

2018-07-01 Thread Berthold Stoeger
Hi, On Sunday, 1 July 2018 21:50:17 CEST Linus Torvalds wrote: > A lot of these things are likely fairly simple to implement, but there > are people like me who really don't do UI, but could do the "split > dive" part fairly easily. And there are probably people who could do > the UI trivially, bu

Re: Split a dive by time

2018-07-02 Thread Berthold Stoeger
On Monday, 2 July 2018 09:36:34 CEST tormento wrote: > Linus thanks for your interest in my minor problem. > > Which build is the one with your fix? The one I have tried from nightly > splits the dive in three parts, the last two of negligible lenght, while > the first one is much longer than the

Re: Video thumbnails

2018-07-06 Thread Berthold Stoeger
Hi Robert, On Friday, 6 July 2018 11:42:36 CEST Robert Helling wrote: > I had some more thoughts regarding the discussion of how to generate > thumbnails for videos. After hearing how difficult that seems to be to do > within Qt and all kinds of licensing problems with even shipping the > necessa

Re: Video thumbnails

2018-07-06 Thread Berthold Stoeger
On Friday, 6 July 2018 12:31:27 CEST Dirk Hohndel wrote: > The advantage of calling an app vs. linking against the libraries is that > for calling an app we need to tell the user how to do that, vs. for > shipping the libraries we need to build them on all the platforms, > integrate them into our

Re: Video thumbnails

2018-07-06 Thread Berthold Stoeger
On Friday, 6 July 2018 13:08:07 CEST Dirk Hohndel wrote: > Just to confirm - you don't consider #1463 ready to be pulled, you want to > work on it for a week or two, correct? The time frame was with respect to including ffmpeg. But yes, I will polish #1463 a bit more and will notify you when I c

Re: Video thumbnails

2018-07-06 Thread Berthold Stoeger
Hi Robert, On Friday, 6 July 2018 14:23:25 CEST Robert Helling wrote: > I might to have some time over the weekend for coding. Would you mind > sharing what you already have by pushing that branch to your GitHub > account? I would then try to start hooking up ffmpeg. You can see what I have in m

Re: Mac test build based on Qt5.11.1 - please test

2018-07-09 Thread Berthold Stoeger
On Tuesday, 10 July 2018 01:43:38 CEST Bryan Oliver wrote: > Thanks! Sorry about the abbreviation, didn't even think about that but > yikes, very good point. > > Yes it was with your referenced binary, think I had a typo in my first > email ("built" instead of "build"). I'll pull the crash log whe

Re: [RFC] UI: Rename "photos"/"images" to a term covering videos as well

2018-07-09 Thread Berthold Stoeger
On Monday, 9 July 2018 22:55:38 CEST Lubomir I. Ivanov wrote: > photos, pictures, images, video, audio etc. falls under "media". Given Stefan's list, I'm not sure that this is perfect in all cases: "Find moved media": Sounds to me like it would search for missing USB sticks? "Found %1 media...":

Re: Video thumbnails

2018-07-10 Thread Berthold Stoeger
Hi Robert, On Friday, 6 July 2018 15:38:33 CEST Robert Helling wrote: > > On 6. Jul 2018, at 15:32, Berthold Stoeger > > wrote: > > Can't ffmpeg write the image to stdout? Then we could just read it in a > > thread and send it via signal/slot to the thumbnailin

Re: Load images via media

2018-07-14 Thread Berthold Stoeger
Hi Willem, On Saturday, 14 July 2018 18:27:47 CEST Willem Ferguson wrote: > My external storage containing my photos has always been mapped via the > /media directory. Having installed Ubuntu 18.04, I am trying to do the > mappings so that my photo collection is still accessible through > Subsurfa

Re: Load images via media

2018-07-14 Thread Berthold Stoeger
On Saturday, 14 July 2018 19:00:19 CEST Willem Ferguson wrote: > You are correct. Attached screenshot of requester. I see no 'X', except > for the X that closes the panel. (??). I see - this is the Gnome/Ubuntu file selection dialog. On the KDE version you can remove the filter. This is very om

Re: Fwd: Re: Load images via media

2018-07-14 Thread Berthold Stoeger
On Saturday, 14 July 2018 19:27:11 CEST Willem Ferguson wrote: > I am pretty sure there are no invisible characters. I can access the > resources in /media using the terminal, no problem. See attached > system-level view of the directory. Just to be 100% sure can you make a 'ls -l' in the /media

Re: Fwd: Re: Load images via media

2018-07-14 Thread Berthold Stoeger
On Saturday, 14 July 2018 20:01:40 CEST Willem Ferguson wrote: > willem@HADIDA:/$ ls > bindata homelib media proc sbin swapfile usr > boot dev initrd.img lib64 mntroot snap sys var > cdrom etc initrd.img.old lost+found optrun srv tmp

Re: Fwd: Re: Load images via media

2018-07-15 Thread Berthold Stoeger
Hi Willem, On Sunday, 15 July 2018 11:16:26 CEST Willem Ferguson wrote: > I am working with the latest Subsurface version in the Ubuntu > repository. Let me build master and see what happens. I didn't even realize that there were working Ubuntu packages for 18.04? > I have been looking around f

  1   2   3   >