@@ -163,7 +163,7 @@ void {{classname}}::enableResponseCompression() {
163
163
}
164
164
165
165
void { {classname} }::abortRequests() {
166
- emit abortRequestsSignal();
166
+ Q_EMIT abortRequestsSignal();
167
167
}
168
168
169
169
QString { {classname} }::getParamStylePrefix(const QString &style) {
@@ -676,7 +676,7 @@ void {{classname}}::{{nickname}}({{#allParams}}{{#required}}const {{{dataType}}}
676
676
connect(this, & { {classname} }::abortRequestsSignal, worker, &QObject::deleteLater);
677
677
connect(worker, &QObject::destroyed, this, [this]() {
678
678
if (findChildren< {{prefix} }HttpRequestWorker*>().count() == 0) {
679
- emit allPendingRequestsCompleted();
679
+ Q_EMIT allPendingRequestsCompleted();
680
680
}
681
681
});{ {#authMethods} }{ {#isOAuth} }{ {#isCode} }
682
682
_OauthMethod = 2;
@@ -702,7 +702,7 @@ void {{classname}}::{{nickname}}({{#allParams}}{{#required}}const {{{dataType}}}
702
702
connect(this, & { {classname} }::abortRequestsSignal, _latestWorker, &QObject::deleteLater);
703
703
connect(_latestWorker, &QObject::destroyed, [this](){
704
704
if (findChildren< {{prefix} }HttpRequestWorker*>().count() == 0){
705
- emit allPendingRequestsCompleted();
705
+ Q_EMIT allPendingRequestsCompleted();
706
706
}
707
707
});
708
708
@@ -732,7 +732,7 @@ void {{classname}}::{{nickname}}({{#allParams}}{{#required}}const {{{dataType}}}
732
732
connect(this, & { {classname} }::abortRequestsSignal, _latestWorker, &QObject::deleteLater);
733
733
connect(_latestWorker, &QObject::destroyed, [this](){
734
734
if (findChildren< {{prefix} }HttpRequestWorker*>().count() == 0){
735
- emit allPendingRequestsCompleted();
735
+ Q_EMIT allPendingRequestsCompleted();
736
736
}
737
737
});
738
738
@@ -762,7 +762,7 @@ void {{classname}}::{{nickname}}({{#allParams}}{{#required}}const {{{dataType}}}
762
762
connect(this, & { {classname} }::abortRequestsSignal, _latestWorker, &QObject::deleteLater);
763
763
connect(_latestWorker, &QObject::destroyed, [this](){
764
764
if (findChildren< {{prefix} }HttpRequestWorker*>().count() == 0){
765
- emit allPendingRequestsCompleted();
765
+ Q_EMIT allPendingRequestsCompleted();
766
766
}
767
767
});
768
768
@@ -792,7 +792,7 @@ void {{classname}}::{{nickname}}({{#allParams}}{{#required}}const {{{dataType}}}
792
792
connect(this, & { {classname} }::abortRequestsSignal, _latestWorker, &QObject::deleteLater);
793
793
connect(_latestWorker, &QObject::destroyed, [this](){
794
794
if (findChildren< {{prefix} }HttpRequestWorker*>().count() == 0){
795
- emit allPendingRequestsCompleted();
795
+ Q_EMIT allPendingRequestsCompleted();
796
796
}
797
797
});
798
798
@@ -857,8 +857,8 @@ void {{classname}}::{{nickname}}Callback({{prefix}}HttpRequestWorker *worker) {
857
857
worker->deleteLater();
858
858
859
859
if (worker->error_type == QNetworkReply::NoError) {
860
- emit {{nickname} }Signal({ {#returnType} }output{ {/returnType} });
861
- emit { {nickname} }SignalFull(worker{ {#returnType} }, output{ {/returnType} });{ {#authMethods} }{ {#isOAuth} }{ {#isCode} }
860
+ Q_EMIT {{nickname} }Signal({ {#returnType} }output{ {/returnType} });
861
+ Q_EMIT { {nickname} }SignalFull(worker{ {#returnType} }, output{ {/returnType} });{ {#authMethods} }{ {#isOAuth} }{ {#isCode} }
862
862
} else if(worker->error_type == QNetworkReply::AuthenticationRequiredError){
863
863
connect(&_authFlow, SIGNAL(tokenReceived()), this, SLOT(tokenAvailable()));
864
864
QStringList scope;
@@ -870,7 +870,7 @@ void {{classname}}::{{nickname}}Callback({{prefix}}HttpRequestWorker *worker) {
870
870
QString tokenUrl("{ {tokenUrl} }");
871
871
//TODO get clientID and Secret and state in the config? https://swagger.io/docs/specification/authentication/oauth2/ states that you should do as you like
872
872
_authFlow.setVariables(authorizationUrl, tokenUrl, scopeStr, "state" , "http://127.0.0.1:9999", "clientId", "clientSecret");
873
- emit _authFlow.authenticationNeeded();{ {/isCode} }
873
+ Q_EMIT _authFlow.authenticationNeeded();{ {/isCode} }
874
874
{ {#isImplicit} }
875
875
} else if(worker->error_type == QNetworkReply::AuthenticationRequiredError){
876
876
connect(&_implicitFlow, SIGNAL(tokenReceived()), this, SLOT(tokenAvailable()));
@@ -882,7 +882,7 @@ void {{classname}}::{{nickname}}Callback({{prefix}}HttpRequestWorker *worker) {
882
882
QString authorizationUrl("{ {authorizationUrl} }");
883
883
//TODO get clientID and Secret and state in the config? https://swagger.io/docs/specification/authentication/oauth2/ states that you should do as you like
884
884
_implicitFlow.setVariables(authorizationUrl, scopeStr, "state" , "http://127.0.0.1:9999", "clientId");
885
- emit _implicitFlow.authenticationNeeded();{ {/isImplicit} }
885
+ Q_EMIT _implicitFlow.authenticationNeeded();{ {/isImplicit} }
886
886
{ {#isApplication} }
887
887
} else if(worker->error_type == QNetworkReply::AuthenticationRequiredError){
888
888
connect(&_credentialFlow, SIGNAL(tokenReceived()), this, SLOT(tokenAvailable()));
@@ -894,7 +894,7 @@ void {{classname}}::{{nickname}}Callback({{prefix}}HttpRequestWorker *worker) {
894
894
QString tokenUrl("{ {tokenUrl} }");
895
895
//TODO get clientID and Secret and state in the config? https://swagger.io/docs/specification/authentication/oauth2/ states that you should do as you like
896
896
_credentialFlow.setVariables(tokenUrl , scopeStr, "clientId", "clientSecret");
897
- emit _credentialFlow.authenticationNeeded();{ {/isApplication} }
897
+ Q_EMIT _credentialFlow.authenticationNeeded();{ {/isApplication} }
898
898
{ {#isPassword} }
899
899
} else if(worker->error_type == QNetworkReply::AuthenticationRequiredError){
900
900
connect(&_passwordFlow, SIGNAL(tokenReceived()), this, SLOT(tokenAvailable()));
@@ -906,7 +906,7 @@ void {{classname}}::{{nickname}}Callback({{prefix}}HttpRequestWorker *worker) {
906
906
QString tokenUrl("{ {tokenUrl} }");
907
907
//TODO get clientID and Secret and state in the config? https://swagger.io/docs/specification/authentication/oauth2/ states that you should do as you like
908
908
_passwordFlow.setVariables(tokenUrl , scopeStr ,"clientId", "clientSecret", "username", "password");
909
- emit _passwordFlow.authenticationNeeded();
909
+ Q_EMIT _passwordFlow.authenticationNeeded();
910
910
{ {/isPassword} }{ {/isOAuth} }{ {/authMethods} }
911
911
} else {
912
912
@@ -924,8 +924,8 @@ void {{classname}}::{{nickname}}Callback({{prefix}}HttpRequestWorker *worker) {
924
924
#pragma GCC diagnostic ignored " -Wdeprecated-declarations"
925
925
#endif
926
926
927
- emit {{nickname} }SignalE({ {#returnType} }output, { {/returnType} }error_type, error_str);
928
- emit { {nickname} }SignalEFull(worker, error_type, error_str);
927
+ Q_EMIT {{nickname} }SignalE({ {#returnType} }output, { {/returnType} }error_type, error_str);
928
+ Q_EMIT { {nickname} }SignalEFull(worker, error_type, error_str);
929
929
930
930
#if defined(_MSC_VER)
931
931
#pragma warning(pop)
@@ -935,8 +935,8 @@ void {{classname}}::{{nickname}}Callback({{prefix}}HttpRequestWorker *worker) {
935
935
#pragma GCC diagnostic pop
936
936
#endif
937
937
938
- emit { {nickname} }SignalError({ {#returnType} }output, { {/returnType} }error_type, error_str);
939
- emit { {nickname} }SignalErrorFull(worker, error_type, error_str);
938
+ Q_EMIT { {nickname} }SignalError({ {#returnType} }output, { {/returnType} }error_type, error_str);
939
+ Q_EMIT { {nickname} }SignalErrorFull(worker, error_type, error_str);
940
940
}
941
941
}
942
942
0 commit comments