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. Change-Id: Ie4bb662dcb274440ab8bfffd1709c0a71abc27dc Reviewed-by: David Faure <david.faure@kdab.com> (cherry picked from commit 478b1afbe1544a5c88d26d714ea6307cdcba3bb1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
bd712d5195
commit
5bf5159011
@ -564,7 +564,7 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
|
|||||||
hs << "QDBusPendingReply<";
|
hs << "QDBusPendingReply<";
|
||||||
for (int i = 0; i < method.outputArgs.count(); ++i)
|
for (int i = 0; i < method.outputArgs.count(); ++i)
|
||||||
hs << (i > 0 ? ", " : "")
|
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"));
|
method.annotations, i, "Out"));
|
||||||
hs << "> ";
|
hs << "> ";
|
||||||
}
|
}
|
||||||
@ -598,7 +598,7 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
|
|||||||
if (method.outputArgs.count() > 1) {
|
if (method.outputArgs.count() > 1) {
|
||||||
// generate the old-form QDBusReply methods with multiple incoming parameters
|
// generate the old-form QDBusReply methods with multiple incoming parameters
|
||||||
hs << " inline " << (isDeprecated ? "Q_DECL_DEPRECATED " : "") << "QDBusReply<"
|
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"))
|
method.annotations, 0, "Out"))
|
||||||
<< "> ";
|
<< "> ";
|
||||||
hs << method.name << "(";
|
hs << method.name << "(";
|
||||||
@ -628,7 +628,7 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
|
|||||||
// yes, starting from 1
|
// yes, starting from 1
|
||||||
for (int i = 1; i < method.outputArgs.count(); ++i)
|
for (int i = 1; i < method.outputArgs.count(); ++i)
|
||||||
hs << " " << argNames.at(argPos++) << " = qdbus_cast<"
|
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"))
|
method.annotations, i, "Out"))
|
||||||
<< ">(reply.arguments().at(" << i << "));" << Qt::endl;
|
<< ">(reply.arguments().at(" << i << "));" << Qt::endl;
|
||||||
hs << " }" << Qt::endl
|
hs << " }" << Qt::endl
|
||||||
@ -899,7 +899,7 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
|
|||||||
hs << "void ";
|
hs << "void ";
|
||||||
cs << "void ";
|
cs << "void ";
|
||||||
} else {
|
} else {
|
||||||
returnType = qtTypeName(method.name, method.outputArgs.first().type,
|
returnType = qtTypeName(method.outputArgs.first().name, method.outputArgs.first().type,
|
||||||
method.annotations, 0, "Out");
|
method.annotations, 0, "Out");
|
||||||
hs << returnType << " ";
|
hs << returnType << " ";
|
||||||
cs << returnType << " ";
|
cs << returnType << " ";
|
||||||
@ -935,13 +935,13 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
|
|||||||
|
|
||||||
if (!method.outputArgs.isEmpty())
|
if (!method.outputArgs.isEmpty())
|
||||||
cs << ", Q_RETURN_ARG("
|
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")
|
0, "Out")
|
||||||
<< ", " << argNames.at(method.inputArgs.count()) << ")";
|
<< ", " << argNames.at(method.inputArgs.count()) << ")";
|
||||||
|
|
||||||
for (int i = 0; i < method.inputArgs.count(); ++i)
|
for (int i = 0; i < method.inputArgs.count(); ++i)
|
||||||
cs << ", Q_ARG("
|
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")
|
i, "In")
|
||||||
<< ", " << argNames.at(i) << ")";
|
<< ", " << argNames.at(i) << ")";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user