Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qqmlprofiler.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant
4
5
#
include
"qqmlprofiler_p.h"
6
#
include
"qqmldebugservice_p.h"
7
8
QT_BEGIN_NAMESPACE
9
10
QQmlProfiler::QQmlProfiler() : featuresEnabled(0)
11
{
12
static
int
metatype = qRegisterMetaType<QList<QQmlProfilerData> >();
13
static
int
metatype2 = qRegisterMetaType<QQmlProfiler::LocationHash> ();
14
Q_UNUSED(metatype);
15
Q_UNUSED(metatype2);
16
m_timer.start();
17
}
18
19
void
QQmlProfiler::startProfiling(quint64 features)
20
{
21
featuresEnabled = features;
22
}
23
24
void
QQmlProfiler::stopProfiling()
25
{
26
featuresEnabled =
false
;
27
reportData();
28
m_locations.clear();
29
}
30
31
void
QQmlProfiler::reportData()
32
{
33
LocationHash resolved;
34
resolved.reserve(m_locations.size());
35
for
(
auto
it = m_locations.begin(), end = m_locations.end(); it != end; ++it) {
36
if
(!it->sent) {
37
resolved.insert(it.key(), it.value());
38
it->sent =
true
;
39
}
40
}
41
42
QList<QQmlProfilerData> data;
43
data.swap(m_data);
44
emit dataReady(data, resolved);
45
}
46
47
QT_END_NAMESPACE
48
49
#
include
"moc_qqmlprofiler_p.cpp"
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtdeclarative
src
qml
debugger
qqmlprofiler.cpp
Generated on
for Qt by
1.18.0