Qt: Update recent status via a non-blocking connection.
authorGerald Combs <gerald@wireshark.org>
Sat, 3 Feb 2018 17:51:14 +0000 (09:51 -0800)
committerAnders Broman <a.broman58@gmail.com>
Mon, 5 Feb 2018 05:10:10 +0000 (05:10 +0000)
commit1d999dea5c441131abfcfd8464f766f649f9a10f
treedc1b06023862b322efa1911cfdab8ac19095f738
parent90b3e725d48686b6de40bc409e94b5babcb841b8
Qt: Update recent status via a non-blocking connection.

Connect our recent file status signal using a Qt::QueuedConnection
instead of a Qt::BlockingQueuedConnection. As described at
https://woboq.com/blog/how-qt-signals-slots-work-part3-queuedconnection.html,
QueuedConnection makes a copy of the argument list while
BlockingQueuedConnection passess the list directly.

This fixes what appears to be a false positive reported by
ThreadSanitizer. Cross-thread signals are protected by a QMutex, but
qmutex_mac.cpp in the Qt5 sources uses a Mach semaphore. The
ThreadSanitizer manual says it supports pthread mutexes and compiler
atomic operations but doesn't mention Mach semaphores.

Change-Id: Icb8a63d7d0bdfe985ab8274757043ef45ae4bcde
Reviewed-on: https://code.wireshark.org/review/25576
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
ui/qt/recent_file_status.cpp