44 #include <QtCore/qcoreapplication.h> 45 #include <QtCore/qmetaobject.h> 46 #include <QtCore/qset.h> 47 #include <QtCore/qtimer.h> 48 #include <QtCore/qthread.h> 67 for ( ; it !=
end; ++
it) {
92 return adaptor->d_func()->xml;
98 adaptor->d_func()->xml =
xml;
195 return d_func()->autoRelaySignals;
199 :
QObject(obj), waitingForPolish(false)
216 const char *
interface = mci.value();
221 if (it->adaptor != adaptor) {
226 it->adaptor = adaptor;
260 for ( ; it !=
end; ++
it) {
276 qWarning(
"QtDBus: cannot relay signals from parent %s(%p \"%s\") unless they are emitted in the object's thread %s(%p \"%s\"). " 277 "Current thread is %s(%p \"%s\").",
293 QObject *realObject = senderObj;
294 if (qobject_cast<QDBusAbstractAdaptor *>(senderObj))
296 realObject = realObject->
parent();
301 if (inputCount == -1)
305 if (inputCount + 1 != types.
count() ||
309 qWarning(
"QDBusAbstractAdaptor: Cannot relay signal %s::%s",
315 for (
int i = 1; i < types.
count(); ++i)
337 106, 22, 22, 22, 0x0a,
338 118, 22, 22, 22, 0x0a,
341 47, 23, 22, 22, 0x05,
347 "QDBusAdaptorConnector\0\0obj,metaobject,sid,args\0" 348 "relaySignal(QObject*,const QMetaObject*,int,QVariantList)\0\0relaySlot()\0" 362 void *QDBusAdaptorConnector::qt_metacast(
const char *_clname)
364 if (!_clname)
return 0;
367 return QObject::qt_metacast(_clname);
372 _id = QObject::qt_metacall(_c, _id, _a);
379 case 2:
relaySignal((*
reinterpret_cast< QObject*(*)
>(_a[1])),(*
reinterpret_cast< const QMetaObject*(*)
>(_a[2])),(*
reinterpret_cast< int(*)
>(_a[3])),(*
reinterpret_cast< const QVariantList(*)
>(_a[4])));
break;
389 void *_a[] = { 0,
const_cast<void*
>(
reinterpret_cast<const void*
>(&_t1)),
const_cast<void*
>(
reinterpret_cast<const void*
>(&_t2)),
const_cast<void*
>(
reinterpret_cast<const void*
>(&_t3)),
const_cast<void*
>(
reinterpret_cast<const void*
>(&_t4)) };
The QVariant class acts like a union for the most common Qt data types.
#define QT_END_NAMESPACE
This macro expands to.
QDBusAdaptorConnector * qDBusFindAdaptorConnector(QObject *obj)
T * data() const
Returns the value of the pointer referenced by this object.
#define it(className, varName)
The QDBusAbstractAdaptor class is the base class of D-Bus adaptor classes.
QDBusAdaptorConnector * qDBusCreateAdaptorConnector(QObject *obj)
void setAutoRelaySignals(bool enable)
Toggles automatic signal relaying from the real object (see object()).
The QByteArray class provides an array of bytes.
void disconnectAllSignals(QObject *object)
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the list.
static const QMetaObject staticMetaObject
This variable stores the meta-object for the class.
~QDBusAbstractAdaptor()
Destroys the adaptor.
bool autoRelaySignals() const
Returns true if automatic signal relaying from the real object (see object()) is enabled, otherwiser returns false.
int count(const T &t) const
Returns the number of occurrences of value in the list.
QByteArray & prepend(char c)
Prepends the character ch to this byte array.
The QString class provides a Unicode character string.
T * qobject_cast(QObject *object)
The QObject class is the base class of all Qt objects.
iterator Iterator
Qt-style synonym for QVector::iterator.
void connectAllSignals(QObject *object)
int qDBusParametersForMethod(const QMetaMethod &mm, QList< int > &metaTypes)
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the vector...
QDBusAdaptorConnector(QObject *parent)
static QThread * currentThread()
Returns a pointer to a QThread which manages the currently executing thread.
#define QT_BEGIN_NAMESPACE
This macro expands to.
static QIntfbScreen * connected
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
const T & at(int i) const
Returns the item at index position i in the list.
#define QCLASSINFO_DBUS_INTERFACE
Q_CORE_EXPORT void qWarning(const char *,...)
QDBusAbstractAdaptor(QObject *parent)
Constructs a QDBusAbstractAdaptor with obj as the parent object.
void qSort(RandomAccessIterator start, RandomAccessIterator end)
QDBusAbstractAdaptor * adaptor
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
Disconnects signal in object sender from method in object receiver.
Q_OUTOFLINE_TEMPLATE RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
iterator begin()
Returns an STL-style iterator pointing to the first item in the vector.
static const uint qt_meta_data_QDBusAdaptorConnector[]
QObject * parent() const
Returns a pointer to the parent object.
static const char qt_meta_stringdata_QDBusAdaptorConnector[]
const_iterator ConstIterator
Qt-style synonym for QList::const_iterator.
QString objectName() const
static void saveIntrospectionXml(QDBusAbstractAdaptor *adaptor, const QString &xml)
const QObjectList & children() const
Returns a list of child objects.
void relaySignal(QObject *obj, const QMetaObject *metaObject, int sid, const QVariantList &args)
#define Q_LIKELY(x)
Hints to the compiler that the enclosed condition, expr, is likely to evaluate to true...
QScopedPointer< QObjectData > d_ptr
int qstrcmp(const QByteArray &str1, const char *str2)
QThread * thread() const
Returns the thread in which the object lives.
void relay(QObject *sender, int id, void **)
static const KeyPair *const end
#define qPrintable(string)
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.
static QString retrieveIntrospectionXml(QDBusAbstractAdaptor *adaptor)
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the list...
void addAdaptor(QDBusAbstractAdaptor *adaptor)