Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions handler/singletone/call_once.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ template <class Function>
inline static void qCallOncePerThread(Function func)
{
using namespace CallOnce;
if (!once_flag()->hasLocalData()) {
once_flag()->setLocalData(new QAtomicInt(CO_Request));
qCallOnce(func, *once_flag()->localData());
if (!CallOnce::once_flag()->hasLocalData()) { // qualifie with CallOnce:: due to conflict on MacOS X
CallOnce::once_flag()->setLocalData(new QAtomicInt(CO_Request));
qCallOnce(func, *CallOnce::once_flag()->localData());
}
}

Expand Down