QThread: avoid mixed enum arithmetic
It's deprecated. Task-number: QTBUG-94059 Change-Id: If4fb81b650edb7cdb96980986dc4710a1a5040af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
b548c321d7
commit
cffc667ad9
@ -296,8 +296,8 @@ void *QThreadPrivate::start(void *arg)
|
||||
QMutexLocker locker(&thr->d_func()->mutex);
|
||||
|
||||
// do we need to reset the thread priority?
|
||||
if (int(thr->d_func()->priority) & ThreadPriorityResetFlag) {
|
||||
thr->d_func()->setPriority(QThread::Priority(thr->d_func()->priority & ~ThreadPriorityResetFlag));
|
||||
if (qToUnderlying(thr->d_func()->priority) & ThreadPriorityResetFlag) {
|
||||
thr->d_func()->setPriority(QThread::Priority(qToUnderlying(thr->d_func()->priority) & ~ThreadPriorityResetFlag));
|
||||
}
|
||||
|
||||
data->threadId.storeRelaxed(to_HANDLE(pthread_self()));
|
||||
@ -679,7 +679,7 @@ void QThread::start(Priority priority)
|
||||
// could not set scheduling hints, fallback to inheriting them
|
||||
// we'll try again from inside the thread
|
||||
pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);
|
||||
d->priority = Priority(priority | ThreadPriorityResetFlag);
|
||||
d->priority = Priority(qToUnderlying(priority) | ThreadPriorityResetFlag);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user