Commit 487d7248 authored by Ulf Hermann's avatar Ulf Hermann Committed by The Qt Project
Browse files

Update QQmlAbstractProfilerAdapter documentation.


Change-Id: I11cce4e3494eb2eb06fa781a676cccf5eb2127a8
Reviewed-by: default avatarSimon Hausmann <simon.hausmann@digia.com>
parent 32ce3d27
No related merge requests found
Showing with 67 additions and 10 deletions
...@@ -51,13 +51,6 @@ QT_BEGIN_NAMESPACE ...@@ -51,13 +51,6 @@ QT_BEGIN_NAMESPACE
* recommended way to deal with this is passing the profiling data through a signal/slot connection. * recommended way to deal with this is passing the profiling data through a signal/slot connection.
*/ */
/*!
* \fn void QQmlAbstractProfilerAdapter::dataReady(QQmlAbstractProfilerAdapter *)
* Signals that data has been extracted from the profiler and is readily available in the adapter.
* The primary data representation is in satellite's format. It should be transformed and deleted
* on the fly with sendMessages.
*/
/*! /*!
* \fn void QQmlAbstractProfilerAdapter::dataRequested() * \fn void QQmlAbstractProfilerAdapter::dataRequested()
* Signals that data has been requested by the \c QQmlProfilerService. This signal should be * Signals that data has been requested by the \c QQmlProfilerService. This signal should be
...@@ -78,7 +71,7 @@ QT_BEGIN_NAMESPACE ...@@ -78,7 +71,7 @@ QT_BEGIN_NAMESPACE
*/ */
/*! /*!
* \fn qint64 QQmlAbstractProfilerAdapter::startProfiling() * \fn void QQmlAbstractProfilerAdapter::startProfiling()
* Emits either \c profilingEnabled() or \c profilingEnabledWhileWaiting(), depending on \c waiting. * Emits either \c profilingEnabled() or \c profilingEnabledWhileWaiting(), depending on \c waiting.
* If the profiler's thread is waiting for an initial start signal we can emit the signal over a * If the profiler's thread is waiting for an initial start signal we can emit the signal over a
* \c Qt::DirectConnection to avoid the delay of the event loop. * \c Qt::DirectConnection to avoid the delay of the event loop.
...@@ -93,10 +86,11 @@ void QQmlAbstractProfilerAdapter::startProfiling() ...@@ -93,10 +86,11 @@ void QQmlAbstractProfilerAdapter::startProfiling()
} }
/*! /*!
* \fn qint64 QQmlAbstractProfilerAdapter::stopProfiling() * \fn void QQmlAbstractProfilerAdapter::stopProfiling()
* Emits either \c profilingDisabled() or \c profilingDisabledWhileWaiting(), depending on * Emits either \c profilingDisabled() or \c profilingDisabledWhileWaiting(), depending on
* \c waiting. If the profiler's thread is waiting for an initial start signal we can emit the * \c waiting. If the profiler's thread is waiting for an initial start signal we can emit the
* signal over a \c Qt::DirectConnection to avoid the delay of the event loop. * signal over a \c Qt::DirectConnection to avoid the delay of the event loop. This should trigger
* the profiler to report its collected data and subsequently delete it.
*/ */
void QQmlAbstractProfilerAdapter::stopProfiling() { void QQmlAbstractProfilerAdapter::stopProfiling() {
if (waiting) if (waiting)
...@@ -106,4 +100,67 @@ void QQmlAbstractProfilerAdapter::stopProfiling() { ...@@ -106,4 +100,67 @@ void QQmlAbstractProfilerAdapter::stopProfiling() {
running = false; running = false;
} }
/*!
* \fn bool QQmlAbstractProfilerAdapter::isRunning()
* Returns if the profiler is currently running. The profiler is considered to be running after
* \c startProfiling() has been called until \c stopProfiling() is called. That is independent of
* \c waiting. The profiler may be running and waiting at the same time.
*/
/*!
* \fn void QQmlAbstractProfilerAdapter::profilingDisabled()
* This signal is emitted if \c stopProfiling() is called while the profiler is not considered to
* be waiting. The profiler is expected to handle the signal asynchronously.
*/
/*!
* \fn void QQmlAbstractProfilerAdapter::profilingDisabledWhileWaiting()
* This signal is emitted if \c stopProfiling() is called while the profiler is considered to be
* waiting. In many cases this signal can be connected with a \c Qt::DirectConnection.
*/
/*!
* \fn void QQmlAbstractProfilerAdapter::profilingEnabled()
* This signal is emitted if \c startProfiling() is called while the profiler is not considered to
* be waiting. The profiler is expected to handle the signal asynchronously.
*/
/*!
* \fn void QQmlAbstractProfilerAdapter::profilingEnabledWhileWaiting()
* This signal is emitted if \c startProfiling() is called while the profiler is considered to be
* waiting. In many cases this signal can be connected with a \c Qt::DirectConnection. By starting
* the profiler synchronously when the QML engine starts instead of waiting for the first iteration
* of the event loop the engine startup can be profiled.
*/
/*!
* \fn void QQmlAbstractProfilerAdapter::referenceTimeKnown(const QElapsedTimer &timer)
* This signal is used to synchronize the profiler's timer to the QQmlProfilerservice's. The
* profiler is expected to save \a timer and use it for timestamps on its data.
*/
/*!
* \fn void QQmlAbstractProfilerAdapter::synchronize(const QElapsedTimer &timer)
* Synchronize the profiler to \a timer. This emits \c referenceTimeKnown().
*/
/*!
* \fn void QQmlAbstractProfilerAdapter::reportData()
* Make the profiler report its current data without stopping the collection. The same (and
* additional) data can later be requested again with \c stopProfiling() or \c reportData().
*/
/*!
* \fn void QQmlAbstractProfilerAdapter::startWaiting()
* Consider the profiler to be waiting from now on. While the profiler is waiting it can be directly
* accessed even if it is in a different thread. This method should only be called if it is actually
* safe to do so.
*/
/*!
* \fn void QQmlAbstractProfilerAdapter::stopWaiting()
* Consider the profiler not to be waiting anymore. If it lives in a different threads any requests
* for it have to be done via a queued connection then.
*/
QT_END_NAMESPACE QT_END_NAMESPACE
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment