summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization/qjsonobject.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-07-04 21:09:09 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-07-19 22:16:04 +0200
commitce86c3373e0271ffad4ce645663e63a468158c1a (patch)
tree7aa3dfcb64b0799496a3084bc5969002eb552192 /src/corelib/serialization/qjsonobject.cpp
parent315ac36e5dce548fef1907e50271ed2412d445cc (diff)
QHostInfo: un-QObject-ify QHostInfoLookupManager
QObjects are not even reentrant, but this class must be thread-safe, so it's always ... icky ... to have to analyze a "thread-safe QObject", because for all intents and purposes, that's an oxymoron. The QObject-ness isn't even used, except for defining a private slot, connected to QCoreApplication::destroyed(). That slot just calls waitForDone() on QThreadPool, which is a QObject itself, so use it as the context object for the signal-slot connection, using a lambda as slot. So, strip the class of it's base class, convert the private slot to a lambda and connect to that. Finally, remove the moveToThread() call, because this new class can be destroyed from any thread, not just the main one. Change-Id: I0e33983aa7afd0ad621ece4afd10d9e4adad38c1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/serialization/qjsonobject.cpp')
0 files changed, 0 insertions, 0 deletions