diff options
author | Daniele E. Domenichelli <daniele.domenichelli@gmail.com> | 2011-04-18 16:21:04 (GMT) |
---|---|---|
committer | Marius Storm-Olsen <marius.storm-olsen@nokia.com> | 2011-04-18 16:24:09 (GMT) |
commit | 393462ae14f6c33d0dc462704c754cf4f6bd41c3 (patch) | |
tree | bd61df71543114fe388f517b5cdc561fad041df4 /src/dbus | |
parent | d0245f57d1b617a61bb7472c232be5b974892369 (diff) | |
download | Qt-393462ae14f6c33d0dc462704c754cf4f6bd41c3.zip Qt-393462ae14f6c33d0dc462704c754cf4f6bd41c3.tar.gz Qt-393462ae14f6c33d0dc462704c754cf4f6bd41c3.tar.bz2 |
QtDBus: Cleaning comments, spacing, etc.
Merge-request: 2343
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
Diffstat (limited to 'src/dbus')
-rw-r--r-- | src/dbus/qdbusconnection.cpp | 4 | ||||
-rw-r--r-- | src/dbus/qdbusintegrator.cpp | 13 | ||||
-rw-r--r-- | src/dbus/qdbusserver.cpp | 6 |
3 files changed, 10 insertions, 13 deletions
diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp index 4883a4d..a7ee5b9 100644 --- a/src/dbus/qdbusconnection.cpp +++ b/src/dbus/qdbusconnection.cpp @@ -371,7 +371,7 @@ QDBusConnection QDBusConnection::connectToBus(BusType type, const QString &name) } /*! - Opens a peer-to-peer connection on address \a address and associate with it the + Opens a connection to a private bus on address \a address and associate with it the connection name \a name. Returns a QDBusConnection object associated with that connection. */ QDBusConnection QDBusConnection::connectToBus(const QString &address, @@ -413,7 +413,7 @@ QDBusConnection QDBusConnection::connectToBus(const QString &address, } /*! - Closes the connection of name \a name. + Closes the bus connection of name \a name. Note that if there are still QDBusConnection objects associated with the same connection, the connection will not be closed until diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index d6fbe80..a1cb209 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -377,7 +377,7 @@ static void qDBusUpdateDispatchStatus(DBusConnection *connection, DBusDispatchSt static void qDBusNewConnection(DBusServer *server, DBusConnection *connection, void *data) { - // ### We may want to separate the server from the QDBusConnectionPrivate + // ### We may want to separate the server from the QDBusConnectionPrivate Q_ASSERT(server); Q_UNUSED(server); Q_ASSERT(connection); Q_ASSERT(data); @@ -385,17 +385,14 @@ static void qDBusNewConnection(DBusServer *server, DBusConnection *connection, v // keep the connection alive q_dbus_connection_ref(connection); QDBusConnectionPrivate *d = new QDBusConnectionPrivate; - - // setConnection does the error handling for us + + // setPeer does the error handling for us QDBusErrorInternal error; d->setPeer(connection, error); QDBusConnection retval = QDBusConnectionPrivate::q(d); d->setBusService(retval); - //d->name = QString::number(reinterpret_cast<int>(d)); - //d->setConnection(d->name, d); - // make QDBusServer emit the newConnection signal QDBusConnectionPrivate *server_d = static_cast<QDBusConnectionPrivate *>(data); server_d->serverConnection(retval); @@ -1630,7 +1627,7 @@ void QDBusConnectionPrivate::setServer(DBusServer *s, const QDBusErrorInternal & this, 0); //qDebug() << "time_functions_set" << time_functions_set; Q_UNUSED(time_functions_set); - + q_dbus_server_set_new_connection_function(server, qDBusNewConnection, this, 0); dbus_bool_t data_set = q_dbus_server_set_data(server, server_slot, this, 0); @@ -1647,7 +1644,7 @@ void QDBusConnectionPrivate::setPeer(DBusConnection *c, const QDBusErrorInternal connection = c; mode = PeerMode; - + q_dbus_connection_set_exit_on_disconnect(connection, false); q_dbus_connection_set_watch_functions(connection, qDBusAddWatch, diff --git a/src/dbus/qdbusserver.cpp b/src/dbus/qdbusserver.cpp index 9b61555..1fe80bd 100644 --- a/src/dbus/qdbusserver.cpp +++ b/src/dbus/qdbusserver.cpp @@ -74,7 +74,6 @@ QDBusServer::QDBusServer(const QString &address, QObject *parent) QObject::connect(d, SIGNAL(newServerConnection(QDBusConnection)), this, SIGNAL(newConnection(QDBusConnection))); - // server = q_dbus_server_listen( "unix:tmpdir=/tmp", &error); QDBusErrorInternal error; d->setServer(q_dbus_server_listen(address.toUtf8().constData(), error), error); } @@ -113,11 +112,12 @@ QString QDBusServer::address() const return addr; } + /*! \fn void QDBusServer::newConnection(const QDBusConnection &connection) - This signal is currently not used, but if and when it is - used, \a connection will be the new connection. + This signal is emitted when a new client connection \a connection is + established to the server. */ QT_END_NAMESPACE |