Future of MeeGo

February 24, 2011 on 2:15 pm | In maemo, meego | No Comments

My interest in the future of MeeGo is quite intense, both professionally and personally. Today the CEO of my employer wrote his thoughts into his blog. It was quite interesting read, and hopefully gives new hope for those in doubt.

qmake and D-Bus

February 18, 2011 on 9:58 pm | In geeky | 5 Comments

Something I did not find documented anywhere: a sensible way to generate QtDBus adaptor and interface classes from introspection data with qdbusxml2cpp. I only found hacks using system() and custom targets to accomplish the feat.

I though to myself that there must be a saner, better way, and while looking at the qmake generated Makefile, I noticed some interesting includes. After some investigation, I found "magic" variables DBUS_INTERFACES and DBUS_ADAPTORS. The introspect files should be named servicename.xml and listed in the variables, and qmake will do all the magic for you.

With these variables, it is really easy to generate the helper classes on-demand. Just remember to include the generated header in some code file, otherwise compilation will choke.

QT = core dbus
TARGET = qtdbus
DBUS_ADAPTORS = fi.inz.hello.xml
SOURCES = hello.cpp main.cpp
HEADERS = hello.h

With this simple .pro file qmake autogenerates the adaptor on build.

To see other files from the example, see fi.inz.hello.xml hello.cpp hello.h main.cpp qtdbus.pro

Powered by WordPress.
Entries and comments feeds. Valid XHTML and CSS. ^Top^