qdbusxml2cpp: be consistent in the annotation suggestion
Some lines were suggesting the method name as context, while most of the others were the parameter or property name. Pick-to: 6.4 Change-Id: Ie4bb662dcb274440ab8bfffd1709c0a71abc27dc Reviewed-by: David Faure <david.faure@kdab.com>bb10
parent
ed631011fa
commit
478b1afbe1
|
|
@ -571,7 +571,7 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
|
|||
hs << "QDBusPendingReply<";
|
||||
for (qsizetype i = 0; i < method.outputArgs.size(); ++i)
|
||||
hs << (i > 0 ? ", " : "")
|
||||
<< templateArg(qtTypeName(method.name, method.outputArgs.at(i).type,
|
||||
<< templateArg(qtTypeName(method.outputArgs.at(i).name, method.outputArgs.at(i).type,
|
||||
method.annotations, i, "Out"));
|
||||
hs << "> ";
|
||||
}
|
||||
|
|
@ -605,7 +605,7 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
|
|||
if (method.outputArgs.size() > 1) {
|
||||
// generate the old-form QDBusReply methods with multiple incoming parameters
|
||||
hs << " inline " << (isDeprecated ? "Q_DECL_DEPRECATED " : "") << "QDBusReply<"
|
||||
<< templateArg(qtTypeName(method.name, method.outputArgs.first().type,
|
||||
<< templateArg(qtTypeName(method.outputArgs.first().name, method.outputArgs.first().type,
|
||||
method.annotations, 0, "Out"))
|
||||
<< "> ";
|
||||
hs << method.name << "(";
|
||||
|
|
@ -635,7 +635,7 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
|
|||
// yes, starting from 1
|
||||
for (qsizetype i = 1; i < method.outputArgs.size(); ++i)
|
||||
hs << " " << argNames.at(argPos++) << " = qdbus_cast<"
|
||||
<< templateArg(qtTypeName(method.name, method.outputArgs.at(i).type,
|
||||
<< templateArg(qtTypeName(method.outputArgs.at(i).name, method.outputArgs.at(i).type,
|
||||
method.annotations, i, "Out"))
|
||||
<< ">(reply.arguments().at(" << i << "));" << Qt::endl;
|
||||
hs << " }" << Qt::endl
|
||||
|
|
@ -912,7 +912,7 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
|
|||
hs << "void ";
|
||||
cs << "void ";
|
||||
} else {
|
||||
returnType = qtTypeName(method.name, method.outputArgs.first().type,
|
||||
returnType = qtTypeName(method.outputArgs.first().name, method.outputArgs.first().type,
|
||||
method.annotations, 0, "Out");
|
||||
hs << returnType << " ";
|
||||
cs << returnType << " ";
|
||||
|
|
@ -948,13 +948,13 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
|
|||
|
||||
if (!method.outputArgs.isEmpty())
|
||||
cs << ", Q_RETURN_ARG("
|
||||
<< qtTypeName(method.name, method.outputArgs.at(0).type, method.annotations,
|
||||
<< qtTypeName(method.outputArgs.at(0).name, method.outputArgs.at(0).type, method.annotations,
|
||||
0, "Out")
|
||||
<< ", " << argNames.at(method.inputArgs.size()) << ")";
|
||||
|
||||
for (qsizetype i = 0; i < method.inputArgs.size(); ++i)
|
||||
cs << ", Q_ARG("
|
||||
<< qtTypeName(method.name, method.inputArgs.at(i).type, method.annotations,
|
||||
<< qtTypeName(method.inputArgs.at(i).name, method.inputArgs.at(i).type, method.annotations,
|
||||
i, "In")
|
||||
<< ", " << argNames.at(i) << ")";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue