8#include <QtCore/qlist.h>
9#include <QtCore/qstringlist.h>
10#include <private/qtools_p.h>
32 || (u ==
'_') || (u ==
'-');
40#ifndef QT_BOOTSTRAPPED
45 int argType =
arg.metaType().id();
47 if (argType == QMetaType::QStringList) {
51 out += u
'\"' +
item +
"\", "_L1;
55 }
else if (argType == QMetaType::QByteArray) {
65 }
else if (argType == QMetaType::QVariantList) {
67 const QList<QVariant>
list =
arg.toList();
76 }
else if (argType == QMetaType::Char || argType == QMetaType::Short || argType == QMetaType::Int
77 || argType == QMetaType::Long || argType == QMetaType::LongLong) {
79 }
else if (argType == QMetaType::UChar || argType == QMetaType::UShort || argType == QMetaType::UInt
80 || argType == QMetaType::ULong || argType == QMetaType::ULongLong) {
82 }
else if (argType == QMetaType::Double) {
84 }
else if (argType == QMetaType::Bool) {
85 out +=
arg.toBool() ?
"true"_L1 :
"false"_L1;
86 }
else if (argType == qMetaTypeId<QDBusArgument>()) {
88 }
else if (argType == qMetaTypeId<QDBusObjectPath>()) {
90 out +=
"[ObjectPath: "_L1;
93 }
else if (argType == qMetaTypeId<QDBusSignature>()) {
94 out +=
"[Signature: "_L1 + qvariant_cast<QDBusSignature>(
arg).signature();
96 }
else if (argType == qMetaTypeId<QDBusUnixFileDescriptor>()) {
97 out +=
"[Unix FD: "_L1;
98 out += qvariant_cast<QDBusUnixFileDescriptor>(
arg).isValid() ?
"valid"_L1 :
"not valid"_L1;
100 }
else if (argType == qMetaTypeId<QDBusVariant>()) {
101 const QVariant v = qvariant_cast<QDBusVariant>(
arg).variant();
102 out +=
"[Variant"_L1;
104 if (vUserType != QMetaType::fromType<QDBusVariant>()
105 && vUserType != QMetaType::fromType<QDBusSignature>()
106 && vUserType != QMetaType::fromType<QDBusObjectPath>()
107 && vUserType != QMetaType::fromType<QDBusArgument>())
114 out += u
'\"' +
arg.toString() + u
'\"';
126 QString busSig = busArg.currentSignature();
127 bool doIterate =
false;
132 out +=
"[Argument: "_L1 + busSig + u
' ';
134 switch (elementType) {
141 busArg.beginStructure();
155 busArg.beginMapEntry();
161 busArg.endMapEntry();
165 out +=
"<ERROR - Unknown Type>"_L1;
168 if (doIterate && !busArg.atEnd()) {
169 while (!busArg.atEnd()) {
176 switch (elementType) {
184 busArg.endStructure();
244 return signature + 1;
273 return signature + 1;
300#ifndef QT_BOOTSTRAPPED
320 for (
int i = 0;
i < part.
size(); ++
i)
346 if (parts.size() < 2)
349 for (
auto part : parts)
369 const auto parts = connName.
mid(1).split(u
'.');
370 if (parts.size() < 1)
377 const QChar*
c = part.data();
378 for (
int j = 0;
j < part.size(); ++
j)
406 if (busName.startsWith(u
':'))
414 const QChar *
c = part.data();
417 for (
int j = 0;
j < part.size(); ++
j)
436 const QChar*
c = memberName.data();
439 for (
int j = 0;
j < memberName.size(); ++
j)
472 if (!
path.startsWith(u
'/') ||
path.indexOf(
"//"_L1) != -1 ||
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...
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
qsizetype size() const noexcept
bool isEmpty() const noexcept
const_reference at(qsizetype i) const noexcept
bool startsWith(QStringView s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
constexpr bool isEmpty() const noexcept
Returns whether this string view is empty - that is, whether {size() == 0}.
constexpr qsizetype size() const noexcept
Returns the size of this string view, in UTF-16 code units (that is, surrogate pairs count as two for...
const_pointer data() const noexcept
Q_CORE_EXPORT QList< QStringView > split(QStringView sep, Qt::SplitBehavior behavior=Qt::KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Splits the view into substring views wherever sep occurs, and returns the list of those string views.
constexpr QStringView mid(qsizetype pos, qsizetype n=-1) const noexcept
Returns the substring of length length starting at position start in this object.
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
#define DBUS_DICT_ENTRY_END_CHAR
#define DBUS_STRUCT_BEGIN_CHAR
#define DBUS_MAXIMUM_NAME_LENGTH
#define DBUS_TYPE_INVALID
#define DBUS_DICT_ENTRY_BEGIN_CHAR
#define DBUS_STRUCT_END_CHAR
bool isValidMemberName(QStringView memberName)
Returns true if memberName is a valid member name.
bool isValidInterfaceName(const QString &ifaceName)
Returns true if this is ifaceName is a valid interface name.
bool isValidErrorName(const QString &errorName)
Returns true if errorName is a valid error name.
bool isValidPartOfObjectPath(QStringView part)
bool isValidUniqueConnectionName(QStringView connName)
Returns true if connName is a valid unique connection name.
bool isValidBusName(const QString &busName)
Returns true if busName is a valid bus name.
bool isValidObjectPath(const QString &path)
Returns true if path is valid object path.
QString argumentToString(const QVariant &arg)
bool isValidBasicType(int c)
Returns true if c is a valid, basic D-Bus type.
bool isValidSignature(const QString &signature)
Returns true if signature is a valid D-Bus type signature for one or more types.
bool isValidFixedType(int c)
Returns true if c is a valid, fixed D-Bus type.
bool isValidSingleSignature(const QString &signature)
Returns true if signature is a valid D-Bus type signature for exactly one full type.
Combined button and popup list for selecting options.
constexpr bool isAsciiDigit(char32_t c) noexcept
constexpr bool isAsciiLetterOrNumber(char32_t c) noexcept
static bool argToString(const QDBusArgument &arg, QString &out)
static bool isFixedType(int c)
static const char basicTypes[]
static bool variantToString(const QVariant &arg, QString &out)
static const char * validateSingleType(const char *signature)
static bool isBasicType(int c)
static const char fixedTypes[]
static bool isValidCharacterNoDash(QChar c)
static const char oneLetterTypes[]
static bool isValidCharacter(QChar c)
static bool isValidNumber(QChar c)
GLsizei const GLfloat * v
[13]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLsizei const GLchar *const * path
QTextStream out(stdout)
[7]