Qt 4 Preview 2 Highlights Accessibility; D-BUS Bindings for Qt 4

Trolltech has announced the availability of the second Qt 4 Technical Preview. Key highlights include support for AT-SPI, bringing accessibility to the Unix and Linux desktop for people with disabilities. Read the online documentation or jump to the download page.

Together with this tech preview, Harald Fernengel released a preview of a brand new set of D-BUS bindings. Using Qt's meta object system, broadcasting signals and invoking methods in other applications is now a breeze. D-BUS signals can be connected to any slot. No preprocessor and no special wrapper classes are necessary. You can download the library at the Qt D-BUS tutorial page.

Dot Categories: 

Comments

by aleXXX (not verified)

Oh well. A long day and some beer...

Alex

by AC (not verified)

DCOP was part of KDE, not Qt... Since there is a replacement in Qt now, will DCOP be going away? Or is this not really a replacement?

by anon (not verified)

that particular decision has been made yet. I think the arrival of dbus bindings within KDE will help more KDE developers use and compare DBUS with DCOP. I personally am interested in DBUS, but I wasn't willing to touch it until there was a saner API developed for it. Thank you trolls!

by Richard Moore (not verified)

I hope to port the standalone version of KJSEmbed (QJSEmbed) to the technology preview in the next few weeks. That should give us an idea of how hard is to port code that is intimately tied to the internals of Qt to the new release. My initial investigations with the first preview indicate that this should be possible with a minimum of pain.

by ac (not verified)

You missed some important news:
http://trolls.troll.no/~harald/accessibility/

I don't understand too well but it looks like there is now a way to replace Bonobo with D-BUS in AT-SPI/ATK stuff? This is great news! I wonder how Sun/GNOME will react to that.

by anon (not verified)

I don't think AT-SPI and ATK has ever used Bonobo.. how could Mozilla, Java/Sun, etc,, use AT-SPI then?

by ac (not verified)

Bonobo is an implementation of CORBA. Mozilla and Java would use CORBA to talk to AT-SPI/ATK. Correct me if I'm wrong, this stuff is all way too complex and over-engineered for me to understand any of it.

One of the problems KDE has with AT-SPI/ATK. Now Harry has provided a replacement implemented in D-BUS. This could be a challenge to Sun which has been really reluctant to adopt D-BUS for AT-SPI/ATK last I was told.

by anon (not verified)

Correct me if I'm wrong, but wasn't Bonobo a set of CORBA interfaces, not a implementation of CORBA. I know that AT-SPI uses CORBA, but I don't think it uses Bonobo. I don't think ATK uses CORBA other than using it to interface with AT-SPI (still not using Bonobo). I beleive that Qt goes through ATK, which uses dbus, so it doesn't have to speak CORBA with AT-SPI.

Correct me if I'm wrong.

by ac (not verified)

Right. So hopefully this means we can get rid of the CORBA dependency from KDE and that Sun will cooperate. Else it might mean forking ATK? I don't even know if this is viable.

by anon (not verified)

I don't think you can ever remove CORBA dependencies from ATK because ATK itself tries to save programmers from the CORBA-madness that is AT-SPI. Unfortunatly, AT-SPI is intimatly tied with CORBA and it'd be hard to make a replacement for it as it is the only software package in the UNIX platform that vendors will likely support accessible hardware with.

by Richard Moore (not verified)

We removed the CORBA dependency from KDE before KDE 2.0 was released, the process was something like this:

1. Torben's first KParts demo'd at KDE I. Based on shared libraries with each host having knowledge of the base classes it embedded and no IPC.

2. The second version developed for KDE 2.0 which was based on CORBA. This was removed in the months preceding KDE II with pretty much all of it removed by the end of the conference. This version was never part of a final release of KDE.

3. The current version of KParts based on shared libraries with DCOP for IPC and KTrader for picking components to load. This version can use virtual base classes to provide component independent interfaces such as that provided for text editors (hence the KVim part).

by ac (not verified)

I meant the dependence on CORBA that KDE/Qt would have if it depended on accessibility technologies that require CORBA.

by ac (not verified)

Of course, I don't mean bonobo, I mean ORBIT.

by ac (not verified)

s/bonobo/orbit/g

by Aaron J. Seigo (not verified)

from my conversations on the various accessability email lists with folks from Sun, they aren't exactly warm to the idea of replacing CORBA with DBUS within the scope of ATK. they've put alot of work into their Java layer and OOo for the CORBA stuff, and i think we all know what it's like to have our original implementation concepts modified in the scope ofa larger group of people: we all get very attached to our "babies". but the guys doing the work at Sun are quite good at what they do and i'm sure at the end of the day we'll find a solution that everyone is comfortable with.

