Skip to content

Commit 054af0e

Browse files
[cpp-qt-client] Remove deprecated SignalE/SignalEFull signals in API classes (#23113)
* [cpp-qt-client] Remove deprecated SignalE/SignalEFull signals in API classes * Remove deprecated signal emissions
1 parent 1778c1b commit 054af0e

23 files changed

Lines changed: 1 addition & 1471 deletions

File tree

modules/openapi-generator/src/main/resources/cpp-qt-client/api-body.mustache

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -927,32 +927,6 @@ void {{classname}}::{{nickname}}Callback({{prefix}}HttpRequestWorker *worker) {
927927
Q_EMIT _passwordFlow.authenticationNeeded();
928928
{{/isPassword}}{{/isOAuth}}{{/authMethods}}
929929
} else {
930-
931-
#if defined(_MSC_VER)
932-
// For MSVC
933-
#pragma warning(push)
934-
#pragma warning(disable : 4996)
935-
#elif defined(__clang__)
936-
// For Clang
937-
#pragma clang diagnostic push
938-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
939-
#elif defined(__GNUC__)
940-
// For GCC
941-
#pragma GCC diagnostic push
942-
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
943-
#endif
944-
945-
Q_EMIT {{nickname}}SignalE({{#returnType}}output, {{/returnType}}error_type, error_str);
946-
Q_EMIT {{nickname}}SignalEFull(worker, error_type, error_str);
947-
948-
#if defined(_MSC_VER)
949-
#pragma warning(pop)
950-
#elif defined(__clang__)
951-
#pragma clang diagnostic pop
952-
#elif defined(__GNUC__)
953-
#pragma GCC diagnostic pop
954-
#endif
955-
956930
Q_EMIT {{nickname}}SignalError({{#returnType}}output, {{/returnType}}error_type, error_str);
957931
Q_EMIT {{nickname}}SignalErrorFull(worker, error_type, error_str);
958932
}

modules/openapi-generator/src/main/resources/cpp-qt-client/api-header.mustache

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,8 @@ Q_SIGNALS:
9494
{{#operations}}{{#operation}}
9595
void {{nickname}}SignalFull({{prefix}}HttpRequestWorker *worker{{#returnType}}, {{{.}}} summary{{/returnType}});{{/operation}}{{/operations}}
9696
{{#operations}}{{#operation}}
97-
Q_DECL_DEPRECATED_X("Use {{nickname}}SignalError() instead")
98-
void {{nickname}}SignalE({{#returnType}}{{{.}}} summary, {{/returnType}}QNetworkReply::NetworkError error_type, QString error_str);
9997
void {{nickname}}SignalError({{#returnType}}{{{.}}} summary, {{/returnType}}QNetworkReply::NetworkError error_type, const QString &error_str);{{/operation}}{{/operations}}
10098
{{#operations}}{{#operation}}
101-
Q_DECL_DEPRECATED_X("Use {{nickname}}SignalErrorFull() instead")
102-
void {{nickname}}SignalEFull({{prefix}}HttpRequestWorker *worker, QNetworkReply::NetworkError error_type, QString error_str);
10399
void {{nickname}}SignalErrorFull({{prefix}}HttpRequestWorker *worker, QNetworkReply::NetworkError error_type, const QString &error_str);{{/operation}}{{/operations}}
104100

105101
void abortRequestsSignal();

modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirequest.cpp.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,4 @@ void {{classname}}Request::sendCustomResponse(QIODevice *res, QNetworkReply::Net
165165

166166
{{#cppNamespaceDeclarations}}
167167
}
168-
{{/cppNamespaceDeclarations}}
168+
{{/cppNamespaceDeclarations}}

samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXFakeApi.cpp

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -295,32 +295,6 @@ void PFXFakeApi::getEnumInlineOrRefCallback(PFXHttpRequestWorker *worker) {
295295
Q_EMIT getEnumInlineOrRefSignal();
296296
Q_EMIT getEnumInlineOrRefSignalFull(worker);
297297
} else {
298-
299-
#if defined(_MSC_VER)
300-
// For MSVC
301-
#pragma warning(push)
302-
#pragma warning(disable : 4996)
303-
#elif defined(__clang__)
304-
// For Clang
305-
#pragma clang diagnostic push
306-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
307-
#elif defined(__GNUC__)
308-
// For GCC
309-
#pragma GCC diagnostic push
310-
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
311-
#endif
312-
313-
Q_EMIT getEnumInlineOrRefSignalE(error_type, error_str);
314-
Q_EMIT getEnumInlineOrRefSignalEFull(worker, error_type, error_str);
315-
316-
#if defined(_MSC_VER)
317-
#pragma warning(pop)
318-
#elif defined(__clang__)
319-
#pragma clang diagnostic pop
320-
#elif defined(__GNUC__)
321-
#pragma GCC diagnostic pop
322-
#endif
323-
324298
Q_EMIT getEnumInlineOrRefSignalError(error_type, error_str);
325299
Q_EMIT getEnumInlineOrRefSignalErrorFull(worker, error_type, error_str);
326300
}

samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXFakeApi.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,8 @@ class PFXFakeApi : public QObject {
9696

9797
void getEnumInlineOrRefSignalFull(PFXHttpRequestWorker *worker);
9898

99-
Q_DECL_DEPRECATED_X("Use getEnumInlineOrRefSignalError() instead")
100-
void getEnumInlineOrRefSignalE(QNetworkReply::NetworkError error_type, QString error_str);
10199
void getEnumInlineOrRefSignalError(QNetworkReply::NetworkError error_type, const QString &error_str);
102100

103-
Q_DECL_DEPRECATED_X("Use getEnumInlineOrRefSignalErrorFull() instead")
104-
void getEnumInlineOrRefSignalEFull(PFXHttpRequestWorker *worker, QNetworkReply::NetworkError error_type, QString error_str);
105101
void getEnumInlineOrRefSignalErrorFull(PFXHttpRequestWorker *worker, QNetworkReply::NetworkError error_type, const QString &error_str);
106102

107103
void abortRequestsSignal();

samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXPetApi.cpp

Lines changed: 0 additions & 234 deletions
Original file line numberDiff line numberDiff line change
@@ -321,32 +321,6 @@ void PFXPetApi::addPetCallback(PFXHttpRequestWorker *worker) {
321321

322322

323323
} else {
324-
325-
#if defined(_MSC_VER)
326-
// For MSVC
327-
#pragma warning(push)
328-
#pragma warning(disable : 4996)
329-
#elif defined(__clang__)
330-
// For Clang
331-
#pragma clang diagnostic push
332-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
333-
#elif defined(__GNUC__)
334-
// For GCC
335-
#pragma GCC diagnostic push
336-
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
337-
#endif
338-
339-
Q_EMIT addPetSignalE(error_type, error_str);
340-
Q_EMIT addPetSignalEFull(worker, error_type, error_str);
341-
342-
#if defined(_MSC_VER)
343-
#pragma warning(pop)
344-
#elif defined(__clang__)
345-
#pragma clang diagnostic pop
346-
#elif defined(__GNUC__)
347-
#pragma GCC diagnostic pop
348-
#endif
349-
350324
Q_EMIT addPetSignalError(error_type, error_str);
351325
Q_EMIT addPetSignalErrorFull(worker, error_type, error_str);
352326
}
@@ -400,32 +374,6 @@ void PFXPetApi::allPetsCallback(PFXHttpRequestWorker *worker) {
400374
Q_EMIT allPetsSignal(output);
401375
Q_EMIT allPetsSignalFull(worker, output);
402376
} else {
403-
404-
#if defined(_MSC_VER)
405-
// For MSVC
406-
#pragma warning(push)
407-
#pragma warning(disable : 4996)
408-
#elif defined(__clang__)
409-
// For Clang
410-
#pragma clang diagnostic push
411-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
412-
#elif defined(__GNUC__)
413-
// For GCC
414-
#pragma GCC diagnostic push
415-
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
416-
#endif
417-
418-
Q_EMIT allPetsSignalE(output, error_type, error_str);
419-
Q_EMIT allPetsSignalEFull(worker, error_type, error_str);
420-
421-
#if defined(_MSC_VER)
422-
#pragma warning(pop)
423-
#elif defined(__clang__)
424-
#pragma clang diagnostic pop
425-
#elif defined(__GNUC__)
426-
#pragma GCC diagnostic pop
427-
#endif
428-
429377
Q_EMIT allPetsSignalError(output, error_type, error_str);
430378
Q_EMIT allPetsSignalErrorFull(worker, error_type, error_str);
431379
}
@@ -529,32 +477,6 @@ void PFXPetApi::deletePetCallback(PFXHttpRequestWorker *worker) {
529477

530478

531479
} else {
532-
533-
#if defined(_MSC_VER)
534-
// For MSVC
535-
#pragma warning(push)
536-
#pragma warning(disable : 4996)
537-
#elif defined(__clang__)
538-
// For Clang
539-
#pragma clang diagnostic push
540-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
541-
#elif defined(__GNUC__)
542-
// For GCC
543-
#pragma GCC diagnostic push
544-
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
545-
#endif
546-
547-
Q_EMIT deletePetSignalE(error_type, error_str);
548-
Q_EMIT deletePetSignalEFull(worker, error_type, error_str);
549-
550-
#if defined(_MSC_VER)
551-
#pragma warning(pop)
552-
#elif defined(__clang__)
553-
#pragma clang diagnostic pop
554-
#elif defined(__GNUC__)
555-
#pragma GCC diagnostic pop
556-
#endif
557-
558480
Q_EMIT deletePetSignalError(error_type, error_str);
559481
Q_EMIT deletePetSignalErrorFull(worker, error_type, error_str);
560482
}
@@ -734,32 +656,6 @@ void PFXPetApi::findPetsByStatusCallback(PFXHttpRequestWorker *worker) {
734656

735657

736658
} else {
737-
738-
#if defined(_MSC_VER)
739-
// For MSVC
740-
#pragma warning(push)
741-
#pragma warning(disable : 4996)
742-
#elif defined(__clang__)
743-
// For Clang
744-
#pragma clang diagnostic push
745-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
746-
#elif defined(__GNUC__)
747-
// For GCC
748-
#pragma GCC diagnostic push
749-
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
750-
#endif
751-
752-
Q_EMIT findPetsByStatusSignalE(output, error_type, error_str);
753-
Q_EMIT findPetsByStatusSignalEFull(worker, error_type, error_str);
754-
755-
#if defined(_MSC_VER)
756-
#pragma warning(pop)
757-
#elif defined(__clang__)
758-
#pragma clang diagnostic pop
759-
#elif defined(__GNUC__)
760-
#pragma GCC diagnostic pop
761-
#endif
762-
763659
Q_EMIT findPetsByStatusSignalError(output, error_type, error_str);
764660
Q_EMIT findPetsByStatusSignalErrorFull(worker, error_type, error_str);
765661
}
@@ -939,32 +835,6 @@ void PFXPetApi::findPetsByTagsCallback(PFXHttpRequestWorker *worker) {
939835

940836

941837
} else {
942-
943-
#if defined(_MSC_VER)
944-
// For MSVC
945-
#pragma warning(push)
946-
#pragma warning(disable : 4996)
947-
#elif defined(__clang__)
948-
// For Clang
949-
#pragma clang diagnostic push
950-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
951-
#elif defined(__GNUC__)
952-
// For GCC
953-
#pragma GCC diagnostic push
954-
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
955-
#endif
956-
957-
Q_EMIT findPetsByTagsSignalE(output, error_type, error_str);
958-
Q_EMIT findPetsByTagsSignalEFull(worker, error_type, error_str);
959-
960-
#if defined(_MSC_VER)
961-
#pragma warning(pop)
962-
#elif defined(__clang__)
963-
#pragma clang diagnostic pop
964-
#elif defined(__GNUC__)
965-
#pragma GCC diagnostic pop
966-
#endif
967-
968838
Q_EMIT findPetsByTagsSignalError(output, error_type, error_str);
969839
Q_EMIT findPetsByTagsSignalErrorFull(worker, error_type, error_str);
970840
}
@@ -1027,32 +897,6 @@ void PFXPetApi::getPetByIdCallback(PFXHttpRequestWorker *worker) {
1027897
Q_EMIT getPetByIdSignal(output);
1028898
Q_EMIT getPetByIdSignalFull(worker, output);
1029899
} else {
1030-
1031-
#if defined(_MSC_VER)
1032-
// For MSVC
1033-
#pragma warning(push)
1034-
#pragma warning(disable : 4996)
1035-
#elif defined(__clang__)
1036-
// For Clang
1037-
#pragma clang diagnostic push
1038-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
1039-
#elif defined(__GNUC__)
1040-
// For GCC
1041-
#pragma GCC diagnostic push
1042-
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1043-
#endif
1044-
1045-
Q_EMIT getPetByIdSignalE(output, error_type, error_str);
1046-
Q_EMIT getPetByIdSignalEFull(worker, error_type, error_str);
1047-
1048-
#if defined(_MSC_VER)
1049-
#pragma warning(pop)
1050-
#elif defined(__clang__)
1051-
#pragma clang diagnostic pop
1052-
#elif defined(__GNUC__)
1053-
#pragma GCC diagnostic pop
1054-
#endif
1055-
1056900
Q_EMIT getPetByIdSignalError(output, error_type, error_str);
1057901
Q_EMIT getPetByIdSignalErrorFull(worker, error_type, error_str);
1058902
}
@@ -1141,32 +985,6 @@ void PFXPetApi::updatePetCallback(PFXHttpRequestWorker *worker) {
1141985

1142986

1143987
} else {
1144-
1145-
#if defined(_MSC_VER)
1146-
// For MSVC
1147-
#pragma warning(push)
1148-
#pragma warning(disable : 4996)
1149-
#elif defined(__clang__)
1150-
// For Clang
1151-
#pragma clang diagnostic push
1152-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
1153-
#elif defined(__GNUC__)
1154-
// For GCC
1155-
#pragma GCC diagnostic push
1156-
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1157-
#endif
1158-
1159-
Q_EMIT updatePetSignalE(error_type, error_str);
1160-
Q_EMIT updatePetSignalEFull(worker, error_type, error_str);
1161-
1162-
#if defined(_MSC_VER)
1163-
#pragma warning(pop)
1164-
#elif defined(__clang__)
1165-
#pragma clang diagnostic pop
1166-
#elif defined(__GNUC__)
1167-
#pragma GCC diagnostic pop
1168-
#endif
1169-
1170988
Q_EMIT updatePetSignalError(error_type, error_str);
1171989
Q_EMIT updatePetSignalErrorFull(worker, error_type, error_str);
1172990
}
@@ -1272,32 +1090,6 @@ void PFXPetApi::updatePetWithFormCallback(PFXHttpRequestWorker *worker) {
12721090

12731091

12741092
} else {
1275-
1276-
#if defined(_MSC_VER)
1277-
// For MSVC
1278-
#pragma warning(push)
1279-
#pragma warning(disable : 4996)
1280-
#elif defined(__clang__)
1281-
// For Clang
1282-
#pragma clang diagnostic push
1283-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
1284-
#elif defined(__GNUC__)
1285-
// For GCC
1286-
#pragma GCC diagnostic push
1287-
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1288-
#endif
1289-
1290-
Q_EMIT updatePetWithFormSignalE(error_type, error_str);
1291-
Q_EMIT updatePetWithFormSignalEFull(worker, error_type, error_str);
1292-
1293-
#if defined(_MSC_VER)
1294-
#pragma warning(pop)
1295-
#elif defined(__clang__)
1296-
#pragma clang diagnostic pop
1297-
#elif defined(__GNUC__)
1298-
#pragma GCC diagnostic pop
1299-
#endif
1300-
13011093
Q_EMIT updatePetWithFormSignalError(error_type, error_str);
13021094
Q_EMIT updatePetWithFormSignalErrorFull(worker, error_type, error_str);
13031095
}
@@ -1404,32 +1196,6 @@ void PFXPetApi::uploadFileCallback(PFXHttpRequestWorker *worker) {
14041196

14051197

14061198
} else {
1407-
1408-
#if defined(_MSC_VER)
1409-
// For MSVC
1410-
#pragma warning(push)
1411-
#pragma warning(disable : 4996)
1412-
#elif defined(__clang__)
1413-
// For Clang
1414-
#pragma clang diagnostic push
1415-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
1416-
#elif defined(__GNUC__)
1417-
// For GCC
1418-
#pragma GCC diagnostic push
1419-
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1420-
#endif
1421-
1422-
Q_EMIT uploadFileSignalE(output, error_type, error_str);
1423-
Q_EMIT uploadFileSignalEFull(worker, error_type, error_str);
1424-
1425-
#if defined(_MSC_VER)
1426-
#pragma warning(pop)
1427-
#elif defined(__clang__)
1428-
#pragma clang diagnostic pop
1429-
#elif defined(__GNUC__)
1430-
#pragma GCC diagnostic pop
1431-
#endif
1432-
14331199
Q_EMIT uploadFileSignalError(output, error_type, error_str);
14341200
Q_EMIT uploadFileSignalErrorFull(worker, error_type, error_str);
14351201
}

0 commit comments

Comments
 (0)