96 for (
int i = 0; i < list.
count(); ++i) {
124 }
else if (argType == qMetaTypeId<QDBusArgument>()) {
125 argToString(qvariant_cast<QDBusArgument>(arg), out);
126 }
else if (argType == qMetaTypeId<QDBusObjectPath>()) {
131 }
else if (argType == qMetaTypeId<QDBusSignature>()) {
134 }
else if (argType == qMetaTypeId<QDBusUnixFileDescriptor>()) {
136 out +=
QLatin1String(qvariant_cast<QDBusUnixFileDescriptor>(arg).isValid() ?
"valid" :
"not valid");
138 }
else if (argType == qMetaTypeId<QDBusVariant>()) {
142 if (vUserType != qMetaTypeId<QDBusVariant>()
143 && vUserType != qMetaTypeId<QDBusSignature>()
144 && vUserType != qMetaTypeId<QDBusObjectPath>()
145 && vUserType != qMetaTypeId<QDBusArgument>())
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QVariant class acts like a union for the most common Qt data types.
static bool argToString(const QDBusArgument &arg, QString &out)
The QByteArray class provides an array of bytes.
void chop(int n)
Removes n characters from the end of the string.
QString toString() const
Returns the variant as a QString if the variant has type() String , Bool , ByteArray ...
The QDBusSignature class enables the programmer to identify the SIGNATURE type provided by the D-Bus ...
QList< QVariant > toList() const
Returns the variant as a QVariantList if the variant has type() List or StringList ; otherwise return...
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
bool toBool() const
Returns the variant as a bool if the variant has type() Bool.
The QString class provides a Unicode character string.
QByteArray toByteArray() const
Returns the variant as a QByteArray if the variant has type() ByteArray or String (converted using QS...
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
QStringList toStringList() const
Returns the variant as a QStringList if the variant has type() StringList, String ...
qlonglong toLongLong(bool *ok=0) const
Returns the variant as a long long int if the variant has type() LongLong , Bool , ByteArray , Char , Double , Int , String , UInt , or ULongLong ; otherwise returns 0.
bool canConvert(Type t) const
Returns true if the variant's type can be cast to the requested type, t.
The QStringList class provides a list of strings.
qulonglong toULongLong(bool *ok=0) const
Returns the variant as as an unsigned long long int if the variant has type() ULongLong ...
static bool variantToString(const QVariant &arg, QString &out)
const char * typeName() const
Returns the name of the type stored in the variant.
int userType() const
Returns the storage type of the value stored in the variant.
int count(char c) const
Returns the number of occurrences of character ch in the byte array.
The QDBusObjectPath class enables the programmer to identify the OBJECT_PATH type provided by the D-B...
double toDouble(bool *ok=0) const
Returns the variant as a double if the variant has type() Double , QMetaType::Float ...
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
char at(int i) const
Returns the character at index position i in the byte array.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
The QDBusVariant class enables the programmer to identify the variant type provided by the D-Bus type...
T qvariant_cast(const QVariant &value)
Returns the given value converted to the template type T.