by Rayiner Hashem (not verified)

That's pretty charitable of you. It's the fault of companies like Sun that CORBA didn't die an early death like it deserved. There are good APIs, bad APIs, and then there is CORBA...

/bitter CORBA programmer

by Random KDE User (not verified)

As far as I know, OMG is developing complete new C++ bindings for CORBA. Maybe they will get them "right" this time. That would be pretty useful since CORBA is still the only universally usable distribution middleware around, at least in my opinion.

by Rayiner Hashem (not verified)

If OMG wants to fix CORBA, they should start by going to Konqueror, selecting the current standard, and hitting "Shred." It is that broken.

by Henrique Pinto (not verified)

"Shred" was removed from Konqueror.

by ac (not verified)

And maybe they should stop using a stupid name like "Oh My God". It's really immature and childish.

by Richard Dale (not verified)

Did you miss out the smiley, or don't you know that it stands for 'Object Management Group'. Still with the CORBA design they ended up with, it might be a better acronym after all :)

by ac (not verified)

A joke, of course. :)

by Richard Dale (not verified)

I had a conversation with you at aKademy where you said you had reservations about the serialisation that DBUS used, and I couldn't quite understand what you thought the problem was. But it sounds to me as though you're more enthusistiac about DBUS than you were then. I agree that CORBA is a complete dog, but perhaps using IIOP might not be a bad idea as a transport layer, which java RMI also uses I believe. Does anyone know what the pros and cons were of choosing the marshalling used by DBUS over IIOP, or DCOP's QDataStream stuff?

by Anonymous Coward (not verified)

The main problem with this is that IIOP is primarily designed for *networked* procedure calls, while the primary use case for DCOP/DBUS is IPC between processes running on the *same machine*.

Using a fundamentally network-oriented framework such as CORBA as transport for an accessibility toolkit (the most local thing you could imagine) indeed appears as, hmm, a bit of a strange idea. You'd think the pain of developping against GNOME's CORBA madness of an API would have taught a lesson or two...

by Jeff (not verified)

Anybody care to comment?

I thought Kparts was KDE's answer to CORBA and dcop was something different all together. Hmmmm.... developer.kde.org isn't responding.

But dcop was designed as a structure to facilitate interprocess app communication, and kparts --or rather a kpart, was designed to be a sharable/embeddable component/object. This seems very different to me, but I'm not a devel.

But wasn't dbus supposed to be just like dcop, but with a little broader scope (to include kernel events like usb-drives, etc)? Am I stupid, but this doesn't sound like embeddable COM-like components which i thought corba was supposed to do.

by anon (not verified)

From my (limited) understanding of CORBA, CORBA would do the job of BOTH dcop and kparts. You would, of course, need a set of CORBA interfaces to make something like kparts, sorta like what Bonobo does.

by Random KDE user (not verified)

I second what the above poster has said. Nowadays, CORBA does both. I do not really know the history of CORBA good, but I think it started a bit different out. It was, and is, basically a distribution middleware. That is, it enables the distribution of objects on multiple machines/contexts and communication between them. That is, the emphasis lies somewhat on distributed computing. Whereas D-BUS and DCOP are message oriented middleware. The emphasis there lies, you guess it, in enabling applications to exchange messages. Not as a means for distributed computing, but more for the tasks like you see KDE is using DCOP for.

That is at least the impression I have where the emphasis of both technologies lies.

by Richard Dale (not verified)

I think you can now connect signals and slots across threads, and you can either emit signals synchronously as now, or asynchronously. Nice. I looked at the online docs, but it doesn't seem to have been written up yet. Connect now looks like this:

bool QObject::connect ( const QObject * sender, const char * signal, const QObject * receiver, const char * member, Qt::ConnectionType type = Qt::AutoConnection )

So I assume you describe the signal behaviour with different values of the Qt::ConnectionType enum.

by Richard Moore (not verified)

Looking at the QMetaObject code etc. it looks like signals and slots are now handled via events (as I described in my blog entry about TP1). This means it should gain from the thread handling of the new event handling.

by Richard Dale (not verified)

I see - that wasn't obvious from looking at the QMetaObject online docs. Like kjsembed, qtruby makes use of the undocumented 'QUObject' class so I'll be interested to hear how you get on with porting that stuff to Qt4.