Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
helpers.h
Go to the documentation of this file.
1// Copyright (C) 2017 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Rafael Roquetto <rafael.roquetto@kdab.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef HELPERS_H
5#define HELPERS_H
6
7#include "provider.h"
8
9#include <qlist.h>
10#include <qstring.h>
11#include <qtextstream.h>
12
18
20QString includeGuard(const QString &filename);
21QString formatFunctionSignature(const QList<Tracepoint::Argument> &args);
22QString formatParameterList(const Provider &provider, const QList<Tracepoint::Argument> &args, const QList<Tracepoint::Field> &fields, ParamType type);
23
25
26template <typename T>
27static QString aggregateListValues(int value, const QList<T> &list)
28{
30 for (const T &l : list) {
31 if (l.value == value)
32 values << l.name;
33 }
34 return values.join(QLatin1Char('_'));
35}
36
37#endif // HELPERS_H
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
void writeCommonPrologue(QTextStream &stream)
Definition helpers.cpp:9
QString typeToTypeName(const QString &type)
Definition helpers.cpp:14
ParamType
Definition helpers.h:13
@ LTTNG
Definition helpers.h:14
@ ETW
Definition helpers.h:15
@ CTF
Definition helpers.h:16
static QString aggregateListValues(int value, const QList< T > &list)
Definition helpers.h:27
QString includeGuard(const QString &filename)
Definition helpers.cpp:20
QString formatFunctionSignature(const QList< Tracepoint::Argument > &args)
Definition helpers.cpp:50
QString formatParameterList(const Provider &provider, const QList< Tracepoint::Argument > &args, const QList< Tracepoint::Field > &fields, ParamType type)
Definition helpers.cpp:57
EGLStreamKHR stream
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum GLsizei GLsizei GLint * values
[15]
GLenum type
QList< int > list
[14]
QJSValueList args
\inmodule QtCore \reentrant
Definition qchar.h:18