[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdepim/kleopatra
From:       Laurent Montel <montel () kde ! org>
Date:       2007-06-18 18:26:32
Message-ID: 200706182026.33112.montel () kde ! org
[Download RAW message or body]

On Saturday 16 June 2007 09:49:16 David Faure wrote:
> On Friday 15 June 2007, Laurent Montel wrote:
> > +  QString dbusService;
> > +  int result = KDBusServiceStarter::self()->findServiceFor(
> > "DBUS/Mailer", QString::null, &error, &dbusService ); if ( result != 0 )
> > {
> >      kDebug() << "Couldn't connect to KMail\n";
> >      KMessageBox::error( this,
> > @@ -439,6 +440,27 @@
> >      return;
> >    }
> >  
> > +  //TODO look at if we can find kmail when embedded into kontact
> > +   bool kmailFound = false;
> > +   QDBusConnection dbus = QDBusConnection::sessionBus();
> > +   QDBusReply<QStringList> reply =
> > dbus.interface()->registeredServiceNames(); +   if ( !reply.isValid() )
> > +      return;
> > +
> > +   const QStringList allServices = reply;
> > +   for ( QStringList::const_iterator it = allServices.begin(), end =
> > allServices.end() ; it != end ; ++it ) { +        const QString service =
> > *it;
> > +        if ( service.startsWith( "org.kde.kmail" ) ) {
> > +                kmailFound = true;
> > +                break;
> > +        }
> > +   }
> > +
> > +   if(!kmailFound)
> > +   {
> > +       //TODO launch it into kontact
> > +   }
>
> Hmm all of this is what KDBusServiceStarter::self()->findServiceFor( ) is
> supposed to do. If it doesn't work, it should be debugged, but the above
> code shouldn't be necessary.

I just start to port it.
I didn't start to test it.
I will test it this night or tomorrow.
But KDBusServiceStarter::self()->findServiceFor( ) is able to find when kmail 
is embedded into kontact ?

Rehatds

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic