10#include <QtCore/qfile.h>
11#include <QtCore/qfileinfo.h>
12#include <QtCore/qdir.h>
13#include <QtCore/qjsondocument.h>
16#include <private/qmetaobject_moc_p.h>
17#include <private/qduplicatetracker_p.h>
46 if (!
test(IDENTIFIER))
54 if (!
test(IDENTIFIER))
57 }
else if (
test(IDENTIFIER)) {
59 if (lex !=
"final" && lex !=
"sealed" && lex !=
"Q_DECL_FINAL")
66 if (
test(IDENTIFIER)) {
73 if (
test(IDENTIFIER)) {
75 if (lex !=
"final" && lex !=
"sealed" && lex !=
"Q_DECL_FINAL")
85 else if (
test(PROTECTED))
97 }
while (
test(COMMA));
109 bool foundRBrace =
until(RBRACE);
118 bool hasSignedOrUnsigned =
false;
126 hasSignedOrUnsigned =
true;
132 if (
lookup(0) == VOLATILE)
133 type.isVolatile =
true;
135 case Q_MOC_COMPAT_TOKEN:
136 case Q_INVOKABLE_TOKEN:
137 case Q_SCRIPTABLE_TOKEN:
138 case Q_SIGNALS_TOKEN:
160 if (hasSignedOrUnsigned) {
183 isVoid |= (
lookup(0) == VOID);
192 if (
type.name.isEmpty()) {
200 type.isScoped =
true;
210 type.referenceType = Type::Reference;
211 else if (
lookup(0) == ANDAND)
212 type.referenceType = Type::RValueReference;
213 else if (
lookup(0) == STAR)
214 type.referenceType = Type::Pointer;
218 if (isVoid &&
type.referenceType == Type::NoReference) {
232 bool isTypdefEnum =
false;
237 if (
test(IDENTIFIER)) {
240 if (
lookup(-1) != TYPEDEF)
251 bool hadIncludeBegin =
false;
252 if (
test(MOC_INCLUDE_BEGIN)) {
255 hadIncludeBegin =
true;
258 next(MOC_INCLUDE_END);
278 if (!
test(IDENTIFIER))
291 if (
arg.type.name ==
"void")
293 if (
test(IDENTIFIER))
295 while (
test(LBRACK)) {
298 if (
test(CONST) ||
test(VOLATILE)) {
299 arg.rightType +=
' ';
303 arg.typeNameForCast =
QByteArray(
"std::add_pointer_t<"+
arg.normalizedType+
">");
305 arg.isDefault =
true;
323 error(
"number of function arguments exceeds std::numeric_limits<int>::max()");
338 case Q_MOC_COMPAT_TOKEN:
341 case Q_INVOKABLE_TOKEN:
350 case Q_SCRIPTABLE_TOKEN:
371 revisionString.
remove(0, 1);
372 revisionString.
chop(1);
374 switch (majorMinor.
size()) {
377 const int revision = revisionString.
toInt(&
ok);
379 error(
"Invalid revision");
384 const int major = majorMinor[0].toInt(&
ok);
386 error(
"Invalid major version");
387 const int minor = majorMinor[1].toInt(&
ok);
389 error(
"Invalid minor version");
393 error(
"Invalid revision");
401 if (
test(Q_REVISION_TOKEN)) {
417 bool templateFunction = (
lookup() == TEMPLATE);
420 if (templateFunction)
421 error(
"Template function as signal or slot");
425 bool scopedFunctionName =
false;
448 def->
type = tempType;
451 next(LPAREN,
"Not a signal or slot declaration");
453 scopedFunctionName = tempType.
isScoped;
462 while (
test(IDENTIFIER))
467 while (
test(IDENTIFIER))
493 if (scopedFunctionName) {
495 +
" contains extra qualification. Ignoring as signal or slot.";
501 if (typeNameParts.
contains(
"auto")) {
503 error(
"Function declared with auto as return type but missing trailing return type. "
504 "Return type deduction is not supported.");
520 return test(EXPLICIT) ||
test(INLINE) ||
533 bool tilde =
test(TILDE);
537 bool scopedFunctionName =
false;
557 else if (def->
type.
name ==
"Q_SIGNAL")
559 else if (def->
type.
name ==
"Q_SLOT")
566 def->
type = tempType;
572 scopedFunctionName = tempType.
isScoped;
590 if (scopedFunctionName
592 const QByteArray msg =
"parsemaybe: Function declaration " + def->
name
593 +
" contains extra qualification. Ignoring as signal or slot.";
605 while (
function.arguments.size() > 0 &&
function.arguments.constLast().isDefault) {
615 const auto rend = namespaceList.
crend();
616 for (;
it != rend; ++
it) {
625 error(
"number of signals defined in parent class(es) exceeds "
626 "std::numeric_limits<int>::max().");
629 error(
"number of bindable properties exceeds std::numeric_limits<int>::max().");
632 error(
"number of times Q_CLASSINFO macro is used exceeds "
633 "std::numeric_limits<int>::max().");
636 error(
"number of enumerations exceeds std::numeric_limits<int>::max().");
639 error(
"number of super classes exceeds std::numeric_limits<int>::max().");
642 error(
"number of constructor parameters exceeds std::numeric_limits<int>::max().");
645 error(
"number of signals exceeds std::numeric_limits<int>::max().");
648 error(
"number of declared slots exceeds std::numeric_limits<int>::max().");
651 error(
"number of methods exceeds std::numeric_limits<int>::max().");
654 error(
"number of public functions declared in this class exceeds "
655 "std::numeric_limits<int>::max().");
661 bool templateClass =
false;
667 if (
test(IDENTIFIER)) {
678 nested.append(nsName);
684 }
else if (
test(LPAREN)) {
687 }
else if (!
test(SEMIC)) {
707 namespaceList += parentNs;
713 if (
test(IDENTIFIER)) {
719 }
else if (!
test(SEMIC)) {
724 case Q_NAMESPACE_TOKEN:
727 case Q_NAMESPACE_EXPORT_TOKEN:
729 while (
test(IDENTIFIER))
735 case Q_ENUM_NS_TOKEN:
739 error(
"Q_ENUM can't be used in a Q_NAMESPACE, use Q_ENUM_NS instead");
742 case Q_FLAG_NS_TOKEN:
746 error(
"Q_FLAG can't be used in a Q_NAMESPACE, use Q_FLAG_NS instead");
748 case Q_DECLARE_FLAGS_TOKEN:
751 case Q_CLASSINFO_TOKEN:
754 case Q_MOC_INCLUDE_TOKEN:
775 namespaceList += def;
778 error(
"Namespace declaration lacks Q_NAMESPACE macro.");
785 templateClass =
false;
788 templateClass =
true;
790 case MOC_INCLUDE_BEGIN:
793 case MOC_INCLUDE_END:
796 case Q_DECLARE_INTERFACE_TOKEN:
799 case Q_DECLARE_METATYPE_TOKEN:
802 case Q_MOC_INCLUDE_TOKEN:
806 if (
test(NAMESPACE)) {
829 case Q_GADGET_EXPORT_TOKEN:
831 while (
test(IDENTIFIER))
862 switch ((
t =
next())) {
865 if (
test(Q_SIGNALS_TOKEN))
866 error(
"Signals cannot have access specifier");
870 if (
test(Q_SIGNALS_TOKEN))
871 error(
"Signals cannot have access specifier");
875 if (
test(Q_SIGNALS_TOKEN))
876 error(
"Signals cannot have access specifier");
884 error(
"Meta object features not supported for nested classes");
888 case Q_SIGNALS_TOKEN:
899 error(
"Missing access specifier for slots");
905 error(
"Template classes not supported by Q_OBJECT");
907 error(
"Class contains Q_OBJECT macro but does not inherit from QObject");
909 case Q_GADGET_EXPORT_TOKEN:
911 while (
test(IDENTIFIER))
918 error(
"Template classes not supported by Q_GADGET");
920 case Q_PROPERTY_TOKEN:
923 case QT_ANONYMOUS_PROPERTY_TOKEN:
926 case Q_PLUGIN_METADATA_TOKEN:
933 case Q_ENUM_NS_TOKEN:
934 error(
"Q_ENUM_NS can't be used in a Q_OBJECT/Q_GADGET, use Q_ENUM instead");
940 case Q_FLAG_NS_TOKEN:
941 error(
"Q_FLAG_NS can't be used in a Q_OBJECT/Q_GADGET, use Q_FLAG instead");
943 case Q_DECLARE_FLAGS_TOKEN:
946 case Q_CLASSINFO_TOKEN:
949 case Q_MOC_INCLUDE_TOKEN:
952 case Q_INTERFACES_TOKEN:
955 case Q_PRIVATE_SLOT_TOKEN:
958 case Q_PRIVATE_PROPERTY_TOKEN:
961 case QT_ANONYMOUS_PRIVATE_PROPERTY_TOKEN:
1018 error(
"Class declaration lacks Q_OBJECT macro.");
1037 for (
const auto &
n : std::as_const(namespaceList)) {
1038 if (!
n.hasQNamespace)
1045 return def.classname == val.classname && def.qualified == val.qualified;
1050 Q_ASSERT(
it->classInfoList.
size() <= std::numeric_limits<int>::max());
1053 Q_ASSERT(
it->enumList.
size() <= std::numeric_limits<int>::max());
1075 for (
const auto &
f : functions) {
1076 for (
const auto &
arg :
f.arguments) {
1088#define STREAM_SMART_POINTER(SMART_POINTER) << #SMART_POINTER
1090#undef STREAM_SMART_POINTER
1091#define STREAM_1ARG_TEMPLATE(TEMPLATENAME) << #TEMPLATENAME
1093#undef STREAM_1ARG_TEMPLATE
1103 required.reserve(candidates.size());
1105 bool needsQProperty =
false;
1107 for (
const auto &candidate : candidates) {
1110 for (
const auto &
c : classes) {
1111 for (
const auto &
p :
c.propertyList)
1112 needsQProperty |= !
p.bind.
isEmpty();
1117 required.push_back(candidate);
1124 required.push_back(
"QProperty");
1133 auto isSlash = [](
char ch) {
return ch ==
'/' ||
ch ==
'\\'; };
1134 auto rit = std::find_if(fn.
crbegin(), fn.
crend(), isSlash);
1135 if (rit != fn.
crend())
1138 fprintf(
out,
"/****************************************************************************\n"
1139 "** Meta object code from reading C++ file '%s'\n**\n" , fn.
constData());
1140 fprintf(
out,
"** Created by: The Qt Meta Object Compiler version %d (Qt %s)\n**\n" ,
mocOutputRevision, QT_VERSION_STR);
1141 fprintf(
out,
"** WARNING! All changes made in this file will be lost!\n"
1142 "*****************************************************************************/\n\n");
1151 if (!inc.isEmpty() && inc.at(0) !=
'<' && inc.at(0) !=
'"') {
1154 inc =
'\"' + inc +
'\"';
1156 fprintf(
out,
"#include %s\n", inc.constData());
1160 fprintf(
out,
"#include <QtCore/qobject.h>\n");
1162 fprintf(
out,
"#include <QtCore/qmetatype.h>\n");
1164 fprintf(
out,
"#include <QtCore/qplugin.h>\n");
1167 for (
const QByteArray &qtContainer : qtContainers)
1168 fprintf(
out,
"#include <QtCore/%s>\n", qtContainer.constData());
1170 fprintf(
out,
"\n#include <QtCore/qtmochelpers.h>\n");
1172 fprintf(
out,
"\n#include <memory>\n\n");
1174 fprintf(
out,
"#if !defined(Q_MOC_OUTPUT_REVISION)\n"
1175 "#error \"The header file '%s' doesn't include <QObject>.\"\n", fn.
constData());
1177 fprintf(
out,
"#error \"This file was generated using the moc from %s."
1178 " It\"\n#error \"cannot be used with the include files from"
1179 " this version of Qt.\"\n#error \"(The moc has changed too"
1180 " much.)\"\n", QT_VERSION_STR);
1181 fprintf(
out,
"#endif\n\n");
1183#if QT_VERSION <= QT_VERSION_CHECK(7, 0, 0)
1184 fprintf(
out,
"#ifndef Q_CONSTINIT\n"
1185 "#define Q_CONSTINIT\n"
1189 fprintf(
out,
"QT_WARNING_PUSH\n");
1190 fprintf(
out,
"QT_WARNING_DISABLE_DEPRECATED\n");
1191 fprintf(
out,
"QT_WARNING_DISABLE_GCC(\"-Wuseless-cast\")\n");
1201 error(
"internal limit exceeded: number of parsed strings is too big.");
1207 fprintf(
out,
"QT_WARNING_POP\n");
1217 classesJsonFormatted.
append(cdef.toJson());
1219 if (!classesJsonFormatted.
isEmpty())
1220 mocData[
"classes"_L1] = classesJsonFormatted;
1230 if (
test(Q_REVISION_TOKEN))
1239 case Q_SIGNALS_TOKEN:
1249 error(
"'using' directive not supported in 'slots' section");
1260 }
else if (defaultRevision.
isValid()) {
1272 if (
test(Q_REVISION_TOKEN))
1281 case Q_SIGNALS_TOKEN:
1291 error(
"'using' directive not supported in 'signals' section");
1299 warning(
"Signals cannot be declared virtual");
1301 error(
"Not a signal declaration");
1304 }
else if (defaultRevision.
isValid()) {
1322 propDef.
user =
"false";
1333 type =
"QMap<QString,QVariant>";
1334 else if (
type ==
"QValueList")
1335 type =
"QValueList<QVariant>";
1336 else if (
type ==
"LongLong")
1338 else if (
type ==
"ULongLong")
1339 type =
"qulonglong";
1353 auto checkIsFunction = [&](
const QByteArray &def,
const char *
name) {
1355 QByteArray msg =
"Providing a function for ";
1357 msg +=
" in a property declaration is not be supported in Qt 6.";
1362 while (
test(IDENTIFIER)) {
1365 if (l[0] ==
'C' && l ==
"CONSTANT") {
1368 }
else if (l[0] ==
'F' && l ==
"FINAL") {
1369 propDef.
final =
true;
1371 }
else if (l[0] ==
'N' && l ==
"NAME") {
1375 }
else if (l[0] ==
'R' && l ==
"REQUIRED") {
1378 }
else if (l[0] ==
'R' && l ==
"REVISION" &&
test(LPAREN)) {
1387 v =
v.mid(1,
v.size() - 2);
1388 }
else if (
test(INTEGER_LITERAL)) {
1390 if (l !=
"REVISION")
1392 }
else if (
test(DEFAULT)) {
1394 if (l !=
"READ" && l !=
"WRITE")
1401 else if (
v !=
"true" &&
v !=
"false")
1414 else if (l ==
"RESET")
1416 else if (l ==
"REVISION") {
1418 const int minor =
v.toInt(&
ok);
1426 if (l ==
"SCRIPTABLE") {
1428 checkIsFunction(propDef.
scriptable,
"SCRIPTABLE");
1429 }
else if (l ==
"STORED") {
1431 checkIsFunction(propDef.
stored,
"STORED");
1435 case 'W':
if (l !=
"WRITE")
error(lsym);
1438 case 'B':
if (l !=
"BINDABLE")
error(lsym);
1441 case 'D':
if (l !=
"DESIGNABLE")
error(lsym);
1443 checkIsFunction(propDef.
designable,
"DESIGNABLE");
1445 case 'N':
if (l !=
"NOTIFY")
error(lsym);
1448 case 'U':
if (l !=
"USER")
error(lsym);
1450 checkIsFunction(propDef.
user,
"USER");
1458 +
" is both WRITEable and CONSTANT. CONSTANT will be ignored.";
1464 +
" is both NOTIFYable and CONSTANT. CONSTANT will be ignored.";
1470 +
" is both BINDable and CONSTANT. CONSTANT will be ignored.";
1476 +
" is not BINDable but default-READable. READ will be ignored.";
1482 +
" is not BINDable but default-WRITEable. WRITE will be ignored.";
1502 while (
test(IDENTIFIER)) {
1505 next(STRING_LITERAL);
1507 }
else if (l ==
"URI") {
1508 next(STRING_LITERAL);
1510 }
else if (l ==
"FILE") {
1511 next(STRING_LITERAL);
1518 if (
p.isFrameworkPath)
1530 +
" does not exist. Declaration will be ignored";
1536 QByteArray msg =
"Plugin Metadata file " +
lexem() +
" could not be opened: "
1550 +
" does not contain a valid JSON object. Declaration will be ignored";
1568 if (!nesting && (
t == RPAREN ||
t == COMMA))
1575 accessor +=
lexem();
1597 while (
test(IDENTIFIER)) {
1598 identifier =
lexem();
1601 identifier +=
lexem();
1612 while (
test(IDENTIFIER)) {
1616 flagName +=
lexem();
1620 while (
test(IDENTIFIER)) {
1624 enumName +=
lexem();
1634 bool encounteredQmlMacro =
false;
1637 next(STRING_LITERAL);
1640 encounteredQmlMacro =
true;
1642 if (
test(STRING_LITERAL)) {
1644 }
else if (
test(Q_REVISION_TOKEN)) {
1650 next(STRING_LITERAL);
1668 while (
test(IDENTIFIER)) {
1672 iface.last().className +=
lexem();
1674 iface.last().className +=
lexem();
1676 while (
test(COLON)) {
1680 iface.last().className +=
lexem();
1682 iface.last().className +=
lexem();
1689 error(
"Undefined interface");
1691 iface[
i].interfaceId = iid;
1703 interface +=
lexem();
1705 interface +=
lexem();
1707 interface +=
lexem();
1711 if (
test(STRING_LITERAL)) {
1766 while (from <=
index) {
1768 if (
s.size() &&
n.size()) {
1769 char prev =
s.at(
s.size()-1);
1770 char next =
n.at(0);
1788 case LBRACE: ++braceCount;
break;
1789 case LBRACK: ++brackCount;
break;
1790 case LPAREN: ++parenCount;
break;
1791 case LANGLE: ++angleCount;
break;
1804 case LBRACE: ++braceCount;
break;
1805 case RBRACE: --braceCount;
break;
1806 case LBRACK: ++brackCount;
break;
1807 case RBRACK: --brackCount;
break;
1808 case LPAREN: ++parenCount;
break;
1809 case RPAREN: --parenCount;
break;
1811 if (parenCount == 0 && braceCount == 0)
1815 if (parenCount == 0 && braceCount == 0)
1819 if (parenCount == 0 && braceCount == 0) {
1830 && (
target != RANGLE || angleCount <= 0)) {
1831 if (
target != COMMA || angleCount <= 0)
1836 if (
target == COMMA &&
t == EQ && possible != -1) {
1841 if (braceCount < 0 || brackCount < 0 || parenCount < 0
1842 || (
target == RANGLE && angleCount < 0)) {
1847 if (braceCount <= 0 &&
t == SEMIC) {
1853 if (
target == COMMA && angleCount != 0 && possible != -1) {
1872 +
" contains the Q_OBJECT macro and inherits from "
1874 +
" but that is not a known QObject subclass. You may get compilation errors.";
1881 auto matchesSuperClass = [&super](
const auto &ifaces) {
1882 return !ifaces.isEmpty() && ifaces.first().className == super;
1895 +
" inherits from two QObject subclasses "
1899 +
". This is not supported!";
1904 if (!isRegisteredInterface(superClass)) {
1908 +
" implements the interface "
1910 +
" but does not list it in Q_INTERFACES. qobject_cast to "
1912 +
" will not work!";
1927 if (definedProperties.
hasSeen(
p.name)) {
1928 QByteArray msg =
"The property '" +
p.name +
"' is defined multiple times in class " + cdef->
classname +
".";
1932 if (
p.read.isEmpty() &&
p.member.isEmpty() &&
p.bind.isEmpty()) {
1933 QByteArray msg =
"Property declaration " +
p.name +
" has neither an associated QProperty<> member"
1934 ", nor a READ accessor function nor an associated MEMBER variable. The property will be invalid.";
1937 if (
p.write.isEmpty())
1946 if (
f.name !=
p.read)
1950 if (
f.arguments.size())
1954 if (
p.type ==
"QByteArray" && tmp ==
"const char *")
1956 if (tmp.
left(6) ==
"const ")
1958 if (
p.type != tmp && tmp.
endsWith(
'*')) {
1961 }
else if (
f.type.name.endsWith(
'&')) {
1969 if (!
p.notify.isEmpty()) {
1973 if (
f.name !=
p.notify) {
1980 p.notifyId = notifyId;
1981 if (notifyId == -1) {
1987 p.notifyId = int(-2 -
index);
2005 classInfos.
append(infoJson);
2008 if (classInfos.
size())
2009 cls[
"classInfos"_L1] = classInfos;
2015 jsonFuncs.
append(fdef.toJson());
2018 cls[
type] = jsonFuncs;
2022 appendFunctions(
"slots"_L1,
slotList);
2029 props.append(propDef.toJson());
2031 if (!
props.isEmpty())
2032 cls[
"properties"_L1] =
props;
2035 cls[
"object"_L1] =
true;
2037 cls[
"gadget"_L1] =
true;
2039 cls[
"namespace"_L1] =
true;
2045 const auto access = super.second;
2049 superClasses.
append(superCls);
2053 cls[
"superClasses"_L1] = superClasses;
2057 enums.
append(enumDef.toJson(*
this));
2059 cls[
"enums"_L1] = enums;
2064 for (
const Interface &iface: ifaceList) {
2068 jsonList.
append(ifaceJson);
2073 cls[
"interfaces"_L1] = ifaces;
2091 fdef[
"arguments"_L1] =
args;
2099 fdef[
"isCloned"_L1] =
true;
2107 case Private: (*obj)[
"access"_L1] =
"private"_L1;
break;
2108 case Public: (*obj)[
"access"_L1] =
"public"_L1;
break;
2109 case Protected: (*obj)[
"access"_L1] =
"protected"_L1;
break;
2117 if (!
name.isEmpty())
2133 jsonify(
"member",
member);
2134 jsonify(
"read",
read);
2135 jsonify(
"write",
write);
2136 jsonify(
"bindable",
bind);
2137 jsonify(
"reset",
reset);
2138 jsonify(
"notify",
notify);
2141 const auto jsonifyBoolOrString = [&prop](
const char *
str,
const QByteArray &boolOrString) {
2143 if (boolOrString ==
"true")
2145 else if (boolOrString ==
"false")
2152 jsonifyBoolOrString(
"designable",
designable);
2153 jsonifyBoolOrString(
"scriptable",
scriptable);
2154 jsonifyBoolOrString(
"stored",
stored);
2155 jsonifyBoolOrString(
"user",
user);
2158 prop[
"final"_L1] =
final;
2173 if (!
type.isEmpty())
2182 def[
"values"_L1] = valueArr;
void checkSuperClasses(ClassDef *def)
bool parseEnum(EnumDef *def)
void parseProperty(ClassDef *def, PropertyMode mode)
QByteArray lexemUntil(Token)
EncounteredQmlMacro parseClassInfo(BaseDef *def)
QList< QByteArray > includeFiles
bool requireCompleteTypes
QHash< QByteArray, QByteArray > knownQObjectClasses
void createPropertyDef(PropertyDef &def, int propertyIndex, PropertyMode mode)
bool parseClassHead(ClassDef *def)
void parsePrivateProperty(ClassDef *def, PropertyMode mode)
void parseFlag(BaseDef *def)
void parseSignals(ClassDef *def)
void parseDeclareMetatype()
void parsePropertyAttributes(PropertyDef &propDef)
void parseInterfaces(ClassDef *def)
bool testFunctionRevision(FunctionDef *def)
bool testFunctionAttribute(FunctionDef *def)
void prependNamespaces(BaseDef &def, const QList< NamespaceDef > &namespaceList) const
QHash< QByteArray, QByteArray > knownGadgets
QList< QByteArray > metaTypes
bool parseFunction(FunctionDef *def, bool inMacro=false)
QByteArray parsePropertyAccessor()
QMap< QString, QJsonArray > metaArgs
bool testForFunctionModifiers(FunctionDef *def)
void parseSlots(ClassDef *def, FunctionDef::Access access)
void parseDeclareInterface()
void checkListSizes(const ClassDef &def)
QTypeRevision parseRevision()
QList< QString > parsedPluginMetadataFiles
bool parseMaybeFunction(const ClassDef *cdef, FunctionDef *def)
void checkProperties(ClassDef *cdef)
void parseFunctionArguments(FunctionDef *def)
void parseSlotInPrivate(ClassDef *def, FunctionDef::Access access)
bool inClass(const ClassDef *def) const
void parsePluginData(ClassDef *def)
void generate(FILE *out, FILE *jsonOutput)
QMap< QByteArray, QByteArray > interface2IdMap
bool inNamespace(const NamespaceDef *def) const
QList< ClassDef > classList
void parseEnumOrFlag(BaseDef *def, bool isFlag)
QList< IncludePath > includes
const Symbol & symbolAt(qsizetype idx)
void warning(const char *=nullptr)
std::stack< QByteArray, QByteArrayList > currentFilenames
QByteArray unquotedLexem()
constexpr QByteArrayView last(qsizetype n) const
constexpr const_reverse_iterator crbegin() const noexcept
constexpr const_reverse_iterator crend() const noexcept
constexpr const_pointer constData() const noexcept
bool endsWith(char c) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
const_iterator constEnd() const noexcept
Returns a const \l{STL-style iterators}{STL-style iterator} pointing just after the last byte in the ...
const_iterator constBegin() const noexcept
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first byte in the byte-ar...
QByteArray & prepend(char c)
This is an overloaded member function, provided for convenience. It differs from the above function o...
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
int toInt(bool *ok=nullptr, int base=10) const
Returns the byte array converted to an int using base base, which is ten by default.
QList< QByteArray > split(char sep) const
Splits the byte array into subarrays wherever sep occurs, and returns the list of those arrays.
void chop(qsizetype n)
Removes n bytes from the end of the byte array.
bool startsWith(QByteArrayView bv) const
bool contains(char c) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool isEmpty() const noexcept
Returns true if the byte array has size 0; otherwise returns false.
static QByteArray number(int, int base=10)
Returns a byte-array representing the whole number n as text.
QByteArray left(qsizetype len) const
Returns a byte array that contains the first len bytes of this byte array.
QByteArray & remove(qsizetype index, qsizetype len)
Removes len bytes from the array, starting at index position pos, and returns a reference to the arra...
bool isNull() const noexcept
Returns true if this byte array is null; otherwise returns false.
QByteArray mid(qsizetype index, qsizetype len=-1) const
Returns a byte array containing len bytes from this byte array, starting at position pos.
\inmodule QtCore \reentrant
void setFile(const QString &file)
Sets the file that the QFileInfo provides information about to file.
bool isDir() const
Returns true if this object points to a directory or to a symbolic link to a directory.
QString canonicalFilePath() const
Returns the canonical path including the file name, i.e.
QDir dir() const
Returns the path of the object's parent directory as a QDir object.
bool exists() const
Returns true if the file exists; otherwise returns false.
bool open(OpenMode flags) override
Opens the file using OpenMode mode, returning true if successful; otherwise false.
bool contains(const Key &key) const noexcept
Returns true if the hash contains an item with the key; otherwise returns false.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
QByteArray readAll()
Reads all remaining data from the device, and returns it as a byte array.
QString errorString() const
Returns a human-readable description of the last device error that occurred.
\inmodule QtCore\reentrant
bool isEmpty() const
Returns true if the object is empty.
QJsonValue first() const
Returns the first value stored in the array.
qsizetype size() const
Returns the number of values stored in the array.
void append(const QJsonValue &value)
Inserts value at the end of the array.
\inmodule QtCore\reentrant
QByteArray toJson(JsonFormat format=Indented) const
bool isObject() const
Returns true if the document contains an object.
static QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error=nullptr)
Parses json as a UTF-8 encoded JSON document, and creates a QJsonDocument from it.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
qsizetype size() const noexcept
bool isEmpty() const noexcept
const T & constLast() const noexcept
const_reference at(qsizetype i) const noexcept
T value(qsizetype i) const
const_reverse_iterator crbegin() const noexcept
qsizetype removeIf(Predicate pred)
const T & constFirst() const noexcept
void removeLast() noexcept
const_iterator cend() const noexcept
void append(parameter_type t)
const_iterator cbegin() const noexcept
const_reverse_iterator crend() const noexcept
iterator insert(const Key &key, const T &value)
T value(const Key &key, const T &defaultValue=T()) const
bool contains(const Key &key) const
iterator insert(const T &value)
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromLocal8Bit(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QByteArray toUtf8() const &
static constexpr bool isValidSegment(Integer segment)
Returns true if the given number can be used as either major or minor version in a QTypeRevision.
static constexpr QTypeRevision fromVersion(Major majorVersion, Minor minorVersion)
Produces a QTypeRevision from the given majorVersion and minorVersion, both of which need to be a val...
static constexpr QTypeRevision fromMinorVersion(Minor minorVersion)
Produces a QTypeRevision from the given minorVersion with an invalid major version.
constexpr Integer toEncodedVersion() const
Transforms the revision into an integer value, encoding the minor version into the least significant ...
constexpr bool isValid() const
Returns true if the major version or the minor version is known, otherwise false.
static VulkanServerBufferGlFunctions * funcs
QSet< QString >::iterator it
static bool any_arg_contains(const QList< FunctionDef > &functions, const QByteArray &pattern)
#define STREAM_1ARG_TEMPLATE(TEMPLATENAME)
static QByteArrayList requiredQtContainers(const QList< ClassDef > &classes)
static QByteArray normalizeType(const QByteArray &ba)
static QByteArrayList make_candidates()
#define STREAM_SMART_POINTER(SMART_POINTER)
static bool any_type_contains(const QList< PropertyDef > &properties, const QByteArray &pattern)
void handleDefaultArguments(QList< FunctionDef > *functionList, FunctionDef &function)
Combined button and popup list for selecting options.
static const QCssKnownValue properties[NumProperties - 1]
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction function
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char * interface
DBusConnection const char DBusError * error
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLint GLfloat GLfloat GLfloat v2
GLsizei const GLfloat * v
[13]
GLenum GLuint GLsizei const GLenum * props
constexpr decltype(auto) qMakePair(T1 &&value1, T2 &&value2) noexcept(noexcept(std::make_pair(std::forward< T1 >(value1), std::forward< T2 >(value2))))
QRandomGenerator generator(sseq)
QFileInfo info(fileName)
[8]
QFileInfo fi("c:/temp/foo")
[newstuff]
QTextStream out(stdout)
[7]
QByteArray normalizedType
QJsonObject toJson() const
QMap< QByteArray, QByteArray > flagAliases
QMap< QByteArray, bool > enumDeclarations
QList< ClassInfoDef > classInfoList
QList< EnumDef > enumList
QMap< QString, QJsonArray > metaArgs
QList< QList< Interface > > interfaceList
QList< FunctionDef > publicList
QList< FunctionDef > methodList
QList< PropertyDef > propertyList
QList< FunctionDef > constructorList
bool requireCompleteMethodTypes
QList< QPair< QByteArray, FunctionDef::Access > > superclassList
QList< FunctionDef > slotList
QList< FunctionDef > signalList
struct ClassDef::PluginData pluginData
QJsonObject toJson() const
QList< QByteArray > nonClassSignalList
QByteArray qualifiedType(const ClassDef *cdef) const
QJsonObject toJson(const ClassDef &cdef) const
QList< QByteArray > values
QByteArray normalizedType
QJsonObject toJson() const
static void accessToJson(QJsonObject *obj, Access acs)
QByteArray inPrivateClass
QList< ArgumentDef > arguments
QByteArray inPrivateClass
QJsonObject toJson() const
Q_GUI_EXPORT QString lexem() const
qsizetype indexOf(const AT &t, qsizetype from=0) const noexcept
bool contains(const AT &t) const noexcept
QByteArray unquotedLexem() const
ReferenceType referenceType