anbu01
18th August 2015, 11:13
Hi,
Can we use a mutex pointer inside QMutexLocker.For example:-
MyClass.h
QMutex *m_mutexPtr;
MyClass.cpp
void myFunction() const
{
QMutexLocker locker(m_mutexPtr);
......
}
Is it right way to use like this because the editor shows locker as unused variable,this happens only when i use mutex variable as Pointer.So is it wrong.I have attached image showing the editor.
Can we use a mutex pointer inside QMutexLocker.For example:-
MyClass.h
QMutex *m_mutexPtr;
MyClass.cpp
void myFunction() const
{
QMutexLocker locker(m_mutexPtr);
......
}
Is it right way to use like this because the editor shows locker as unused variable,this happens only when i use mutex variable as Pointer.So is it wrong.I have attached image showing the editor.