Logo Search packages:      
Sourcecode: kdbus version File versions  Download package

void DBusTreeWidget::initObjects (  )  [private, slot]

Delayed initialisation.

Definition at line 236 of file dbustreewidget.cpp.

References QDBusConnection::addConnection(), dbusSignal(), QDBusConnection::SessionBus, statusMessage(), and QDBusConnection::SystemBus.

Referenced by DBusTreeWidget().

{
    if ( d->type == QDBusConnection::SystemBus )
        kdDebug() << "On system bus" << endl;
    if ( d->type == QDBusConnection::SessionBus )
        kdDebug() << "On session bus" << endl;
    try {
        d->proxy.reset(
          new QDBusProxy(
            QDBusConnection::addConnection(
              d->type,
              QString( "%1" ).arg( d->type )
            )
          )
        );
        d->dispatcher.reset( new DBusDispatcher( this, d->proxy.get() ) );

        d->populateDBusTree();

        if ( !connect(
            d->proxy.get(),
            SIGNAL(dbusSignal(const QDBusMessage &)),
            this,
            SLOT(dbusSignal(const QDBusMessage &))
        ) )
            kdWarning() <<
              "Error occurred while attempting to listen for signals."
            << endl;
    }
    catch ( std::runtime_error const & e ) {
        statusMessage( e.what() );
    }
}


Generated by  Doxygen 1.6.0   Back to index