16 if (
event.serverTypeId != 0) {
20 typeIndex =
it.value();
30 typeIndex =
it.value();
145 this, [
d](
int engineId) {
147 if (d->trackedEngines.contains(engineId))
148 d->engineControl->blockEngine(engineId);
155 for (int blocked : d->engineControl->blockedEngines()) {
156 if (engineIds.contains(blocked))
157 d->engineControl->releaseEngine(blocked);
173 d->rangesInProgress.clear();
174 d->pendingMessages.clear();
175 d->pendingDebugMessages.clear();
176 if (
d->recordedFeatures != 0) {
177 d->recordedFeatures = 0;
186 d->serverTypeIds.clear();
187 d->eventTypeIds.clear();
188 d->trackedEngines.clear();
207 d->sendRecordingStatus(engineId);
219 if (
v ==
d->recording)
233 return d->recordedFeatures;
239 d->requestedFeatures = features;
241 if (
d->messageClient.isNull()) {
246 Q_D(QQmlProfilerClient);
247 d->updateFeatures(ProfileDebugMessages);
248 d->currentEvent.event.setTimestamp(context.timestamp > 0 ? context.timestamp : 0);
249 d->currentEvent.event.setTypeIndex(-1);
250 d->currentEvent.event.setString(text);
251 d->currentEvent.type = QQmlProfilerEventType(
252 DebugMessage, MaximumRangeType, type,
253 QQmlProfilerEventLocation(context.file, context.line, 1));
254 d->currentEvent.serverTypeId = 0;
255 d->processCurrentEvent();
259 d->messageClient.reset();
266 d->flushInterval = flushInterval;
280 quint64 flag = 1ULL << feature;
308 d->maximumTime =
qMax(
d->currentEvent.event.timestamp(),
d->maximumTime);
309 if (
d->currentEvent.type.message() ==
Complete) {
312 }
else if (
d->currentEvent.type.message() ==
Event
313 &&
d->currentEvent.type.detailType() ==
StartTrace) {
315 d->trackedEngines.append(engineIds);
316 d->forwardDebugMessages(
d->currentEvent.event.timestamp());
318 }
else if (
d->currentEvent.type.message() ==
Event
319 &&
d->currentEvent.type.detailType() ==
EndTrace) {
321 for (
int engineId : engineIds)
322 d->trackedEngines.removeAll(engineId);
323 d->forwardDebugMessages(
d->currentEvent.event.timestamp());
325 }
else if (
d->updateFeatures(
d->currentEvent.type.feature())) {
326 d->processCurrentEvent();
332#include "moc_qqmlprofilerclient_p.cpp"
const_iterator constFind(const Key &key) const noexcept
const_iterator constEnd() const noexcept
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the ...
bool isEmpty() const noexcept
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
The QPacket class encapsulates an unfragmentable packet of data to be transmitted by QPacketProtocol.
QPointer< QQmlDebugConnection > connection
void stateChanged(State state)
QQmlDebugConnection * connection() const
int currentDataStreamVersion() const
Client for the debug message service.
void message(QtMsgType, const QString &, const QQmlDebugContextInfo &)
void engineAboutToBeRemoved(int engineId, const QString &name)
void engineAboutToBeAdded(int engineId, const QString &name)
QQmlProfilerTypedEvent currentEvent
QHash< QQmlProfilerEventType, int > eventTypeIds
QQueue< QQmlProfilerEvent > pendingDebugMessages
void forwardDebugMessages(qint64 untilTimestamp)
int resolveType(const QQmlProfilerTypedEvent &type)
QQmlProfilerEventReceiver * eventReceiver
void sendRecordingStatus(int engineId)
void processCurrentEvent()
~QQmlProfilerClientPrivate() override
QStack< QQmlProfilerTypedEvent > rangesInProgress
bool updateFeatures(ProfileFeature feature)
void forwardEvents(const QQmlProfilerEvent &last)
QHash< qint64, int > serverTypeIds
QQueue< QQmlProfilerEvent > pendingMessages
void setFlushInterval(quint32 flushInterval)
QQmlProfilerClient(QQmlDebugConnection *connection, QQmlProfilerEventReceiver *eventReceiver, quint64 features=std::numeric_limits< quint64 >::max())
quint64 recordedFeatures() const
void traceFinished(qint64 timestamp, const QList< int > &engineIds)
void setRequestedFeatures(quint64 features)
void recordedFeaturesChanged(quint64 features)
void traceStarted(qint64 timestamp, const QList< int > &engineIds)
virtual void messageReceived(const QByteArray &) override
void recordingChanged(bool arg)
void onStateChanged(State status)
void sendRecordingStatus(int engineId=-1)
void complete(qint64 maximumTime)
virtual int numLoadedEventTypes() const =0
virtual void addEventType(const QQmlProfilerEventType &type)=0
virtual void addEvent(const QQmlProfilerEvent &event)=0
QQmlProfilerEventLocation location() const
void setLocation(const QQmlProfilerEventLocation &location)
void setData(const QString &data)
RangeType rangeType() const
void enqueue(const T &t)
Adds value t to the tail of the queue.
T & head()
Returns a reference to the queue's head item.
T dequeue()
Removes the head item in the queue and returns it.
T & top()
Returns a reference to the stack's top item.
T pop()
Removes the top item from the stack and returns it.
void push(const T &t)
Adds element t to the top of the stack.
\macro QT_RESTRICTED_CAST_FROM_ASCII
QSet< QString >::iterator it
Combined button and popup list for selecting options.
DBusConnection * connection
constexpr const T & qMax(const T &a, const T &b)
GLsizei const GLfloat * v
[13]
GLuint GLuint GLuint requestedFeatures
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLdouble GLdouble GLdouble GLdouble q
unsigned long long quint64
Message rangeStage() const
void setTimestamp(qint64 timestamp)
void setRangeStage(Message stage)
void setTypeIndex(int typeIndex)
QQmlProfilerEventType type