-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Qt5 Server] Add Support for Qt5 server using QHttpEngine #322
Conversation
Suggestion: You may consider creating an abstract "AbstractCppQt5Codegen.java" class for both Qt5 client and server codegen classes in this PR or a separate PR (day 2 requirement) |
Can we also share templates? |
Technically yes and that requires changes in the Qt5 client codegen as well. |
What about namespace? C++ QT5 client has the following option: |
Wired up main TODO : Route API call to handlers
…ainer and on the host
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not done with reviews, but that what i saw in the java file
* Template Location. This is the location which templates will be read from. The generator | ||
* will use the resource stream to attempt to read the templates. | ||
*/ | ||
embeddedTemplateDir = templateDir = "cpp-qt5-server"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't you say there is more than one framework for qt server, which might be interesting to look at? wouldnt it be better then to specifiy which one it is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Add framework information
*/ | ||
languageSpecificPrimitives = new HashSet<String>( | ||
Arrays.asList( | ||
"bool", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no char?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
char
is not there in OAS
*/ | ||
@Override | ||
public String getName() { | ||
return "cpp-qt5-server"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
*/ | ||
@Override | ||
public String getHelp() { | ||
return "Generates a Qt5 C++ server library."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with which framework?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Add framework information
why close it? |
return; | ||
} | ||
if(QStringLiteral("bool").compare(type) == 0) { | ||
bool * val = static_cast<bool*>(value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can use qvariant_cast and QVariant here to avoid storing pointers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it and sadly the model became complicated :|
Hi all, do you think this generator is ready for a beta release? |
👌 please take your time. I was wondering it's ready for a beta release so as to collect more feedback from the community. |
…fy model, add emit signals to default handlers
@wing328 |
…ls#322) * Initial wiring to get the QHttpEngine Server running for Qt5 server * Add wiring for build environment * Add current generated files * Update README.md * Solved Build for Docker and Host Wired up main TODO : Route API call to handlers * Wire up routes * Wiring up routes update * Convert Path to QHttpEngine format * Rename some files * Extract query Parameters and path parameters * Removed pri file, Qt can read CMakeLists.txt * Initial support of deserialization * Adding initial support for response serialization * Setup simple signal handler to quite the server with Ctrl+C in a container and on the host * Remove unneeded function * Add executable permission to script and move from Debian to Alpine for Dockerfile * Add stringValue of missing types * Unify toJson'xxx' APIs the same way like setValue * Rework to remove all pointer usages, pass by const references, simplify model, add emit signals to default handlers
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,3.1.x
,4.0.x
. Default:master
.Description of the PR
Qt5 Server based on QHttpEngine
Missing Support
Related to discussion in #268
@stkrwork @MartinDelille @ravinikam @fvarose @wing328