summaryrefslogtreecommitdiffstats
path: root/src/dbus
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbus')
-rw-r--r--src/dbus/qdbusabstractinterface.cpp2
-rw-r--r--src/dbus/qdbusargument.cpp4
-rw-r--r--src/dbus/qdbusconnection.cpp11
-rw-r--r--src/dbus/qdbusdemarshaller.cpp18
-rw-r--r--src/dbus/qdbusintegrator.cpp4
-rw-r--r--src/dbus/qdbusinternalfilters.cpp6
6 files changed, 23 insertions, 22 deletions
diff --git a/src/dbus/qdbusabstractinterface.cpp b/src/dbus/qdbusabstractinterface.cpp
index 4e9c1ad..9ff0ff1 100644
--- a/src/dbus/qdbusabstractinterface.cpp
+++ b/src/dbus/qdbusabstractinterface.cpp
@@ -208,7 +208,7 @@ bool QDBusAbstractInterfacePrivate::setProperty(const QMetaProperty &mp, const Q
QLatin1String(DBUS_INTERFACE_PROPERTIES),
QLatin1String("Set"));
QDBusMessagePrivate::setParametersValidated(msg, true);
- msg << interface << QString::fromUtf8(mp.name()) << qVariantFromValue(QDBusVariant(value));
+ msg << interface << QString::fromUtf8(mp.name()) << QVariant::fromValue(QDBusVariant(value));
QDBusMessage reply = connection.call(msg, QDBus::Block);
if (reply.type() != QDBusMessage::ReplyMessage) {
diff --git a/src/dbus/qdbusargument.cpp b/src/dbus/qdbusargument.cpp
index fbbc6a2..0bde085 100644
--- a/src/dbus/qdbusargument.cpp
+++ b/src/dbus/qdbusargument.cpp
@@ -825,7 +825,7 @@ void QDBusArgument::endStructure()
\snippet doc/src/snippets/code/src_qdbus_qdbusargument.cpp 6
If the type you want to marshall is a QList, QVector or any of the
- Qt's \l {Generic Containers} that take one template parameter,
+ Qt's \l {Container Classes} that take one template parameter,
you need not declare an \c{operator<<} function for it, since
QtDBus provides generic templates to do the job of marshalling
the data. The same applies for STL's sequence containers, such
@@ -952,7 +952,7 @@ void QDBusArgument::endStructure() const
\snippet doc/src/snippets/code/src_qdbus_qdbusargument.cpp 9
If the type you want to demarshall is a QList, QVector or any of the
- Qt's \l {Generic Containers} that take one template parameter, you
+ Qt's \l {Container Classes} that take one template parameter, you
need not declare an \c{operator>>} function for it, since QtDBus
provides generic templates to do the job of demarshalling the data.
The same applies for STL's sequence containers, such as \c {std::list},
diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp
index 5cbb8ca..bf771a8 100644
--- a/src/dbus/qdbusconnection.cpp
+++ b/src/dbus/qdbusconnection.cpp
@@ -173,6 +173,9 @@ void QDBusConnectionManager::setConnection(const QString &name, QDBusConnectionP
The connection is then torn down using the disconnectFromBus()
function.
+ Once disconnected, calling connectToBus() will not reestablish a
+ connection, you must create a new QDBusConnection instance.
+
As a convenience for the two most common connection types, the
sessionBus() and systemBus() functions return open connections to
the session server daemon and the system server daemon,
@@ -209,6 +212,7 @@ void QDBusConnectionManager::setConnection(const QString &name, QDBusConnectionP
\value ExportScriptableSlots export this object's scriptable slots
\value ExportScriptableSignals export this object's scriptable signals
\value ExportScriptableProperties export this object's scriptable properties
+ \value ExportScriptableInvokables export this object's scriptable invokables
\value ExportScriptableContents shorthand form for ExportScriptableSlots |
ExportScriptableSignals |
ExportScriptableProperties
@@ -216,6 +220,7 @@ void QDBusConnectionManager::setConnection(const QString &name, QDBusConnectionP
\value ExportNonScriptableSlots export this object's non-scriptable slots
\value ExportNonScriptableSignals export this object's non-scriptable signals
\value ExportNonScriptableProperties export this object's non-scriptable properties
+ \value ExportNonScriptableInvokables export this object's non-scriptable invokables
\value ExportNonScriptableContents shorthand form for ExportNonScriptableSlots |
ExportNonScriptableSignals |
ExportNonScriptableProperties
@@ -223,8 +228,8 @@ void QDBusConnectionManager::setConnection(const QString &name, QDBusConnectionP
\value ExportAllSlots export all of this object's slots
\value ExportAllSignals export all of this object's signals
\value ExportAllProperties export all of this object's properties
+ \value ExportAllInvokables export all of this object's invokables
\value ExportAllContents export all of this object's contents
-
\value ExportChildObjects export this object's child objects
\sa registerObject(), QDBusAbstractAdaptor, {usingadaptors.html}{Using adaptors}
@@ -853,10 +858,6 @@ QDBusConnectionInterface *QDBusConnection::interface() const
/*!
Returns true if this QDBusConnection object is connected.
-
- If it isn't connected, calling connectToBus() on the same
- connection name will not make be connected. You need to call the
- QDBusConnection constructor again.
*/
bool QDBusConnection::isConnected() const
{
diff --git a/src/dbus/qdbusdemarshaller.cpp b/src/dbus/qdbusdemarshaller.cpp
index 6e19218..0df4c6b 100644
--- a/src/dbus/qdbusdemarshaller.cpp
+++ b/src/dbus/qdbusdemarshaller.cpp
@@ -188,11 +188,11 @@ QVariant QDBusDemarshaller::toVariantInternal()
{
switch (q_dbus_message_iter_get_arg_type(&iterator)) {
case DBUS_TYPE_BYTE:
- return qVariantFromValue(toByte());
+ return QVariant::fromValue(toByte());
case DBUS_TYPE_INT16:
- return qVariantFromValue(toShort());
+ return QVariant::fromValue(toShort());
case DBUS_TYPE_UINT16:
- return qVariantFromValue(toUShort());
+ return QVariant::fromValue(toUShort());
case DBUS_TYPE_INT32:
return toInt();
case DBUS_TYPE_UINT32:
@@ -208,11 +208,11 @@ QVariant QDBusDemarshaller::toVariantInternal()
case DBUS_TYPE_STRING:
return toString();
case DBUS_TYPE_OBJECT_PATH:
- return qVariantFromValue(toObjectPath());
+ return QVariant::fromValue(toObjectPath());
case DBUS_TYPE_SIGNATURE:
- return qVariantFromValue(toSignature());
+ return QVariant::fromValue(toSignature());
case DBUS_TYPE_VARIANT:
- return qVariantFromValue(toVariant());
+ return QVariant::fromValue(toVariant());
case DBUS_TYPE_ARRAY:
switch (q_dbus_message_iter_get_element_type(&iterator)) {
@@ -222,14 +222,14 @@ QVariant QDBusDemarshaller::toVariantInternal()
case DBUS_TYPE_STRING:
return toStringList();
case DBUS_TYPE_DICT_ENTRY:
- return qVariantFromValue(duplicate());
+ return QVariant::fromValue(duplicate());
default:
- return qVariantFromValue(duplicate());
+ return QVariant::fromValue(duplicate());
}
case DBUS_TYPE_STRUCT:
- return qVariantFromValue(duplicate());
+ return QVariant::fromValue(duplicate());
default:
qWarning("QDBusDemarshaller: Found unknown D-Bus type %d '%c'",
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 7951177..b479b32 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -806,14 +806,14 @@ bool QDBusConnectionPrivate::activateCall(QObject* object, int flags, const QDBu
slotData.slotIdx = -1;
slotData.metaTypes.clear();
slotCache.hash.insert(cacheKey, slotData);
- object->setProperty(cachePropertyName, qVariantFromValue(slotCache));
+ object->setProperty(cachePropertyName, QVariant::fromValue(slotCache));
return false;
}
}
// save to the cache
slotCache.hash.insert(cacheKey, slotData);
- object->setProperty(cachePropertyName, qVariantFromValue(slotCache));
+ object->setProperty(cachePropertyName, QVariant::fromValue(slotCache));
// found the slot to be called
deliverCall(object, flags, msg, slotData.metaTypes, slotData.slotIdx);
diff --git a/src/dbus/qdbusinternalfilters.cpp b/src/dbus/qdbusinternalfilters.cpp
index 78abf94..b6cf1fd 100644
--- a/src/dbus/qdbusinternalfilters.cpp
+++ b/src/dbus/qdbusinternalfilters.cpp
@@ -264,7 +264,7 @@ QDBusMessage qDBusPropertyGet(const QDBusConnectionPrivate::ObjectTreeNode &node
return propertyNotFoundError(msg, interface_name, property_name);
}
- return msg.createReply(qVariantFromValue(QDBusVariant(value)));
+ return msg.createReply(QVariant::fromValue(QDBusVariant(value)));
}
enum PropertyWriteResult {
@@ -334,7 +334,7 @@ static int writeProperty(QObject *obj, const QByteArray &property_name, QVariant
// we have to demarshall before writing
void *null = 0;
QVariant other(id, null);
- if (!QDBusMetaType::demarshall(qVariantValue<QDBusArgument>(value), id, other.data())) {
+ if (!QDBusMetaType::demarshall(qvariant_cast<QDBusArgument>(value), id, other.data())) {
qWarning("QDBusConnection: type `%s' (%d) is not registered with QtDBus. "
"Use qDBusRegisterMetaType to register it",
mp.typeName(), id);
@@ -495,7 +495,7 @@ QDBusMessage qDBusPropertyGetAll(const QDBusConnectionPrivate::ObjectTreeNode &n
return interfaceNotFoundError(msg, interface_name);
}
- return msg.createReply(qVariantFromValue(result));
+ return msg.createReply(QVariant::fromValue(result));
}
QT_END_NAMESPACE