forked from qt-creator/qt-creator
ThreadUtils: Replace the implementation for Qt 6.8
Change-Id: I8d4890179165bca02af972debfe4f11fae41ebbd Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user