<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">the first protects writing to the QHashes with a mutex, the second makes the hashing non-blocking.</div><div class=""><br class=""></div><div class="">BTW, I failed to display a message box after the hashing finished as in <br class=""><div class=""><br class="webkit-block-placeholder"></div><div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); font-family: Menlo;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Menlo; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Menlo; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Menlo; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<pre style="margin-top: 0px; margin-bottom: 0px;" class=""><!--StartFragment--><span style=" color:#808000;" class="">void</span><span style=" color:#c0c0c0;" class=""> </span><span style=" color:#800080;" class="">DivePictureModel</span>::updateDivePicturesWhenDone(<span style=" color:#800080;" class="">QList</span><<span style=" color:#800080;" class="">QFuture</span><<span style=" color:#808000;" class="">void</span>><span style=" color:#c0c0c0;" class=""> </span>><span style=" color:#c0c0c0;" class=""> </span>futures)</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;" class="">{</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;" class=""><span style=" color:#c0c0c0;" class="">  </span><span style=" color:#800080;" class="">Q_FOREACH</span><span style=" color:#c0c0c0;" class=""> </span>(<span style=" color:#800080;" class="">QFuture</span><<span style=" color:#808000;" class="">void</span>><span style=" color:#c0c0c0;" class=""> </span>f,<span style=" color:#c0c0c0;" class=""> </span>futures)<span style=" color:#c0c0c0;" class=""> </span>{</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;" class=""><span style=" color:#c0c0c0;" class="">          </span>f.waitForFinished();</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;" class=""><span style=" color:#c0c0c0;" class="">  </span>}</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;" class=""><span style=" color:#c0c0c0;" class="">  </span>updateDivePictures();</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;" class=""><span style=" color:#c0c0c0;" class="">  </span><span style=" color:#800080;" class="">QMessageBox</span><span style=" color:#c0c0c0;" class=""> </span>hashingDone;</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;" class=""><span style=" color:#c0c0c0;" class="">  </span>hashingDone.setText(tr(<span style=" color:#008000;" class="">"Image</span><span style=" color:#c0c0c0;" class=""> </span><span style=" color:#008000;" class="">hashing</span><span style=" color:#c0c0c0;" class=""> </span><span style=" color:#008000;" class="">completed"</span>));</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;" class=""><span style=" color:#c0c0c0;" class="">  </span>hashingDone.<span style="font-style: italic;" class="">exec</span>();</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;" class="">}<!--EndFragment--></pre><pre style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></pre><pre style="margin-top: 0px; margin-bottom: 0px;" class="">This indeed shows the message box but crashes upon closing it with </pre><pre style="margin-top: 0px; margin-bottom: 0px;" class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">QBasicTimer::start: Timers cannot be started from another thread</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">and a segmentation fault.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">Any ideas?</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">Best</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">Robert</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""></div></pre></div></div></div></div></div></div></body></html>