| 200 | } |
| 201 | |
| 202 | void Endpoint::invokeObject(const QString &objectName, const char *method, |
| 203 | const QVariantList &args) const |
| 204 | { |
| 205 | if (!isConnected()) |
| 206 | return; |
| 207 | |
| 208 | ObjectInfo *obj = m_nameMap.value(objectName, nullptr); |
| 209 | #if !defined(NDEBUG) |
| 210 | Q_ASSERT(obj); |
| 211 | Q_ASSERT(obj->address != Protocol::InvalidObjectAddress); |
| 212 | #else |
| 213 | if (!obj || obj->address == Protocol::InvalidObjectAddress) |
| 214 | return; |
| 215 | #endif |
| 216 | |
| 217 | Message msg(obj->address, Protocol::MethodCall); |
| 218 | const QByteArray name(method); |
| 219 | Q_ASSERT(!name.isEmpty()); |
| 220 | msg << name << args; |
| 221 | send(msg); |
| 222 | } |
| 223 | |
| 224 | void Endpoint::invokeObjectLocal(QObject *object, const char *method, |
| 225 | const QVariantList &args) |