Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmlprofilereventtype.cpp
Go to the documentation of this file.
1
// Copyright (C) 2017 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
"qqmlprofilereventtype_p.h"
6
#
include
"qqmlprofilerclientdefinitions_p.h"
7
8
#
include
<
QtCore
/
qdatastream
.
h
>
9
10
QT_BEGIN_NAMESPACE
11
12
QDataStream &operator>>(QDataStream &stream, QQmlProfilerEventType &type)
13
{
14
quint8 message;
15
quint8 rangeType;
16
stream >> type.m_displayName >> type.m_data >> type.m_location >> message >> rangeType
17
>> type.m_detailType;
18
type.m_message =
static_cast
<Message>(message);
19
type.m_rangeType =
static_cast
<RangeType>(rangeType);
20
return
stream;
21
}
22
23
QDataStream &operator<<(QDataStream &stream,
const
QQmlProfilerEventType &type)
24
{
25
return
stream << type.m_displayName << type.m_data << type.m_location
26
<<
static_cast
<quint8>(type.m_message) <<
static_cast
<quint8>(type.m_rangeType)
27
<< type.m_detailType;
28
}
29
30
ProfileFeature QQmlProfilerEventType::feature()
const
31
{
32
switch
(m_message) {
33
case
Event: {
34
switch
(m_detailType) {
35
case
Mouse:
36
case
Key:
37
return
ProfileInputEvents;
38
case
AnimationFrame:
39
return
ProfileAnimations;
40
default
:
41
return
MaximumProfileFeature;
42
}
43
}
44
case
PixmapCacheEvent:
45
return
ProfilePixmapCache;
46
case
SceneGraphFrame:
47
return
ProfileSceneGraph;
48
case
MemoryAllocation:
49
return
ProfileMemory;
50
case
DebugMessage:
51
return
ProfileDebugMessages;
52
default
:
53
break
;
54
}
55
56
switch
(m_rangeType) {
57
case
Painting:
58
return
ProfilePainting;
59
case
Compiling:
60
return
ProfileCompiling;
61
case
Creating:
62
return
ProfileCreating;
63
case
Binding:
64
return
ProfileBinding;
65
case
HandlingSignal:
66
return
ProfileHandlingSignal;
67
case
Javascript:
68
return
ProfileJavaScript;
69
default
:
70
return
MaximumProfileFeature;
71
}
72
}
73
74
75
QT_END_NAMESPACE
qtdeclarative
src
qmldebug
qqmlprofilereventtype.cpp
Generated on
for Qt by
1.14.0