From 61ed4ee18702b90c694265f64280d3093e9656df Mon Sep 17 00:00:00 2001 From: Ryan van der Bijl Date: Tue, 27 Feb 2018 16:03:33 +0100 Subject: [PATCH 1/2] - Improve kdwsdl2cpp generated documentation --- kdwsdl2cpp/src/converter_clientstub.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/kdwsdl2cpp/src/converter_clientstub.cpp b/kdwsdl2cpp/src/converter_clientstub.cpp index c3913d1f6..b61dfccf9 100644 --- a/kdwsdl2cpp/src/converter_clientstub.cpp +++ b/kdwsdl2cpp/src/converter_clientstub.cpp @@ -731,14 +731,16 @@ void Converter::convertClientOutputMessage(const Operation &operation, const Binding &binding, KODE::Class &newClass) { // result signal - QString operationName = lowerlize(operation.name()); - KODE::Function doneSignal(operationName + QLatin1String("Done"), QLatin1String("void"), KODE::Function::Signal); - doneSignal.setDocs(QLatin1String("This signal is emitted whenever the call to ") + operationName + QLatin1String("() succeeded.")); + const QString operationName = lowerlize(operation.name()); + const QString signalBase = lowerlize(operation.name()); + const QString callName = QLatin1String("async") + upperlize(operation.name()); + KODE::Function doneSignal(signalBase + QLatin1String("Done"), QLatin1String("void"), KODE::Function::Signal); + doneSignal.setDocs(QLatin1String("This signal is emitted whenever the asynchronous call ") + callName + QLatin1String("() has succeeded.")); // error signal - KODE::Function errorSignal(operationName + QLatin1String("Error"), QLatin1String("void"), KODE::Function::Signal); + KODE::Function errorSignal(signalBase + QLatin1String("Error"), QLatin1String("void"), KODE::Function::Signal); errorSignal.addArgument(QLatin1String("const KDSoapMessage& fault")); - errorSignal.setDocs(QLatin1String("This signal is emitted whenever the call to ") + operationName + QLatin1String("() failed.")); + errorSignal.setDocs(QLatin1String("This signal is emitted whenever the asynchronous call ") + callName + QLatin1String("() has failed.")); // finished slot const QString finishedSlotName = QLatin1String("_kd_slot") + upperlize(operationName) + QLatin1String("Finished"); From 630948a49a8b55996a7a844dd7914f998c693ab9 Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 2 Mar 2018 12:59:33 +0100 Subject: [PATCH 2/2] Small change to avoid premature pessimization --- kdwsdl2cpp/src/converter_clientstub.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kdwsdl2cpp/src/converter_clientstub.cpp b/kdwsdl2cpp/src/converter_clientstub.cpp index b61dfccf9..ae096c6a5 100644 --- a/kdwsdl2cpp/src/converter_clientstub.cpp +++ b/kdwsdl2cpp/src/converter_clientstub.cpp @@ -732,7 +732,7 @@ void Converter::convertClientOutputMessage(const Operation &operation, { // result signal const QString operationName = lowerlize(operation.name()); - const QString signalBase = lowerlize(operation.name()); + const QString signalBase = operationName; const QString callName = QLatin1String("async") + upperlize(operation.name()); KODE::Function doneSignal(signalBase + QLatin1String("Done"), QLatin1String("void"), KODE::Function::Signal); doneSignal.setDocs(QLatin1String("This signal is emitted whenever the asynchronous call ") + callName + QLatin1String("() has succeeded."));