<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Tomaz,<br>
<br>
I do not know whether you received this mail.<br>
I sent this on Apr 22nd and on 24th.<br>
<br>
Kind regards,<br>
willem<br>
<div class="moz-forward-container"><br>
<br>
-------- Forwarded Message --------
<table class="moz-email-headers-table" border="0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">From: </th>
<td>42 2016 <></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">X-Mozilla-Status:
</th>
<td>0001</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">X-Mozilla-Status2:
</th>
<td>00800000</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">X-Mozilla-Keys:
</th>
<td><br>
</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Subject:
</th>
<td>Fwd: Re: Subsurface mobile downloadfromdivecomputer</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Reply-To:
</th>
<td><a class="moz-txt-link-abbreviated" href="mailto:willemferguson@zoology.up.ac.za">willemferguson@zoology.up.ac.za</a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">References:
</th>
<td><a class="moz-txt-link-rfc2396E" href="mailto:571A631D.6040309@zoology.up.ac.za"><571A631D.6040309@zoology.up.ac.za></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">To: </th>
<td>Tomaz Canabrava <a class="moz-txt-link-rfc2396E" href="mailto:tcanabrava@kde.org"><tcanabrava@kde.org></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">From: </th>
<td>Willem Ferguson <a class="moz-txt-link-rfc2396E" href="mailto:willemferguson@zoology.up.ac.za"><willemferguson@zoology.up.ac.za></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Organization:
</th>
<td>University of Pretoria</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">X-Forwarded-Message-Id:
</th>
<td><a class="moz-txt-link-rfc2396E" href="mailto:571A631D.6040309@zoology.up.ac.za"><571A631D.6040309@zoology.up.ac.za></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Message-ID:
</th>
<td><a class="moz-txt-link-rfc2396E" href="mailto:571C877A.7000901@zoology.up.ac.za"><571C877A.7000901@zoology.up.ac.za></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Date: </th>
<td>Sun, 24 Apr 2016 10:44:42 +0200</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">User-Agent:
</th>
<td>Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
Thunderbird/38.5.1</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">MIME-Version:
</th>
<td>1.0</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">In-Reply-To:
</th>
<td><a class="moz-txt-link-rfc2396E" href="mailto:571A631D.6040309@zoology.up.ac.za"><571A631D.6040309@zoology.up.ac.za></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Content-Type:
</th>
<td>multipart/alternative;
boundary="------------080004010703080806000900"</td>
</tr>
</tbody>
</table>
<br>
<br>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<br>
<div class="moz-forward-container">Tomaz, <br>
I do not know whether you received this mail.<br>
Kind regards,<br>
willem<br>
<br>
<br>
-------- Forwarded Message --------
<table class="moz-email-headers-table" border="0"
cellpadding="0" cellspacing="0">
<tbody>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">From:
</th>
<td>02 2016 <></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">X-Mozilla-Status:
</th>
<td>0001</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">X-Mozilla-Status2:
</th>
<td>00800000</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">X-Mozilla-Keys:
</th>
<td><br>
</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Reply-To:
</th>
<td><a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:willemferguson@zoology.up.ac.za">willemferguson@zoology.up.ac.za</a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Subject:
</th>
<td>Re: Subsurface mobile downloadfromdivecomputer</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">References:
</th>
<td><a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:571A2BB5.1010205@zoology.up.ac.za"><571A2BB5.1010205@zoology.up.ac.za></a>
<a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:CACk01_y362=c54_ogsPksbfOd7xYpUgMOiUvXqqo+JJamAjM6Q@mail.gmail.com"><CACk01_y362=c54_ogsPksbfOd7xYpUgMOiUvXqqo+JJamAjM6Q@mail.gmail.com></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">To: </th>
<td>Tomaz Canabrava <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:tcanabrava@kde.org"><tcanabrava@kde.org></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Cc: </th>
<td>Subsurface Mailing List <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:subsurface@subsurface-divelog.org"><subsurface@subsurface-divelog.org></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">From:
</th>
<td>Willem Ferguson <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:willemferguson@zoology.up.ac.za"><willemferguson@zoology.up.ac.za></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Organization:
</th>
<td>University of Pretoria</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Message-ID:
</th>
<td><a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:571A631D.6040309@zoology.up.ac.za"><571A631D.6040309@zoology.up.ac.za></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Date:
</th>
<td>Fri, 22 Apr 2016 19:45:01 +0200</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">User-Agent:
</th>
<td>Mozilla/5.0 (X11; Linux x86_64; rv:38.0)
Gecko/20100101 Thunderbird/38.5.1</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">MIME-Version:
</th>
<td>1.0</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">In-Reply-To:
</th>
<td><a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:CACk01_y362=c54_ogsPksbfOd7xYpUgMOiUvXqqo+JJamAjM6Q@mail.gmail.com"><CACk01_y362=c54_ogsPksbfOd7xYpUgMOiUvXqqo+JJamAjM6Q@mail.gmail.com></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Content-Type:
</th>
<td>multipart/alternative;
boundary="------------020904010100000309070704"</td>
</tr>
</tbody>
</table>
<br>
<br>
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 22/04/2016 15:55, Tomaz
Canabrava wrote:<br>
</div>
<blockquote
cite="mid:CACk01_y362=c54_ogsPksbfOd7xYpUgMOiUvXqqo+JJamAjM6Q@mail.gmail.com"
type="cite">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Apr 22, 2016 at 10:48 AM,
Willem Ferguson <span dir="ltr"><<a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:willemferguson@zoology.up.ac.za"><a class="moz-txt-link-abbreviated" href="mailto:willemferguson@zoology.up.ac.za">willemferguson@zoology.up.ac.za</a></a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
I am forced to ask help. I have now spent about three
weeks to solve this problem and I am making no headway
whatsoever, probably because my understanding is
limited. It is setting up the table to display the
uploaded dives. I use a TableView to do this. QML
creates it and I can set its attributes. Using the
widget code in the present
downloadfromdivecomputer.cpp, I pass a model to QML.
But when I specify the model I get a segfault when
executing the mobile code on Fedora. I know which C++
instruction throws the segfault but it does not help
very much in this case. I just cannot get QML to
accept and make use of the model. An important
obstacle is the poor error messaging when working with
QML.<br>
<br>
I need someone better qualified than myself to look
through the code and tell me where I go wrong. It
appears this is a bit of a quieter period in the
development cycle. Would any one be prepared to look
at it at all? Alternatively, is there a different
approach I can take to locate the issue of how QML
sees the model?<br>
</blockquote>
<div><br>
</div>
<div>you forgot to send the code. :)</div>
<div>usually:</div>
<div><br>
</div>
<div>- Mark all methods you wanna call with Q_INVOKABLE</div>
<div>- export the model to the qml engine </div>
<div>- access it directly via the name that you used.</div>
<div> </div>
<div>send the diff code and I can take a look today</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"> <br>
Kind regards,<br>
willem<br>
___________<br>
</blockquote>
</div>
</div>
</div>
</blockquote>
<br>
Tomaz,<br>
The code was not meant to be attached. Here it is as a Dropbox
link, all 45 MB of it as a tar.gz. <br>
<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://www.dropbox.com/sh/nmrzgw10ylq5ii2/AAAX0tbnx97tKQm8wVFzQbb4a?dl=0">https://www.dropbox.com/sh/nmrzgw10ylq5ii2/AAAX0tbnx97tKQm8wVFzQbb4a?dl=0</a><br>
<br>
The reason is that this is a pretty old version of Subsurface
and I do not know how to diff an old version in a way that you
can easily access it. <br>
Explanation: For downloading, I removed almost all of the code
that is NOT widget-oriented from
desktopwidgets/downloadfromdivecomputer.cpp and put it in
subsurface-core/downloadmanager.cpp, together with a few
mobile-oriented methods. download manager.cpp contains three
main sections: <br>
Class DiveImportedModel : The class dealing with displaying
downloaded dives<br>
Class Downloadmanager: The class controlling the download
process<br>
Class Downloadthread: The class doing the actual work.<br>
<br>
Downloadmanager includes, as a member, DiveImportedModel (see
downloadfromdivecomputer.h), possibly the crux of the problem.
It will also include Downloadthread as a member.<br>
The QML interface for the C++ is
qt-mobile/qml/DownloadFromDiveComputer.qml.<br>
<br>
DownloadFromDiveComputer.qml has, around line 95, two blocks of
code that are alternatives. One of the two code blocks needs to
be commented out.<br>
If one compiles the mobile code with code block A commented out,
the code compiles and runs on Linux (I use F23). When it runs,
you can, within Subsurface-mobile do:<br>
Select main menu on left<br>
Select Manage dives<br>
Select Download dives<br>
<br>
In the bottom half of the screen is an empty table but with
appropriate headings. This is where the downloaded dives are
shown after download. The class DiveImportedModel controls this
table. I wish to replace code block B with the simple
instruction comprising code block A.<br>
<br>
Now disable Code block B and enable code block A.<br>
The program crashes upon launching.<br>
<br>
The crash is caused by line 67 in
subsurface/subsurface-mobile-helper.cpp
(setContextProperty(downloadhelper.....)<br>
<br>
Any advice will really be appreciated.<br>
<br>
Kind regards,<br>
willem<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div>
<br>
<br>
</div>
<br>
</body>
</html>