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

(8555953f072ecabee7003d866395db97a2a82a55)

#include "cpp.h"
#include <translator.h>
#include <QtCore/QBitArray>
#include <QtCore/QTextStream>
#include <QtCore/QRegularExpression>
+ Include dependency graph for cpp.cpp:

Go to the source code of this file.

Classes

class  VisitRecorder
 
class  CppParser
 
struct  QualifyOneData
 

Functions

size_t qHash (const HashString &str)
 
QDebug operator<< (QDebug debug, const HashString &s)
 
size_t qHash (const HashStringList &list)
 
QDebug operator<< (QDebug debug, const HashStringList &lst)
 
static bool isStringLiteralPrefix (const QStringView s)
 
static bool isRawStringLiteralPrefix (QStringView s)
 
size_t qHash (const CppParserState &s, size_t seed)
 
size_t qHash (const ResultsCacheKey &key, size_t seed)
 
static bool isHeader (const QString &name)
 
void loadCPP (Translator &translator, const QStringList &filenames, ConversionData &cd)
 

Variables

static const QString CppMagicComment = u"TRANSLATOR"_s
 
static int nextFileId
 
static const QString strQ_OBJECT = u"Q_OBJECT"_s
 
static const QString strclass = u"class"_s
 
static const QString strdecltype = u"decltype"_s
 
static const QString strenum = u"enum"_s
 
static const QString strfinal = u"final"_s
 
static const QString strfriend = u"friend"_s
 
static const QString strnamespace = u"namespace"_s
 
static const QString strnullptr = u"nullptr"_s
 
static const QString strQ_NULLPTR = u"Q_NULLPTR"_s
 
static const QString strNULL = u"NULL"_s
 
static const QString stroperator = u"operator"_s
 
static const QString strreturn = u"return"_s
 
static const QString strstruct = u"struct"_s
 
static const QString strusing = u"using"_s
 
static const QString strprivate = u"private"_s
 
static const QString strprotected = u"protected"_s
 
static const QString strpublic = u"public"_s
 
static const QString strslots = u"slots"_s
 
static const QString strsignals = u"signals"_s
 
static const QString strQ_SLOTS = u"Q_SLOTS"_s
 
static const QString strQ_SIGNALS = u"Q_SIGNALS"_s
 
static const QString strQApplication = u"QApplication"_s
 
static const QString strQCoreApplication = u"QCoreApplication"_s
 
static const QString strUnicodeUTF8 = u"UnicodeUTF8"_s
 
static const QString strDefaultCodec = u"DefaultCodec"_s
 
static const QString strCodecForTr = u"CodecForTr"_s
 
static const QString strLatin1 = u"Latin1"_s
 

Function Documentation

◆ isHeader()

static bool isHeader ( const QString & name)
static

Definition at line 1265 of file cpp.cpp.

◆ isRawStringLiteralPrefix()

static bool isRawStringLiteralPrefix ( QStringView s)
static

Definition at line 343 of file cpp.cpp.

◆ isStringLiteralPrefix()

static bool isStringLiteralPrefix ( const QStringView s)
static

Definition at line 335 of file cpp.cpp.

◆ loadCPP()

void loadCPP ( Translator & translator,
const QStringList & filenames,
ConversionData & cd )

Definition at line 2265 of file cpp.cpp.

◆ operator<<() [1/2]

QDebug operator<< ( QDebug debug,
const HashString & s )

Definition at line 27 of file cpp.cpp.

◆ operator<<() [2/2]

QDebug operator<< ( QDebug debug,
const HashStringList & lst )

Definition at line 45 of file cpp.cpp.

◆ qHash() [1/4]

size_t qHash ( const CppParserState & s,
size_t seed )

Definition at line 1161 of file cpp.cpp.

◆ qHash() [2/4]

size_t qHash ( const HashString & str)

Definition at line 20 of file cpp.cpp.

◆ qHash() [3/4]

size_t qHash ( const HashStringList & list)

Definition at line 32 of file cpp.cpp.

