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

(bd6d7d4d74e34b96217388c50f14dbd0df620be6)

#include "moc.h"
#include "generator.h"
#include "qdatetime.h"
#include "utils.h"
#include "outputrevision.h"
#include <QtCore/qfile.h>
#include <QtCore/qfileinfo.h>
#include <QtCore/qdir.h>
#include <QtCore/qjsondocument.h>
#include <private/qmetaobject_moc_p.h>
#include <private/qduplicatetracker_p.h>
+ Include dependency graph for moc.cpp:

Go to the source code of this file.

Macros

#define STREAM_SMART_POINTER(SMART_POINTER)   << #SMART_POINTER
 
#define STREAM_1ARG_TEMPLATE(TEMPLATENAME)   << #TEMPLATENAME
 

Enumerations

enum class  IncludeState { IncludeBegin , IncludeEnd , NoInclude }
 

Functions

static QByteArray normalizeType (const QByteArray &ba)
 
void handleDefaultArguments (QList< FunctionDef > *functionList, FunctionDef &function)
 
static bool any_type_contains (const QList< PropertyDef > &properties, const QByteArray &pattern)
 
static bool any_arg_contains (const QList< FunctionDef > &functions, const QByteArray &pattern)
 
static QByteArrayList make_candidates ()
 
static QByteArrayList requiredQtContainers (const QList< ClassDef > &classes)
 

Macro Definition Documentation

◆ STREAM_1ARG_TEMPLATE

#define STREAM_1ARG_TEMPLATE ( TEMPLATENAME)    << #TEMPLATENAME

◆ STREAM_SMART_POINTER

#define STREAM_SMART_POINTER ( SMART_POINTER)    << #SMART_POINTER

Enumeration Type Documentation

◆ IncludeState

enum class IncludeState
strong
Enumerator
IncludeBegin 
IncludeEnd 
NoInclude 

Definition at line 233 of file moc.cpp.

Function Documentation

◆ any_arg_contains()

static bool any_arg_contains ( const QList< FunctionDef > & functions,
const QByteArray & pattern )
static

Definition at line 1079 of file moc.cpp.

References arg.

Referenced by requiredQtContainers().

+ Here is the caller graph for this function:

◆ any_type_contains()

static bool any_type_contains ( const QList< PropertyDef > & properties,
const QByteArray & pattern )
static

Definition at line 1070 of file moc.cpp.

References properties.

Referenced by requiredQtContainers().

+ Here is the caller graph for this function:

◆ handleDefaultArguments()

void handleDefaultArguments ( QList< FunctionDef > * functionList,
FunctionDef & function )
inline

Definition at line 604 of file moc.cpp.

References function.

Referenced by Moc::parse(), Moc::parseSignals(), Moc::parseSlotInPrivate(), and Moc::parseSlots().

+ Here is the caller graph for this function:

◆ make_candidates()

static QByteArrayList make_candidates ( )
static

Definition at line 1090 of file moc.cpp.

References QT_FOR_EACH_AUTOMATIC_TEMPLATE_1ARG, QT_FOR_EACH_AUTOMATIC_TEMPLATE_SMART_POINTER, STREAM_1ARG_TEMPLATE, and STREAM_SMART_POINTER.

Referenced by requiredQtContainers().

+ Here is the caller graph for this function:

◆ normalizeType()

static QByteArray normalizeType ( const QByteArray & ba)
static

Definition at line 24 of file moc.cpp.

References ba, QByteArray::constBegin(), QByteArray::constEnd(), and QByteArray::size().

Referenced by Moc::createPropertyDef(), QtPrivate::QTypeNormalizer::normalizeType(), QtPrivate::QTypeNormalizer::normalizeTypeFromSignature(), Moc::parseEnum(), Moc::parseFunction(), Moc::parseFunctionArguments(), and Moc::parseMaybeFunction().

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

◆ requiredQtContainers()

static QByteArrayList requiredQtContainers ( const QList< ClassDef > & classes)
static

Definition at line 1104 of file moc.cpp.

References any_arg_contains(), any_type_contains(), QByteArray::isEmpty(), and make_candidates().

Referenced by Moc::generate().

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