Skip to content

Commit

Permalink
Bugfix of #11176 and related #10706 CPP-QT-QHTTPENGINE Server (#11177)
Browse files Browse the repository at this point in the history
* Fix extra m that prevents qt cpp server to build (#11176)

* Fix regular expression to capture IDs on path (#11176)

* Fix build issue missing QHttpEngine namespace (#10706)
  • Loading branch information
ipittau committed Jan 4, 2022
1 parent 8c090c9 commit 74f39b4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected:
if (socket->bytesAvailable() >= socket->contentLength()) {
emit requestReceived(socket);
} else {
connect(socket, &Socket::readChannelFinished, [this, socket, m]() {
connect(socket, &QHttpEngine::Socket::readChannelFinished, [this, socket]() {
emit requestReceived(socket);
});
}
Expand Down Expand Up @@ -91,7 +91,7 @@ private :
}

inline QRegularExpressionMatch getRequestMatch(QString serverTemplatePath, QString requestPath){
QRegularExpression parExpr( R"(\{([^\/\\s]+)\})" );
QRegularExpression parExpr( R"(\{([^\/\s]+)\})" );
serverTemplatePath.replace( parExpr, R"((?<\1>[^\/\s]+))" );
serverTemplatePath.append("[\\/]?$");
QRegularExpression pathExpr( serverTemplatePath );
Expand All @@ -105,4 +105,4 @@ private :
}
{{/cppNamespaceDeclarations}}

#endif // {{prefix}}_APIROUTER_H
#endif // {{prefix}}_APIROUTER_H

0 comments on commit 74f39b4

Please sign in to comment.