References HashStringList::m_hash.

◆ qHash() [4/4]

size_t qHash ( const ResultsCacheKey & key,
size_t seed )

Definition at line 1171 of file cpp.cpp.

Variable Documentation

◆ CppMagicComment

static const QString CppMagicComment = u"TRANSLATOR"_s
static

Definition at line 18 of file cpp.cpp.

◆ nextFileId

static int nextFileId
static

Definition at line 50 of file cpp.cpp.

Referenced by CppParser::recordResults().

◆ strclass

static const QString strclass = u"class"_s
static

Definition at line 353 of file cpp.cpp.

◆ strCodecForTr

static const QString strCodecForTr = u"CodecForTr"_s
static

Definition at line 1387 of file cpp.cpp.

◆ strdecltype

static const QString strdecltype = u"decltype"_s
static

Definition at line 354 of file cpp.cpp.

◆ strDefaultCodec

static const QString strDefaultCodec = u"DefaultCodec"_s
static

Definition at line 1386 of file cpp.cpp.

◆ strenum

static const QString strenum = u"enum"_s
static

Definition at line 355 of file cpp.cpp.

◆ strfinal

static const QString strfinal = u"final"_s
static

Definition at line 356 of file cpp.cpp.

◆ strfriend

static const QString strfriend = u"friend"_s
static

Definition at line 357 of file cpp.cpp.

◆ strLatin1

static const QString strLatin1 = u"Latin1"_s
static

Definition at line 1388 of file cpp.cpp.

◆ strnamespace

static const QString strnamespace = u"namespace"_s
static

Definition at line 358 of file cpp.cpp.

◆ strNULL

static const QString strNULL = u"NULL"_s
static

Definition at line 361 of file cpp.cpp.

◆ strnullptr

static const QString strnullptr = u"nullptr"_s
static

Definition at line 359 of file cpp.cpp.

◆ stroperator

static const QString stroperator = u"operator"_s
static

Definition at line 362 of file cpp.cpp.

◆ strprivate

static const QString strprivate = u"private"_s
static

Definition at line 366 of file cpp.cpp.

◆ strprotected

static const QString strprotected = u"protected"_s
static

Definition at line 367 of file cpp.cpp.

◆ strpublic

static const QString strpublic = u"public"_s
static

Definition at line 368 of file cpp.cpp.

◆ strQ_NULLPTR

static const QString strQ_NULLPTR = u"Q_NULLPTR"_s
static

Definition at line 360 of file cpp.cpp.

◆ strQ_OBJECT

static const QString strQ_OBJECT = u"Q_OBJECT"_s
static

Definition at line 352 of file cpp.cpp.

◆ strQ_SIGNALS

static const QString strQ_SIGNALS = u"Q_SIGNALS"_s
static

Definition at line 372 of file cpp.cpp.

◆ strQ_SLOTS

static const QString strQ_SLOTS = u"Q_SLOTS"_s
static

Definition at line 371 of file cpp.cpp.

◆ strQApplication

static const QString strQApplication = u"QApplication"_s
static

Definition at line 1383 of file cpp.cpp.

◆ strQCoreApplication

static const QString strQCoreApplication = u"QCoreApplication"_s
static

Definition at line 1384 of file cpp.cpp.

◆ strreturn

static const QString strreturn = u"return"_s
static

Definition at line 363 of file cpp.cpp.

◆ strsignals

static const QString strsignals = u"signals"_s
static

Definition at line 370 of file cpp.cpp.

◆ strslots

static const QString strslots = u"slots"_s
static

Definition at line 369 of file cpp.cpp.

◆ strstruct

static const QString strstruct = u"struct"_s
static

Definition at line 364 of file cpp.cpp.

◆ strUnicodeUTF8

static const QString strUnicodeUTF8 = u"UnicodeUTF8"_s
static

Definition at line 1385 of file cpp.cpp.

◆ strusing

static const QString strusing = u"using"_s
static

Definition at line 365 of file cpp.cpp.