[Development] Qt 5.1 with DBus on Windows 7, 64bit, Visual Studio 2012

Thiago Macieira thiago.macieira at intel.com
Thu Aug 1 17:56:05 CEST 2013

On quinta-feira, 1 de agosto de 2013 12:16:37, Fricot, Daniel wrote:
> 1.       Why is it kept in the sources but is never included in the Windows
> binaries? (I know it was originally Linux-only, but wouldn't it be great if
> - just as most of the Qt stuff - it was cross-platform out of the box?
> Surely, I'm not the only one asking this.)

Purely historical reasons. Our build machines don't have a dbus/dbus.h header 
anywhere, so configure skips it and turns off the QtDBus module.

> 2.       Is it stable? (I've heard other people claiming it isn't stable on
> Windows and should not be used)

Like Shane said, it's unknown, since we don't test it.

The QtDBus code itself is entirely cross-platform. If it's stable on Linux, it 
should be stable everywhere.

The problem is the libdbus-1 code. It has at least one special code path on 
Windows, which is the use of TCP sockets instead of Unix sockets. Also, since 
it uses pthreads on Unix, it's possible the mutex and condition variable 
implementation for Windows could be bad. You'll have to test.

Once we get rid of the libdbus-1 dependency (by Qt 5.3 or 5.4), this will not 
be a problem.

> 3.       Can I build QtDBus for Windows as a Qt plugin or module of some
> sort that can hook into the Windows binaries or do I have to build the
> entire Qt like I did now? (The Qt binaries you can download are great as
> you don't need to build the framework yourself. Building it yourself
> requires Qt, VC2012, nmake, cmake, Ruby, Perl, Python, DBus, CVS, GIT,
> Expat, ICU and a lot of time. This increases the risk of errors in our
> toolchain.)

The module is pretty much self-contained. So all you need to do is get the 
qtbase sources, configure with the same build options as your other binaries 
and do a "make sub-dbus". That will build moc and QtCore, but you can discard 
them afterwards.

You may try, but I provide no guarantee for, skipping the configuration step 
and simply going to src/dbus, typing qmake && make there.

> 4.       What are the best alternatives?

Maybe take a look at Qt Publish & Subscribe, which unfortunately is not 
available in Qt 5.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130801/9572c729/attachment.sig>

More information about the Development mailing list