summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2025-02-09 11:08:19 -0800
committerThiago Macieira <thiago.macieira@intel.com>2025-02-26 17:54:59 -0800
commit6fb39ca2cbb111469ce09c8342997eb5375e3239 (patch)
tree512f026519549c6508f4e9b17224b254e546383d /src/corelib/kernel/qobject.cpp
parent7c7731a8229a44050c02d33c7111e4d522909c1d (diff)
Use QThread::isMainThread() in a few places
It's thread-safe, whereas trying to load qApp isn't in Qt 6.x (will be in 7.0) and dereferencing it to call QObject::thread() will probably never be. It's also faster, being a single function call instead of two or three. This is not an exhaustive search, it's just a few places I found while searching for QThread::instance(). Pick-to: 6.9 6.8 Change-Id: I3b4e1c75bb3966e2cd2dfffd79bfc8a40f6cf40b Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
0 files changed, 0 insertions, 0 deletions