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
qdbusmetaobject.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// Copyright (C) 2016 Intel Corporation.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#include "qdbusmetaobject_p.h"
6
7#include <QtCore/qbytearray.h>
8#include <QtCore/qhash.h>
9#include <QtCore/qstring.h>
10#include <QtCore/qvarlengtharray.h>
11
12#include "qdbusutil_p.h"
13#include "qdbuserror.h"
14#include "qdbusmetatype.h"
15#include "qdbusargument.h"
18
19#include <private/qmetaobject_p.h>
20#include <private/qmetaobjectbuilder_p.h>
21
22#ifndef QT_NO_DBUS
23
25
26using namespace Qt::StringLiterals;
27
29{
30public:
31 QDBusMetaObjectGenerator(const QString &interface,
32 const QDBusIntrospection::Interface *parsedData);
35
36private:
37 struct Method {
38 QList<QByteArray> parameterNames;
39 QByteArray tag;
41 QVarLengthArray<int, 4> inputTypes;
42 QVarLengthArray<int, 4> outputTypes;
43 QByteArray rawReturnType;
45 };
46
47 struct Property {
48 QByteArray typeName;
49 QByteArray signature;
50 int type;
52 };
53 struct Type {
54 int id;
56 };
57
58 using MethodMap = QMap<QByteArray, Method>;
59 MethodMap signals_;
60 MethodMap methods;
61 QMap<QByteArray, Property> properties;
62
65
66 Type findType(const QByteArray &signature,
67 const QDBusIntrospection::Annotations &annotations,
68 const char *direction = "Out", int id = -1);
69
70 void parseMethods();
71 void parseSignals();
72 void parseProperties();
73
74 static qsizetype aggregateParameterCount(const MethodMap &map);
75};
76
77static const qsizetype intsPerProperty = 2;
78static const qsizetype intsPerMethod = 2;
79
85
87 const QDBusIntrospection::Interface *parsedData)
88 : data(parsedData), interface(interfaceName)
89{
90 if (data) {
91 parseProperties();
92 parseSignals(); // call parseSignals first so that slots override signals
93 parseMethods();
94 }
95}
96
98{
99 struct QDBusRawTypeHandler : QtPrivate::QMetaTypeInterface
100 {
101 const QByteArray name;
102 QDBusRawTypeHandler(const QByteArray &name)
104 0, sizeof(void *), sizeof(void *), QMetaType::RelocatableType, 0, nullptr,
105 name.constData(),
106 nullptr, nullptr, nullptr, nullptr,
107 nullptr, nullptr, nullptr,
108 nullptr, nullptr, nullptr
109 },
110 name(name)
111 {}
112 };
113
114 Q_CONSTINIT static QBasicMutex mutex;
115 Q_CONSTINIT static struct Hash : QHash<QByteArray, QMetaType>
116 {
117 ~Hash()
118 {
119 for (QMetaType entry : *this)
121 }
122 } hash;
124 QMetaType &metatype = hash[typeName];
125 if (!metatype.isValid())
126 metatype = QMetaType(new QDBusRawTypeHandler(typeName));
127 return metatype.id();
128}
129
130Q_DBUS_EXPORT bool qt_dbus_metaobject_skip_annotations = false;
131
132QDBusMetaObjectGenerator::Type
133QDBusMetaObjectGenerator::findType(const QByteArray &signature,
134 const QDBusIntrospection::Annotations &annotations,
135 const char *direction, int id)
136{
137 Type result;
139
140 int type = QDBusMetaType::signatureToMetaType(signature).id();
142 // it's not a type normally handled by our meta type system
143 // it must contain an annotation
144 QString annotationName = QString::fromLatin1("org.qtproject.QtDBus.QtTypeName");
145 if (id >= 0)
146 annotationName += QString::fromLatin1(".%1%2")
148 .arg(id);
149
150 // extract from annotations:
151 auto annotation = annotations.value(annotationName);
152 QByteArray typeName = annotation.value.toLatin1();
153
154 // verify that it's a valid one
155 if (typeName.isEmpty()) {
156 // try the old annotation from Qt 4
157 annotationName = QString::fromLatin1("com.trolltech.QtDBus.QtTypeName");
158 if (id >= 0)
159 annotationName += QString::fromLatin1(".%1%2")
161 .arg(id);
162 annotation = annotations.value(annotationName);
163 typeName = annotation.value.toLatin1();
164 }
165
166 if (!typeName.isEmpty()) {
167 // type name found
169 }
170
172 // type is still unknown or doesn't match back to the signature that it
173 // was expected to, so synthesize a fake type
174 typeName = "QDBusRawType<0x" + signature.toHex() + ">*";
176 }
177
178 result.name = typeName;
179 } else if (type == QMetaType::UnknownType) {
180 // this case is used only by the qdbus command-line tool
181 // invalid, let's create an impossible type that contains the signature
182
183 if (signature == "av") {
184 result.name = "QVariantList";
185 type = QMetaType::QVariantList;
186 } else if (signature == "a{sv}") {
187 result.name = "QVariantMap";
188 type = QMetaType::QVariantMap;
189 } else if (signature == "a{ss}") {
190 result.name = "QMap<QString,QString>";
191 type = qMetaTypeId<QMap<QString, QString> >();
192 } else if (signature == "aay") {
193 result.name = "QByteArrayList";
194 type = qMetaTypeId<QByteArrayList>();
195 } else {
196 result.name = "{D-Bus type \"" + signature + "\"}";
198 }
199 } else {
200 result.name = QMetaType(type).name();
201 }
202
203 result.id = type;
204 return result; // success
205}
206
207void QDBusMetaObjectGenerator::parseMethods()
208{
209 //
210 // TODO:
211 // Add cloned methods when the remote object has return types
212 //
213
214 for (const QDBusIntrospection::Method &m : std::as_const(data->methods)) {
215 Method mm;
216
217 mm.name = m.name.toLatin1();
218 QByteArray prototype = mm.name;
219 prototype += '(';
220
221 bool ok = true;
222
223 // build the input argument list
224 for (qsizetype i = 0; i < m.inputArgs.size(); ++i) {
225 const QDBusIntrospection::Argument &arg = m.inputArgs.at(i);
226
227 Type type = findType(arg.type.toLatin1(), m.annotations, "In", i);
228 if (type.id == QMetaType::UnknownType) {
229 ok = false;
230 break;
231 }
232
233 mm.inputTypes.append(type.id);
234
235 mm.parameterNames.append(arg.name.toLatin1());
236
237 prototype.append(type.name);
238 prototype.append(',');
239 }
240 if (!ok) continue;
241
242 // build the output argument list:
243 for (qsizetype i = 0; i < m.outputArgs.size(); ++i) {
244 const QDBusIntrospection::Argument &arg = m.outputArgs.at(i);
245
246 Type type = findType(arg.type.toLatin1(), m.annotations, "Out", i);
247 if (type.id == QMetaType::UnknownType) {
248 ok = false;
249 break;
250 }
251
252 mm.outputTypes.append(type.id);
253
254 if (i == 0 && type.id == -1) {
255 mm.rawReturnType = type.name;
256 }
257 if (i != 0) {
258 // non-const ref parameter
259 mm.parameterNames.append(arg.name.toLatin1());
260
261 prototype.append(type.name);
262 prototype.append("&,");
263 }
264 }
265 if (!ok) continue;
266
267 // convert the last commas:
268 if (!mm.parameterNames.isEmpty())
269 prototype[prototype.size() - 1] = ')';
270 else
271 prototype.append(')');
272
273 // check the async tag
274 if (m.annotations.value(ANNOTATION_NO_WAIT ""_L1).value == "true"_L1)
275 mm.tag = "Q_NOREPLY";
276
277 // meta method flags
279
280 // add
281 methods.insert(QMetaObject::normalizedSignature(prototype), mm);
282 }
283}
284
285void QDBusMetaObjectGenerator::parseSignals()
286{
287 for (const QDBusIntrospection::Signal &s : std::as_const(data->signals_)) {
288 Method mm;
289
290 mm.name = s.name.toLatin1();
291 QByteArray prototype = mm.name;
292 prototype += '(';
293
294 bool ok = true;
295
296 // build the output argument list
297 for (qsizetype i = 0; i < s.outputArgs.size(); ++i) {
298 const QDBusIntrospection::Argument &arg = s.outputArgs.at(i);
299
300 Type type = findType(arg.type.toLatin1(), s.annotations, "Out", i);
301 if (type.id == QMetaType::UnknownType) {
302 ok = false;
303 break;
304 }
305
306 mm.inputTypes.append(type.id);
307
308 mm.parameterNames.append(arg.name.toLatin1());
309
310 prototype.append(type.name);
311 prototype.append(',');
312 }
313 if (!ok) continue;
314
315 // convert the last commas:
316 if (!mm.parameterNames.isEmpty())
317 prototype[prototype.size() - 1] = ')';
318 else
319 prototype.append(')');
320
321 // meta method flags
323
324 // add
325 signals_.insert(QMetaObject::normalizedSignature(prototype), mm);
326 }
327}
328
329void QDBusMetaObjectGenerator::parseProperties()
330{
331 for (const QDBusIntrospection::Property &p : std::as_const(data->properties)) {
332 Property mp;
333 Type type = findType(p.type.toLatin1(), p.annotations);
335 continue;
336
337 QByteArray name = p.name.toLatin1();
338 mp.signature = p.type.toLatin1();
339 mp.type = type.id;
340 mp.typeName = type.name;
341
342 // build the flags:
343 mp.flags = StdCppSet | Scriptable | Stored | Designable;
345 mp.flags |= Readable;
347 mp.flags |= Writable;
348
349 // add the property:
350 properties.insert(name, mp);
351 }
352}
353
354// Returns the sum of all parameters (including return type) for the given
355// \a map of methods. This is needed for calculating the size of the methods'
356// parameter type/name meta-data.
357qsizetype QDBusMetaObjectGenerator::aggregateParameterCount(const MethodMap &map)
358{
359 qsizetype sum = 0;
360 for (const Method &m : map)
361 sum += m.inputTypes.size() + qMax(qsizetype(1), m.outputTypes.size());
362 return sum;
363}
364
366{
367 // this code here is mostly copied from qaxbase.cpp
368 // with a few modifications to make it cleaner
369
370 QString className = interface;
371 className.replace(u'.', "::"_L1);
372 if (className.isEmpty())
373 className = "QDBusInterface"_L1;
374
375 QVarLengthArray<uint> idata;
376 idata.resize(sizeof(QDBusMetaObjectPrivate) / sizeof(uint));
377
378 qsizetype methodParametersDataSize =
379 ((aggregateParameterCount(signals_)
380 + aggregateParameterCount(methods)) * 2) // types and parameter names
381 - signals_.size() // return "parameters" don't have names
382 - methods.size(); // ditto
383
384 QDBusMetaObjectPrivate *header = reinterpret_cast<QDBusMetaObjectPrivate *>(idata.data());
385 static_assert(QMetaObjectPrivate::OutputRevision == 12, "QtDBus meta-object generator should generate the same version as moc");
387 header->className = 0;
388 header->classInfoCount = 0;
389 header->classInfoData = 0;
390 header->methodCount = int(signals_.size() + methods.size());
391 header->methodData = int(idata.size());
392 header->propertyCount = int(properties.size());
393 header->propertyData = int(header->methodData + header->methodCount *
394 QMetaObjectPrivate::IntsPerMethod + methodParametersDataSize);
395 header->enumeratorCount = 0;
396 header->enumeratorData = 0;
397 header->constructorCount = 0;
398 header->constructorData = 0;
400 header->signalCount = signals_.size();
401 // These are specific to QDBusMetaObject:
402 header->propertyDBusData = int(header->propertyData + header->propertyCount
404 header->methodDBusData = int(header->propertyDBusData + header->propertyCount * intsPerProperty);
405
406 qsizetype data_size = idata.size() +
407 (header->methodCount * (QMetaObjectPrivate::IntsPerMethod+intsPerMethod)) + methodParametersDataSize +
409
410 // Signals must be added before other methods, to match moc.
411 std::array<std::reference_wrapper<const MethodMap>, 2> methodMaps = { signals_, methods };
412
413 for (const auto &methodMap : methodMaps) {
414 for (const Method &mm : methodMap.get())
415 data_size += 2 + mm.inputTypes.size() + mm.outputTypes.size();
416 }
417 idata.resize(data_size + 1);
418
420
421 qsizetype offset = header->methodData;
422 qsizetype parametersOffset = offset + header->methodCount * QMetaObjectPrivate::IntsPerMethod;
423 qsizetype signatureOffset = header->methodDBusData;
424 qsizetype typeidOffset = header->methodDBusData + header->methodCount * intsPerMethod;
425 idata[typeidOffset++] = 0; // eod
426
427 qsizetype totalMetaTypeCount = properties.size();
428 ++totalMetaTypeCount; // + 1 for metatype of dynamic metaobject
429 for (const auto &methodMap : methodMaps) {
430 for (const Method &mm : methodMap.get()) {
431 qsizetype argc = mm.inputTypes.size() + qMax(qsizetype(0), mm.outputTypes.size() - 1);
432 totalMetaTypeCount += argc + 1;
433 }
434 }
435 QMetaType *metaTypes = new QMetaType[totalMetaTypeCount];
436 int propertyId = 0;
437
438 // add each method:
439 qsizetype currentMethodMetaTypeOffset = properties.size() + 1;
440
441 for (const auto &methodMap : methodMaps) {
442 for (const Method &mm : methodMap.get()) {
443 qsizetype argc = mm.inputTypes.size() + qMax(qsizetype(0), mm.outputTypes.size() - 1);
444
445 idata[offset++] = strings.enter(mm.name);
446 idata[offset++] = argc;
447 idata[offset++] = parametersOffset;
448 idata[offset++] = strings.enter(mm.tag);
449 idata[offset++] = mm.flags;
450 idata[offset++] = currentMethodMetaTypeOffset;
451
452 // Parameter types
453 for (qsizetype i = -1; i < argc; ++i) {
454 int type;
456 if (i < 0) { // Return type
457 if (!mm.outputTypes.isEmpty()) {
458 type = mm.outputTypes.first();
459 if (type == -1) {
460 type = IsUnresolvedType | strings.enter(mm.rawReturnType);
461 }
462 } else {
463 type = QMetaType::Void;
464 }
465 } else if (i < mm.inputTypes.size()) {
466 type = mm.inputTypes.at(i);
467 } else {
468 Q_ASSERT(mm.outputTypes.size() > 1);
469 type = mm.outputTypes.at(i - mm.inputTypes.size() + 1);
470 // Output parameters are references; type id not available
472 typeName.append('&');
474 }
475 int typeInfo;
476 if (!typeName.isEmpty())
477 typeInfo = IsUnresolvedType | strings.enter(typeName);
478 else
479 typeInfo = type;
480 metaTypes[currentMethodMetaTypeOffset++] = QMetaType(type);
481 idata[parametersOffset++] = typeInfo;
482 }
483 // Parameter names
484 for (qsizetype i = 0; i < argc; ++i)
485 idata[parametersOffset++] = strings.enter(mm.parameterNames.at(i));
486
487 idata[signatureOffset++] = typeidOffset;
488 idata[typeidOffset++] = mm.inputTypes.size();
489 memcpy(idata.data() + typeidOffset, mm.inputTypes.data(), mm.inputTypes.size() * sizeof(uint));
490 typeidOffset += mm.inputTypes.size();
491
492 idata[signatureOffset++] = typeidOffset;
493 idata[typeidOffset++] = mm.outputTypes.size();
494 memcpy(idata.data() + typeidOffset, mm.outputTypes.data(), mm.outputTypes.size() * sizeof(uint));
495 typeidOffset += mm.outputTypes.size();
496 }
497 }
498
499 Q_ASSERT(offset == header->methodData + header->methodCount * QMetaObjectPrivate::IntsPerMethod);
500 Q_ASSERT(parametersOffset == header->propertyData);
501 Q_ASSERT(signatureOffset == header->methodDBusData + header->methodCount * intsPerMethod);
502 Q_ASSERT(typeidOffset == idata.size());
503 offset += methodParametersDataSize;
504 Q_ASSERT(offset == header->propertyData);
505
506 // add each property
507 signatureOffset = header->propertyDBusData;
508 for (const auto &[name, mp] : std::as_const(properties).asKeyValueRange()) {
509 // form is name, typeinfo, flags
510 idata[offset++] = strings.enter(name);
512 idata[offset++] = mp.type;
513 idata[offset++] = mp.flags;
514 idata[offset++] = -1; // notify index
515 idata[offset++] = 0; // revision
516
517 idata[signatureOffset++] = strings.enter(mp.signature);
518 idata[signatureOffset++] = mp.type;
519
520 metaTypes[propertyId++] = QMetaType(mp.type);
521 }
522 metaTypes[propertyId] = QMetaType(); // we can't know our own metatype
523
524 Q_ASSERT(offset == header->propertyDBusData);
525 Q_ASSERT(signatureOffset == header->methodDBusData);
526
527 char *string_data = new char[strings.blobSize()];
528 strings.writeBlob(string_data);
529
530 uint *uint_data = new uint[idata.size()];
531 memcpy(uint_data, idata.data(), idata.size() * sizeof(uint));
532
533 // put the metaobject together
534 obj->d.data = uint_data;
535 obj->d.relatedMetaObjects = nullptr;
536 obj->d.static_metacall = nullptr;
537 obj->d.extradata = nullptr;
538 obj->d.stringdata = reinterpret_cast<const uint *>(string_data);
539 obj->d.superdata = &QDBusAbstractInterface::staticMetaObject;
540 obj->d.metaTypes = reinterpret_cast<QtPrivate::QMetaTypeInterface *const *>(metaTypes);
541}
542
543#if 0
545{
546 // no XML definition
547 QString tmp(interface);
548 tmp.replace(u'.', "::"_L1);
549 QByteArray name(tmp.toLatin1());
550
552 memset(header, 0, sizeof *header);
553 header->revision = 1;
554 // leave the rest with 0
555
556 char *stringdata = new char[name.length() + 1];
557 stringdata[name.length()] = '\0';
558
559 d.data = reinterpret_cast<uint*>(header);
560 d.relatedMetaObjects = 0;
561 d.static_metacall = 0;
562 d.extradata = 0;
563 d.stringdata = stringdata;
564 d.superdata = &QDBusAbstractInterface::staticMetaObject;
565 cached = false;
566}
567#endif
568
570// class QDBusMetaObject
571
573 QHash<QString, QDBusMetaObject *> &cache,
575{
576 error = QDBusError();
578
579 QDBusMetaObject *we = nullptr;
582 for ( ; it != end; ++it) {
583 // check if it's in the cache
584 bool us = it.key() == interface;
585
586 QDBusMetaObject *obj = cache.value(it.key(), 0);
587 if (!obj && (us || !interface.startsWith("local."_L1 ))) {
588 // not in cache; create
589 obj = new QDBusMetaObject;
590 QDBusMetaObjectGenerator generator(it.key(), it.value().constData());
591 generator.write(obj);
592
593 if ((obj->cached = !it.key().startsWith("local."_L1)))
594 // cache it
595 cache.insert(it.key(), obj);
596 else if (!us)
597 delete obj;
598
599 }
600
601 if (us)
602 // it's us
603 we = obj;
604 }
605
606 if (we)
607 return we;
608 // still nothing?
609
610 if (parsed.isEmpty()) {
611 // object didn't return introspection
612 we = new QDBusMetaObject;
614 generator.write(we);
615 we->cached = false;
616 return we;
617 } else if (interface.isEmpty()) {
618 // merge all interfaces
619 it = parsed.constBegin();
620 QDBusIntrospection::Interface merged = *it.value().constData();
621
622 for (++it; it != end; ++it) {
623 merged.annotations.insert(it.value()->annotations);
624 merged.methods.unite(it.value()->methods);
625 merged.signals_.unite(it.value()->signals_);
626 merged.properties.insert(it.value()->properties);
627 }
628
629 merged.name = "local.Merged"_L1;
630 merged.introspection.clear();
631
632 we = new QDBusMetaObject;
633 QDBusMetaObjectGenerator generator(merged.name, &merged);
634 generator.write(we);
635 we->cached = false;
636 return we;
637 }
638
639 // mark as an error
641 "Interface '%1' was not found"_L1.arg(interface));
642 return nullptr;
643}
644
645QDBusMetaObject::QDBusMetaObject()
646{
647}
648
649static inline const QDBusMetaObjectPrivate *priv(const uint* data)
650{
651 return reinterpret_cast<const QDBusMetaObjectPrivate *>(data);
652}
653
655{
656 //id -= methodOffset();
657 if (id >= 0 && id < priv(d.data)->methodCount) {
658 int handle = priv(d.data)->methodDBusData + id*intsPerMethod;
659 return reinterpret_cast<const int*>(d.data + d.data[handle]);
660 }
661 return nullptr;
662}
663
665{
666 //id -= methodOffset();
667 if (id >= 0 && id < priv(d.data)->methodCount) {
668 int handle = priv(d.data)->methodDBusData + id*intsPerMethod;
669 return reinterpret_cast<const int*>(d.data + d.data[handle + 1]);
670 }
671 return nullptr;
672}
673
675{
676 //id -= propertyOffset();
677 if (id >= 0 && id < priv(d.data)->propertyCount) {
678 int handle = priv(d.data)->propertyDBusData + id*intsPerProperty;
679 return d.data[handle + 1];
680 }
681 return 0;
682}
683
685
686#endif // QT_NO_DBUS
\inmodule QtCore
Definition qbytearray.h:57
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
Definition qbytearray.h:494
QByteArray & append(char c)
This is an overloaded member function, provided for convenience. It differs from the above function o...
\inmodule QtDBus
Definition qdbuserror.h:21
@ UnknownInterface
Definition qdbuserror.h:44
static Interfaces parseInterfaces(const QString &xml, DiagnosticsReporter *reporter=nullptr)
Parses the XML document fragment (given by xml) containing several interfaces.
void writeWithoutXml(QDBusMetaObject *obj)
QDBusMetaObjectGenerator(const QString &interface, const QDBusIntrospection::Interface *parsedData)
void write(QDBusMetaObject *obj)
static QMetaType signatureToMetaType(const char *signature)
static const char * typeToSignature(QMetaType type)
\inmodule QtCore
Definition qhash.h:820
iterator insert(const Key &key, const T &value)
Definition qmap.h:688
T value(const Key &key, const T &defaultValue=T()) const
Definition qmap.h:357
bool isEmpty() const
Definition qmap.h:269
const_iterator constBegin() const
Definition qmap.h:600
size_type size() const
Definition qmap.h:267
const_iterator constEnd() const
Definition qmap.h:604
\inmodule QtCore
Definition qmetatype.h:341
static QMetaType fromName(QByteArrayView name)
Returns a QMetaType matching typeName.
@ RelocatableType
Definition qmetatype.h:402
constexpr const char * name() const
Definition qmetatype.h:2680
static void unregisterMetaType(QMetaType type)
QMultiMap & unite(const QMultiMap &other)
Definition qmap.h:1538
\inmodule QtCore
Definition qmutex.h:313
\inmodule QtCore
Definition qmutex.h:281
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qstring.cpp:5871
void clear()
Clears the contents of the string and makes it null.
Definition qstring.h:1252
QHash< int, QWidget * > hash
[35multi]
QMap< QString, QString > map
[6]
QCache< int, Employee > cache
[0]
QSet< QString >::iterator it
direction
Combined button and popup list for selecting options.
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
#define ANNOTATION_NO_WAIT
static const qsizetype intsPerMethod
static const QDBusMetaObjectPrivate * priv(const uint *data)
static const qsizetype intsPerProperty
Q_DBUS_EXPORT bool qt_dbus_metaobject_skip_annotations
static int registerComplexDBusType(const QByteArray &typeName)
static QString header(const QString &name)
static const QMetaObjectPrivate * priv(const uint *data)
@ RequiresVariantMetaObject
@ MethodSignal
@ MethodScriptable
@ AccessPublic
@ MethodSlot
@ Readable
@ StdCppSet
@ Stored
@ Designable
@ Scriptable
@ Writable
@ IsUnresolvedType
const char * typeName
constexpr const T & qMax(const T &a, const T &b)
Definition qminmax.h:42
GLuint64 GLenum void * handle
const GLfloat * m
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint GLuint end
GLsizei const GLchar ** strings
[1]
GLenum GLuint id
[7]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum type
GLbitfield flags
GLenum GLuint GLintptr offset
GLuint name
GLhandleARB obj
[2]
GLdouble s
[6]
Definition qopenglext.h:235
GLuint entry
GLuint64EXT * result
[6]
GLfloat GLfloat p
[1]
QAnyStringView interfaceName(const Interface &iface)
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
SSL_CTX int void * arg
unsigned int quint32
Definition qtypes.h:50
ptrdiff_t qsizetype
Definition qtypes.h:165
unsigned int uint
Definition qtypes.h:34
const char className[16]
[1]
Definition qwizard.cpp:100
QRandomGenerator generator(sseq)
QMutex mutex
[2]
QReadWriteLock lock
[0]
QXmlStreamReader xml
[0]
QAnyStringView name
static QDBusMetaObject * createMetaObject(const QString &interface, const QString &xml, QHash< QString, QDBusMetaObject * > &map, QDBusError &error)
int propertyMetaType(int id) const
const int * outputTypesForMethod(int id) const
const int * inputTypesForMethod(int id) const
static QByteArray normalizedSignature(const char *method)
Normalizes the signature of the given method.
struct QMetaObject::Data d
Definition moc.h:23