Qt 6.x
The Qt SDK
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
10
12{
14 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QCtfLib" FILE "trace.json")
16
17public:
19 {
20
21 }
23 {
24 m_cleanup = true;
25 *m_shutdown = true;
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;
37 }
38 void doTracepoint(const QCtfTracePointEvent &point, const QByteArray &arr) override
39 {
40 if (m_cleanup)
41 return;
43 }
44 bool sessionEnabled() override
45 {
46 if (m_cleanup)
47 return false;
49 }
51 {
52 if (m_cleanup)
53 return nullptr;
55 }
56private:
57 bool m_cleanup = false;
58 bool *m_shutdown = nullptr;
59};
60
61#include "qctfplugin.moc"
62
\inmodule QtCore
Definition qbytearray.h:57
static QCtfLib * instance()
Definition qctflib.cpp:43
static void cleanup()
Definition qctflib.cpp:50
virtual bool sessionEnabled()=0
virtual void doTracepoint(const QCtfTracePointEvent &point, const QByteArray &arr)=0
virtual QCtfTracePointPrivate * initializeTracepoint(const QCtfTracePointEvent &point)=0
virtual bool tracepointEnabled(const QCtfTracePointEvent &point)=0
void shutdown(bool *shutdown) override
QCtfTracePointPrivate * initializeTracepoint(const QCtfTracePointEvent &point) override
bool sessionEnabled() override
void doTracepoint(const QCtfTracePointEvent &point, const QByteArray &arr) override
bool tracepointEnabled(const QCtfTracePointEvent &point) override
Combined button and popup list for selecting options.
#define Q_OBJECT
#define Q_PLUGIN_METADATA(x)
#define Q_INTERFACES(x)