void QQmlConfigurableDebugService::init()
{
    Q_D(QQmlConfigurableDebugService);
    QMutexLocker lock(&d->configMutex);
    // If we're not enabled or not blocking, don't wait for configuration
    d->waitingForConfiguration = (registerService() == Enabled && blockingMode());
}
Example #2
0
QQmlProfilerService::QQmlProfilerService()
    : QQmlDebugService(QStringLiteral("CanvasFrameRate"), 1)
{
    m_timer.start();

    // don't execute stateAboutToBeChanged(), messageReceived() in parallel
    QMutexLocker lock(&m_initializeMutex);

    if (registerService() == Enabled) {
        QUnifiedTimer::instance()->registerProfilerCallback(&animationFrame);
        if (blockingMode())
            m_initializeCondition.wait(&m_initializeMutex);
    }
}