Skip to content

Commit

Permalink
Extend the reserved keywords for Qt projects with the following words: (
Browse files Browse the repository at this point in the history
OpenAPITools#17722)

- signals (builtin Qt macro)
 - slots (builtin Qt macro)
 - valid (generated classes has an isValid method)
 - set (generated classes has an isSet method)

Fixes OpenAPITools#17487
  • Loading branch information
martonmiklos authored Feb 8, 2024
1 parent 0d1b14a commit 36f2eca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ public CppQtAbstractCodegen() {
systemIncludes.add("QDate");
systemIncludes.add("QDateTime");
systemIncludes.add("QByteArray");

reservedWords.add("signals");
reservedWords.add("slots");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ public CppQtClientCodegen() {
typeMapping.put("AnyType", "QJsonValue");
importMapping.put(PREFIX + "HttpFileElement", "#include \"" + PREFIX + "HttpFileElement.h\"");
importMapping.put("QJsonValue", "#include <QJsonValue>");

reservedWords.add("valid");
reservedWords.add("set");
}

@Override
Expand Down

0 comments on commit 36f2eca

Please sign in to comment.