|
|
|
@ -133,8 +133,8 @@ static bool parseDBusSignature(const TQString& signature, Argument& argument)
|
|
|
|
|
}
|
|
|
|
|
else if (signature.startsWith("a{"))
|
|
|
|
|
{
|
|
|
|
|
int from = signature.tqfind("{");
|
|
|
|
|
int to = signature.tqfindRev("}");
|
|
|
|
|
int from = signature.find("{");
|
|
|
|
|
int to = signature.findRev("}");
|
|
|
|
|
if (from == -1 || to == -1 || (to - from - 1) < 2) return false;
|
|
|
|
|
|
|
|
|
|
TQString dictSignature = signature.mid(from + 1, (to - from - 1));
|
|
|
|
@ -600,8 +600,8 @@ bool MethodGenerator::extractMethods(const TQDomElement& interfaceElement,
|
|
|
|
|
{
|
|
|
|
|
Property property;
|
|
|
|
|
property.name = element.attribute("name");
|
|
|
|
|
property.read = element.attribute("access").tqfind("read") != -1;
|
|
|
|
|
property.write = element.attribute("access").tqfind("write") != -1;
|
|
|
|
|
property.read = element.attribute("access").find("read") != -1;
|
|
|
|
|
property.write = element.attribute("access").find("write") != -1;
|
|
|
|
|
|
|
|
|
|
TQString annotation =
|
|
|
|
|
propertyAnnotations[TQString("Property%1").arg(propertyCount)];
|
|
|
|
@ -754,7 +754,7 @@ void MethodGenerator::writeMethodCall(const Class& classData,
|
|
|
|
|
if (method.async)
|
|
|
|
|
{
|
|
|
|
|
stream << " int _asyncCallId = 0;" << endl;
|
|
|
|
|
stream << " while (m_asyncCalls.tqfind(_asyncCallId) != m_asyncCalls.end())"
|
|
|
|
|
stream << " while (m_asyncCalls.find(_asyncCallId) != m_asyncCalls.end())"
|
|
|
|
|
<< endl;
|
|
|
|
|
stream << " {" << endl;
|
|
|
|
|
stream << " ++_asyncCallId;" << endl;
|
|
|
|
@ -976,12 +976,12 @@ void MethodGenerator::writeInterfaceAsyncReplyHandler(const Class& classData,
|
|
|
|
|
stream << endl;
|
|
|
|
|
stream << "{" << endl;
|
|
|
|
|
|
|
|
|
|
stream << " TQMap<int, TQT_DBusMessage>::iterator tqfindIt = m_asyncCalls.tqfind(asyncCallId);" << endl;
|
|
|
|
|
stream << " if (tqfindIt == m_asyncCalls.end()) return;" << endl;
|
|
|
|
|
stream << " TQMap<int, TQT_DBusMessage>::iterator findIt = m_asyncCalls.find(asyncCallId);" << endl;
|
|
|
|
|
stream << " if (findIt == m_asyncCalls.end()) return;" << endl;
|
|
|
|
|
stream << endl;
|
|
|
|
|
|
|
|
|
|
stream << " TQT_DBusMessage call = tqfindIt.data();" << endl;
|
|
|
|
|
stream << " m_asyncCalls.erase(tqfindIt);" << endl;
|
|
|
|
|
stream << " TQT_DBusMessage call = findIt.data();" << endl;
|
|
|
|
|
stream << " m_asyncCalls.erase(findIt);" << endl;
|
|
|
|
|
stream << endl;
|
|
|
|
|
|
|
|
|
|
stream << " TQT_DBusMessage reply = TQT_DBusMessage::methodReply(call);"
|
|
|
|
@ -1029,12 +1029,12 @@ void MethodGenerator::writeInterfaceAsyncReplyHandler(const Class& classData,
|
|
|
|
|
|
|
|
|
|
stream << "{" << endl;
|
|
|
|
|
|
|
|
|
|
stream << " TQMap<int, TQT_DBusMessage>::iterator tqfindIt = m_asyncCalls.tqfind(asyncCallId);" << endl;
|
|
|
|
|
stream << " if (tqfindIt == m_asyncCalls.end()) return;" << endl;
|
|
|
|
|
stream << " TQMap<int, TQT_DBusMessage>::iterator findIt = m_asyncCalls.find(asyncCallId);" << endl;
|
|
|
|
|
stream << " if (findIt == m_asyncCalls.end()) return;" << endl;
|
|
|
|
|
stream << endl;
|
|
|
|
|
|
|
|
|
|
stream << " TQT_DBusMessage call = tqfindIt.data();" << endl;
|
|
|
|
|
stream << " m_asyncCalls.erase(tqfindIt);" << endl;
|
|
|
|
|
stream << " TQT_DBusMessage call = findIt.data();" << endl;
|
|
|
|
|
stream << " m_asyncCalls.erase(findIt);" << endl;
|
|
|
|
|
stream << endl;
|
|
|
|
|
|
|
|
|
|
stream << " TQT_DBusMessage reply = TQT_DBusMessage::methodError(call, error);"
|
|
|
|
@ -1544,12 +1544,12 @@ void MethodGenerator::writeProxyAsyncReplyHandler(const Class& classData,
|
|
|
|
|
<< "::slotHandleAsyncReply(int asyncCallId, const TQT_DBusMessage& message)" << endl;
|
|
|
|
|
stream << "{" << endl;
|
|
|
|
|
|
|
|
|
|
stream << " TQMap<int, TQString>::iterator tqfindIt = "
|
|
|
|
|
<< "m_asyncCalls.tqfind(asyncCallId);" << endl;
|
|
|
|
|
stream << " if (tqfindIt == m_asyncCalls.end()) return;" << endl;
|
|
|
|
|
stream << " TQMap<int, TQString>::iterator findIt = "
|
|
|
|
|
<< "m_asyncCalls.find(asyncCallId);" << endl;
|
|
|
|
|
stream << " if (findIt == m_asyncCalls.end()) return;" << endl;
|
|
|
|
|
stream << endl;
|
|
|
|
|
stream << " const TQString signalName = tqfindIt.data();" << endl;
|
|
|
|
|
stream << " m_asyncCalls.erase(tqfindIt);" << endl;
|
|
|
|
|
stream << " const TQString signalName = findIt.data();" << endl;
|
|
|
|
|
stream << " m_asyncCalls.erase(findIt);" << endl;
|
|
|
|
|
stream << endl;
|
|
|
|
|
|
|
|
|
|
TQValueList<Method>::const_iterator it = classData.asyncReplySignals.begin();
|
|
|
|
@ -1722,12 +1722,12 @@ void MethodGenerator::writeNodeMethods(const Class& classData,
|
|
|
|
|
stream << "bool " << classData.name
|
|
|
|
|
<< "::handleMethodCall(const TQT_DBusMessage& message)" << endl;
|
|
|
|
|
stream << "{" << endl;
|
|
|
|
|
stream << " TQMap<TQString, TQT_DBusObjectBase*>::iterator tqfindIt = "
|
|
|
|
|
<< "m_private->interfaces.tqfind(message.interface());" << endl;
|
|
|
|
|
stream << " if (tqfindIt == m_private->interfaces.end()) return false;"
|
|
|
|
|
stream << " TQMap<TQString, TQT_DBusObjectBase*>::iterator findIt = "
|
|
|
|
|
<< "m_private->interfaces.find(message.interface());" << endl;
|
|
|
|
|
stream << " if (findIt == m_private->interfaces.end()) return false;"
|
|
|
|
|
<< endl;
|
|
|
|
|
stream << endl;
|
|
|
|
|
stream << " return delegateMethodCall(message, tqfindIt.data());" << endl;
|
|
|
|
|
stream << " return delegateMethodCall(message, findIt.data());" << endl;
|
|
|
|
|
stream << "}" << endl;
|
|
|
|
|
stream << endl;
|
|
|
|
|
|
|
|
|
|