ThreadUtils: Replace the implementation for Qt 6.8

Change-Id: I8d4890179165bca02af972debfe4f11fae41ebbd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Jarek Kobus
2024-05-16 00:16:03 +02:00
parent c00ae02dff
commit 29822d1a2b

View File

@@ -10,7 +10,12 @@ namespace Utils {
bool isMainThread()
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
// TODO: Remove threadutils.h and replace all usages with:
return QThread::isMainThread();
#else
return QThread::currentThread() == qApp->thread();
#endif
}
} // namespace Utils