Two patches for image hashing

Robert Helling helling at lmu.de
Thu Mar 26 15:21:59 PDT 2015


Hi,

the first protects writing to the QHashes with a mutex, the second makes the hashing non-blocking.

BTW, I failed to display a message box after the hashing finished as in

void DivePictureModel::updateDivePicturesWhenDone(QList<QFuture<void> > futures)
{
	Q_FOREACH (QFuture<void> f, futures) {
		f.waitForFinished();
	}
	updateDivePictures();
	QMessageBox hashingDone;
	hashingDone.setText(tr("Image hashing completed"));
	hashingDone.exec();
}

This indeed shows the message box but crashes upon closing it with
QBasicTimer::start: Timers cannot be started from another thread

and a segmentation fault.

Any ideas?

Best
Robert


--
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling     Elite Master Course Theoretical and Mathematical Physics
                      Scientific Coordinator
                      Ludwig Maximilians Universitaet Muenchen, Dept. Physik
                      Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339
                      http://www.atdotde.de

Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515  BB44 0820 367C 36BC 0C1D    and
DCED 37B6 251C 7861 270D  5613 95C7 9D32 9A8D 9B8F





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150326/e0559e17/attachment-0003.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Protect-writing-to-image-hashes-with-a-mutex.txt
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150326/e0559e17/attachment-0002.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150326/e0559e17/attachment-0004.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0002-Make-the-image-hashing-non-blocking-again.txt
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150326/e0559e17/attachment-0003.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150326/e0559e17/attachment-0005.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150326/e0559e17/attachment-0001.sig>


More information about the subsurface mailing list