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
provider.cpp File Reference

(fb226262e8b371372fdc66b832b9eab24741f70d)

#include "provider.h"
#include "panic.h"
#include <qfile.h>
#include <qfileinfo.h>
#include <qtextstream.h>
#include <qregularexpression.h>
#include <qstring.h>
#include <qtpreprocessorsupport.h>
+ Include dependency graph for provider.cpp:

Go to the source code of this file.

Macros

#define TYPEDATA_ENTRY(type, backendType)   { QT_STRINGIFY(type), backendType }
 

Functions

static int arrayLength (const QString &rawType)
 
static QString sequenceLength (const QString &rawType)
 
static QString decayArrayToPointer (QString type)
 
static QString removeBraces (QString type)
 
static Tracepoint::Field::Type backendType (QString rawType)
 
static Tracepoint parseTracepoint (const Provider &provider, const QString &name, const QStringList &args, const QString &fileName, const int lineNumber)
 
static int minumumValueSize (int min, int max)
 
static bool isPow2OrZero (quint32 value)
 
static quint32 pow2Log2 (quint32 v)
 
Provider parseProvider (const QString &filename)
 

Macro Definition Documentation

◆ TYPEDATA_ENTRY

#define TYPEDATA_ENTRY ( type,
backendType )   { QT_STRINGIFY(type), backendType }

Definition at line 99 of file provider.cpp.

Referenced by backendType().

Function Documentation

◆ arrayLength()

static int arrayLength ( const QString & rawType)
inlinestatic

Definition at line 52 of file provider.cpp.

References match(), QStringLiteral, and rx().

Referenced by backendType(), QNetworkReplyWasmImplPrivate::doSendRequest(), AndroidCameraPrivate::fetchLastPreviewFrame(), QV4::ArrayPrototype::method_join(), QQuickJSContext2DPrototype::method_setLineDash(), notifyNewPreviewFrame(), notifyPictureCaptured(), QQmlDelegateModelItemMetaType::parseGroups(), parseTracepoint(), and ListModel::set().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ backendType()

static Tracepoint::Field::Type backendType ( QString rawType)
static

Definition at line 102 of file provider.cpp.

References arrayLength(), backendType(), Tracepoint::Field::Boolean, d, Tracepoint::Field::Float, i, Tracepoint::Field::Integer, Tracepoint::Field::IntegerHex, Tracepoint::Field::Pointer, QStringLiteral, Tracepoint::Field::QtByteArray, Tracepoint::Field::QtRect, Tracepoint::Field::QtRectF, Tracepoint::Field::QtSize, Tracepoint::Field::QtSizeF, Tracepoint::Field::QtString, Tracepoint::Field::QtUrl, removeBraces(), Tracepoint::Field::Sequence, sequenceLength(), Tracepoint::Field::String, TYPEDATA_ENTRY, unknown, and Tracepoint::Field::Unknown.

Referenced by backendType(), and parseTracepoint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ decayArrayToPointer()

static QString decayArrayToPointer ( QString type)
static

Definition at line 82 of file provider.cpp.

References QStringLiteral, and rx().

Referenced by parseTracepoint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isPow2OrZero()

static bool isPow2OrZero ( quint32 value)
static

Definition at line 283 of file provider.cpp.

Referenced by parseProvider().

+ Here is the caller graph for this function:

◆ minumumValueSize()

static int minumumValueSize ( int min,
int max )
static

Definition at line 267 of file provider.cpp.

Referenced by parseProvider().

+ Here is the caller graph for this function:

◆ parseProvider()

Provider parseProvider ( const QString & filename)

Definition at line 292 of file provider.cpp.

References args, QFileInfo::baseName(), QList< T >::constBegin(), QList< T >::constEnd(), Provider::enumerations, Provider::flags, i, QString::isEmpty(), isPow2OrZero(), line, match(), minumumValueSize(), TraceFlags::name, Provider::name, panic(), parseTracepoint(), pow2Log2(), Provider::prefixText, QList< T >::push_back(), qDebug, qMax(), qMin(), qPrintable, QStringLiteral, QIODeviceBase::ReadOnly, Qt::SkipEmptyParts, QString::startsWith(), QIODeviceBase::Text, Provider::tracepoints, QString::trimmed(), and TraceFlags::values.

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseTracepoint()

static Tracepoint parseTracepoint ( const Provider & provider,
const QString & name,
const QStringList & args,
const QString & fileName,
const int lineNumber )
static

Definition at line 186 of file provider.cpp.

References args, Tracepoint::Argument::arrayLen, Tracepoint::Field::arrayLen, arrayLength(), backendType(), Tracepoint::Field::backendType, QList< T >::constBegin(), QList< T >::constEnd(), decayArrayToPointer(), Tracepoint::Field::EnumeratedType, Provider::enumerations, Tracepoint::Field::enumValueSize, fileName, Provider::flags, Tracepoint::Field::FlagType, i, QString::isEmpty(), QList< T >::isEmpty(), match(), Tracepoint::Field::name, Tracepoint::name, TraceEnum::name, panic(), Tracepoint::Field::paramType, qPrintable, QStringLiteral, removeBraces(), rx(), Tracepoint::Field::seqLen, sequenceLength(), and TraceEnum::valueSize.

Referenced by parseProvider().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pow2Log2()

static quint32 pow2Log2 ( quint32 v)
static

Definition at line 288 of file provider.cpp.

References qCountLeadingZeroBits().

Referenced by parseProvider().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeBraces()

static QString removeBraces ( QString type)
static

Definition at line 92 of file provider.cpp.

References QStringLiteral, and rx().

Referenced by backendType(), and parseTracepoint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sequenceLength()

static QString sequenceLength ( const QString & rawType)
inlinestatic

Definition at line 66 of file provider.cpp.

References match(), QStringLiteral, and rx().

Referenced by backendType(), and parseTracepoint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: