ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, const char*) { ThreadPrivate* thread = new ThreadPrivate(entryPoint, data); if (!thread) { LOG_ERROR("Failed to create thread at entry point %p with data %p", entryPoint, data); return 0; } thread->start(); QThread* threadRef = static_cast<QThread*>(thread); return establishIdentifierForThread(threadRef); }
ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, const char*) { ThreadPrivate* thread = new ThreadPrivate(entryPoint, data); if (!thread) { qCritical("Failed to create thread at entry point %p with data %p", entryPoint, data); return 0; } QObject::connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); thread->start(); QThread* threadRef = static_cast<QThread*>(thread); return establishIdentifierForThread(threadRef); }