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
qctfplugin.cpp
Go to the documentation of this file.
1
// Copyright (C) 2022 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
4
#
define
BUILD_LIBRARY
5
#
include
<
qstring
.
h
>
6
#
include
"qctfplugin_p.h"
7
#
include
"qctflib_p.h"
8
9
QT_BEGIN_NAMESPACE
10
11
class
QCtfTracePlugin
:
public
QCtfLib
12
{
13
Q_OBJECT
14
Q_PLUGIN_METADATA(IID
"org.qt-project.Qt.QCtfLib"
FILE
"trace.json"
)
15
Q_INTERFACES
(
QCtfLib
)
16
17
public
:
18
QCtfTracePlugin
()
19
{
20
21
}
22
~
QCtfTracePlugin
()
23
{
24
m_cleanup
=
true
;
25
*
m_shutdown
=
true
;
26
QCtfLibImpl
::
cleanup
();
27
}
28
void
shutdown
(
bool
*
shutdown
)
override
29
{
30
m_shutdown
=
shutdown
;
31
}
32
bool
tracepointEnabled
(
const
QCtfTracePointEvent
&
point
)
override
33
{
34
if
(
m_cleanup
)
35
return
false
;
36
return
QCtfLibImpl
::
instance
()->
tracepointEnabled
(
point
);
37
}
38
void
doTracepoint
(
const
QCtfTracePointEvent
&
point
,
const
QByteArray
&
arr
)
override
39
{
40
if
(
m_cleanup
)
41
return
;
42
QCtfLibImpl
::
instance
()->
doTracepoint
(
point
,
arr
);
43
}
44
bool
sessionEnabled
()
override
45
{
46
if
(
m_cleanup
)
47
return
false
;
48
return
QCtfLibImpl
::
instance
()->
sessionEnabled
();
49
}
50
QCtfTracePointPrivate
*
initializeTracepoint
(
const
QCtfTracePointEvent
&
point
)
override
51
{
52
if
(
m_cleanup
)
53
return
nullptr
;
54
return
QCtfLibImpl
::
instance
()->
initializeTracepoint
(
point
);
55
}
56
private
:
57
bool
m_cleanup
=
false
;
58
bool
*m_shutdown =
nullptr
;
59
};
60
61
QT_END_NAMESPACE
62
63
#
include
"qctfplugin.moc"
QCtfTracePlugin
Definition
qctfplugin.cpp:12
QPlatformGraphicsBufferHelper
\inmodule QtGui
qtbase
src
plugins
tracing
qctfplugin.cpp
Generated on
for Qt by
1.14.0