#ifndef DBUS_HELPER_H #define DBUS_HELPER_H #include #include #include #include typedef QHash DBusStringHash; class DBusHelper : public QObject { Q_OBJECT public: static int DBUS_STRING_MAP_ID; explicit DBusHelper(QObject *parent = 0); static class _init { public: _init() { // diff actions to init qRegisterMetaType("DBusStringHash"); qDBusRegisterMetaType(); DBUS_STRING_MAP_ID = QMetaType::type("DBusStringHash"); } } _initializer; static QVariant getVariant(DBusStringHash hash); }; Q_DECLARE_METATYPE(DBusStringHash) #endif // DBUS_HELPER_H